Sha256: 4782e0a03dd014f60b5b3fee095b366258a5d43ff9a2ee32ec0bdbcf6b00d5a7

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
push_type_admin-0.1.0.beta3 app/views/push_type/nodes/_new_node_button.html.haml