Sha256: ad8de0b578da6d5abb6c2d8e1854cf0672fdf567efc0e8c99d5946f4e147af40
Contents?: true
Size: 1.3 KB
Versions: 16
Compression:
Stored size: 1.3 KB
Contents
<% return '' unless item classes ||= ['nav-item'] classes.push('active') if item_active?(item) classes.push('dropdown') if dropdown?(item) tabindex ||= 0 %> <%= content_tag(:li, class: classes) do %> <% if dropdown?(item) %> <% if item.label %> <%= render_button(item.label, class: 'nav-link dropdown-toggle', data: { toggle: 'dropdown' }, role: 'button', tabindex: tabindex) %> <% else %> <%= content_tag(:a, item.name, class: 'nav-link dropdown-toggle', data: { toggle: 'dropdown' }, role: 'button', tabindex: tabindex) %> <% end %> <div class='dropdown-menu'> <% item.items.each do |dropdown_item| next unless dropdown_item %> <% if menu_button?(dropdown_item) %> <%= render_button(dropdown_item, class: 'dropdown-item', tabindex: tabindex) %> <% else %> <%= render 'components/other-menu-item', item: dropdown_item, tabindex: tabindex %> <% end %> <% end %> </div> <% elsif menu_button?(item) %> <%= render_button(item, class: 'nav-link', tabindex: tabindex) %> <% else %> <%= render 'components/other-menu-item', item: item, tabindex: tabindex %> <% end %> <% end %>
Version data entries
16 entries across 16 versions & 1 rubygems