Sha256: 344a5fa130347893661b6525b3f880941b965adc73aeb6c194c5db5e3c85639e

Contents?: true

Size: 861 Bytes

Versions: 5

Compression:

Stored size: 861 Bytes

Contents

- unless brick_list.brick_types.empty?
  - if brick_list.brick_types.allowed.count > 1
    %a.btn.btn-small.btn-primary.dropdown-toggle{ 'data-toggle' => 'dropdown', 'href' => '#' }
      = t('.add_element')
      %span.caret
    %ul.dropdown-menu.pull-right
      - brick_list.brick_types.allowed.group_by(&:group).each do |group, types|
        - types.map { |type| cms_brick_item brick_list, type }.compact.each do |brick_type_item|
          %li
            = brick_type_item
        .divider
  - else
    - brick_list.brick_types.allowed.each do |type|
      = link_to t('.add_specific_element', :name => type.class_name.constantize.model_name.human), kuhsaft.new_cms_brick_path(:brick => { :type => type.class_name, :brick_list_id => brick_list.id, :brick_list_type => brick_list.brick_list_type }), :remote => true, :class => 'btn btn-small btn-primary'

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
kuhsaft-2.5.2 app/views/kuhsaft/cms/admin/_brick_type_dropdown.html.haml
kuhsaft-2.5.1 app/views/kuhsaft/cms/admin/_brick_type_dropdown.html.haml
kuhsaft-2.5.0 app/views/kuhsaft/cms/admin/_brick_type_dropdown.html.haml
qbrick-2.5.0.pre app/views/kuhsaft/cms/admin/_brick_type_dropdown.html.haml
kuhsaft-2.4.3 app/views/kuhsaft/cms/admin/_brick_type_dropdown.html.haml