Sha256: 665d9d10f9b9179b7379654d5854cc80a9a86c330a016398b7a48ddb2a155adb

Contents?: true

Size: 1.22 KB

Versions: 14

Compression:

Stored size: 1.22 KB

Contents

- if @parent
  - if @parent.child_nodes.size == 1
    = link_to ficon(:page_add, "New #{ @parent.child_nodes.first.humanize.downcase }"), push_type_admin.new_node_node_path(kind: @parent.child_nodes.first), class: 'button radius success'
  - elsif @parent.child_nodes.size > 1
    = link_to ficon(:page_add, 'New content'), push_type_admin.new_node_node_path(kind: @parent.child_nodes.first), class: 'button radius success dropdown', data: { dropdown: 'new-node' }
    %ul#new-node.f-dropdown
      - for kind in @parent.child_nodes
        %li= link_to "New #{ kind.humanize.downcase }", push_type_admin.new_node_node_path(kind: kind)

- else
  - if PushType.root_nodes.size == 1
    = link_to ficon(:page_add, "New #{ PushType.root_nodes.first.humanize.downcase }"), push_type_admin.new_node_path(kind: PushType.root_nodes.first), class: 'button radius success'
  - elsif PushType.root_nodes.size > 1
    = link_to ficon(:page_add, 'New content'), push_type_admin.new_node_path(kind: PushType.root_nodes.first), class: 'button radius success dropdown', data: { dropdown: 'new-node' }
    %ul#new-node.f-dropdown
      - for kind in PushType.root_nodes
        %li= link_to "New #{ kind.humanize.downcase }", push_type_admin.new_node_path(kind: kind)

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
push_type_admin-0.12.1 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.12.0 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.12.0.beta.1 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.11.2 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.11.1 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.11.0.beta.2 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.11.0.beta.1 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.10.4 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.10.3 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.10.2 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.10.1 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.10.0 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.10.0.beta.5 app/views/push_type/admin/nodes/_new_node_button.html.haml
push_type_admin-0.10.0.beta.3 app/views/push_type/admin/nodes/_new_node_button.html.haml