Sha256: 5324ec8cad51b5e50c27531fe77b3a5c44ee412c81541c78d04bf750f049b3f3

Contents?: true

Size: 899 Bytes

Versions: 13

Compression:

Stored size: 899 Bytes

Contents

- unless brick_list.brick_types.empty?
  .btn-group
    - 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), qbrick.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

13 entries across 13 versions & 1 rubygems

Version Path
qbrick-2.6.9 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.6.8 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.6.7 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.6.6 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.6.5 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.6.4 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.6.3 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.6.2 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.6.1 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.6.0 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.5.2 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.5.1 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml
qbrick-2.5.0 app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml