Sha256: b48a7b42f75d08f3351a2988a941bec8de0e784944d646805184d5b52aaeeec1

Contents?: true

Size: 1.25 KB

Versions: 2

Compression:

Stored size: 1.25 KB

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

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