Sha256: 818d7d5c25c665edb236b9c3c20070ec5b715f8330ff50a198ca40036ebaa88a

Contents?: true

Size: 1.19 KB

Versions: 37

Compression:

Stored size: 1.19 KB

Contents

- if @parent
  - if @parent.child_nodes.size == 1
    = link_to ficon(:page_add, "New #{ @parent.child_nodes.first.humanize.downcase }"), push_type.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.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.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.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.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.new_node_path(kind: kind)

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
push_type_admin-0.9.5 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.9.3 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.9.2 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.9.1 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.9.0 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.9.0.beta.4 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.9.0.beta.3 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.9.0.beta.2 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.8.2 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.8.1 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.8.0 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.8.0.beta.3 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.8.0.beta.2 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.8.0.beta.1 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.7.0 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.7.0.beta.1 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.6.0 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.6.0.beta.4 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.6.0.beta.3 app/views/push_type/nodes/_new_node_button.html.haml
push_type_admin-0.6.0.beta.2 app/views/push_type/nodes/_new_node_button.html.haml