Sha256: 70aed94e0ccb5842a75da1b09dc463820ae2e6452453962c1ddc318589f9a596
Contents?: true
Size: 1.29 KB
Versions: 16
Compression:
Stored size: 1.29 KB
Contents
<% if tree.root? tree.each do |branch| if branch.object.is_a?(Lolita::Mapping) branch.options[:url]||=lolita_resources_path(branch.object) else branch.options[:url]=if branch.options[:url].respond_to?(:call) branch.options[:url].call(self,branch) else branch.options[:url] end end end end %> <ul <%=!tree.root? ? "class='subtree'" : ""%> > <% last_branch=tree.branches.last %> <%tree.branches.each do |branch| if branch.object.is_a?(Lolita::Mapping) active=if self.respond_to?(:resource_class) branch.object ? branch.object.to==resource_class : false end end unless active active=branch.self_with_children.detect{|b| if b.options[:active].respond_to?(:call) b.options[:active].call(self,branch,b) else b.options[:url]==request.path end } end %> <li class="<%=active ? "active" : ""%> <%=branch.children.branches.any? ? "with-subtree" : ""%> <%=!tree.root? && branch==last_branch ? "last-in-subtree" : ""%>"> <%= link_to branch.title, branch.options[:url] || "#" %> <% if branch.children.branches.any? %> <%= render_component(:"lolita/navigation",:tree,:tree=>branch.children) %> <% end %> </li> <% end %> </ul>
Version data entries
16 entries across 16 versions & 1 rubygems