Sha256: 88fc1ca05164bdf9bf60cb4f4f7c79f9e9eafe40b8a64bbf89abeb9b8382c920
Contents?: true
Size: 1.12 KB
Versions: 22
Compression:
Stored size: 1.12 KB
Contents
<div style="min-height:36px"> <div class="subnav"> <ul class="nav nav-pills"> <% links.each_with_index do |link_hash, index| %> <% sublinks = (link_hash[:sublinks] || []) %> <% href = (sublinks.size == 0 ? (link_hash[:href] || '#') : "##{link_hash[:name].to_s.gsub(/[^\w]/, '_').downcase}_#{index}") %> <li class="<%= 'dropdown' if sublinks.size %> <%= 'active' if index == 0 %>"> <% if sublinks.size == 0 %> <%= link_to link_hash[:name].to_s, href %> <% else %> <%= link_to (link_hash[:name].to_s + ' <b class="caret"></b>').html_safe, href, class: 'dropdown-toggle', data: { toggle: 'dropdown' } %> <ul class="dropdown-menu"> <% sublinks.each_with_index do |sublink_hash, sublink_index| %> <% sublink_href = (sublink_hash[:href] || "##{link_hash[:name].to_s.gsub(/[^\w]/, '_').downcase}_#{index}_#{sublink_hash[:name].to_s.gsub(/[^\w]/, '_').downcase}_#{sublink_index}") %> <%= link_to sublink_hash[:name].to_s, sublink_href %> <% end %> </ul> <% end %> </li> <% end %> </ul> </div> </div>
Version data entries
22 entries across 22 versions & 1 rubygems