Sha256: 3e5fe51da707d1ea0eeb7a2985261a237ccc9b12d06bd8b62981708a0920ea96
Contents?: true
Size: 1.34 KB
Versions: 16
Compression:
Stored size: 1.34 KB
Contents
<% return '' unless item # rubocop:disable Lint/TopLevelReturnWithArgument 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