Sha256: 60a71de3c8976f7b976dc561d069c6801da61b90ba2e5fe45f2944549ff8ee27

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

.sidebar-nav.navbar-collapse
  %ul.nav.nav-pills.nav-stacked
    - if authenticated?
      %li
        %a{ href: "#{settings.map_path}/" }
          %i.fa.fa-home.fa-fw
          Home
      - Ditty::Components.navigation.each do |item|
        - if item[:target].nil? || policy(item[:target]).list?
          - if item[:group]
            %li
              %a{ href: '#' }
                %i.fa.fa-fw{ class: "fa-#{item[:icon]}" }
                =item[:group]
                %span.fa.arrow
              %ul.nav.nav-second-level
                - item[:items].each do |sub_item|
                  - if sub_item[:target].nil? || policy(sub_item[:target]).list?
                    %li
                      %a{ href: "#{settings.map_path}#{sub_item[:link]}" }
                        %i.fa.fa-fw{ class: "fa-#{sub_item[:icon]}" }
                        = sub_item[:text]
          - else
            %li
              %a{ href: "#{settings.map_path}#{item[:link]}" }
                %i.fa.fa-fw{ class: "fa-#{item[:icon]}" }
                = item[:text]
    - else
      %li
        %a{ href: "#{settings.map_path}/auth/login" }
          %i.fa.fa-user.fa-fw
          Log In
      - if policy(::Ditty::User).register?
        %li
          %a{ href: "#{settings.map_path}/auth/register" }
            %i.fa.fa-pencil-square-o.fa-fw
            Register

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ditty-0.8.0 views/partials/sidebar.haml