Sha256: 9b532e4f0e9598038cd9cb6cdb83f059f0a852c87f7e67f61576171f6dbf7d10

Contents?: true

Size: 752 Bytes

Versions: 5

Compression:

Stored size: 752 Bytes

Contents

- if tree.root?
  - tree.populate_urls_in_branches(self)
- visible ||= tree.root?
- if tree.visible?(self)
  %ul{:class => !tree.root? && "subtree", :style => "display:#{visible ? "block" : "none"}"}
    - last_branch = tree.branches.last
    - tree.branches.each do |branch|
      - if branch.visible?(self)
        - active = branch.active?(self)
        - classes = [] << (active && "active") << (branch.subtree? && "with-subtree") << (!tree.root? && branch == last_branch && "last-in-subtree")
        %li{:class => classes.reject{|e| !e}.join(" ")}
          = link_to branch.title, branch.options[:url] || "#"
          - if branch.subtree?
            = render_component(:"lolita/navigation", :tree, :tree => branch.children, :visible => active)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lolita-3.2.0.rc.13 app/views/components/lolita/navigation/_tree.html.haml
lolita-3.2.0.rc.12 app/views/components/lolita/navigation/_tree.html.haml
lolita-3.2.0.rc.11 app/views/components/lolita/navigation/_tree.html.haml
lolita-3.2.0.rc.10 app/views/components/lolita/navigation/_tree.html.haml
lolita-3.2.0.rc.9 app/views/components/lolita/navigation/_tree.html.haml