Sha256: 05fd7eb6d8942a9974d38731b44d275b101823dbbbd306bbf7c2ab0c58e743b1

Contents?: true

Size: 1.35 KB

Versions: 6

Compression:

Stored size: 1.35 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.active
        %a{ href: "#{settings.map_path}/auth/identity" }
          %i.fa.fa-user.fa-fw
          Log In
      - if policy(::Ditty::Identity).register?
        %li
          %a{ href: "#{settings.map_path}/auth/identity/register" }
            %i.fa.fa-pencil-square-o.fa-fw
            Register

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ditty-0.6.0 views/partials/sidebar.haml
ditty-0.4.1 views/partials/sidebar.haml
ditty-0.4.0 views/partials/sidebar.haml
ditty-0.3.3 views/partials/sidebar.haml
ditty-0.3.2 views/partials/sidebar.haml
ditty-0.3.1 views/partials/sidebar.haml