Sha256: f6a6042bd0596e4b9762fbe57b517e2ba98bdfbffd90e1e009bcfcb2c01c0532

Contents?: true

Size: 1.62 KB

Versions: 5

Compression:

Stored size: 1.62 KB

Contents

- cache taxon_cache_key(taxon, :left_navigation, selected: selected_child_taxon), expires_in: Workarea.config.cache_expirations.left_navigation_fragment_cache do
  .secondary-nav
    %h2.secondary-nav__heading= t('workarea.storefront.left_navigation.categories')
    %ul.secondary-nav__links{ role: 'navigation' }
      - taxon.children.each do |taxon|
        - if taxon.active?
          %li.secondary-nav__item{ class: ('secondary-nav__item--has-children' if taxon.has_children?) }
            - if taxon.placeholder?
              %span.secondary-nav__link= taxon.name
            - elsif link_selected?(taxon)
              %span.secondary-nav__link.secondary-nav__link--selected= taxon.name
            - else
              = link_to taxon.name, storefront_path_for(taxon), class: (link_selected?(taxon) ? 'secondary-nav__link secondary-nav__link--selected' : 'secondary-nav__link')

            - if taxon.has_children? && link_selected?(taxon)
              %ul.secondary-nav__children
                - taxon.children.each do |taxon|
                  - if taxon.active?
                    %li.secondary-nav__item{ class: ('secondary-nav__item--has-children' if taxon.has_children?) }
                      - if taxon.placeholder?
                        %span.secondary-nav__link= taxon.name
                      - elsif link_selected?(taxon)
                        %span.secondary-nav__link.secondary-nav__link--selected= taxon.name
                      - else
                        = link_to taxon.name, storefront_path_for(taxon), class: (link_selected?(taxon) ? 'secondary-nav__link secondary-nav__link--selected' : 'secondary-nav__link')

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
workarea-nvy_theme-1.2.1 app/views/workarea/storefront/shared/_left_navigation.html.haml
workarea-nvy_theme-1.2.0 app/views/workarea/storefront/shared/_left_navigation.html.haml
workarea-nvy_theme-1.1.4 app/views/workarea/storefront/shared/_left_navigation.html.haml
workarea-nvy_theme-1.1.3 app/views/workarea/storefront/shared/_left_navigation.html.haml
workarea-nvy_theme-1.1.2 app/views/workarea/storefront/shared/_left_navigation.html.haml