Sha256: 49105e19661dd39ba5c51e51b3e7e2c97bba57182772c46710699e0aa6a074e7

Contents?: true

Size: 1.36 KB

Versions: 62

Compression:

Stored size: 1.36 KB

Contents

- @title = t('workarea.storefront.sitemaps.heading')

- content_for :head do
  - cache "#{@sitemap.cache_key}/head", expires_in: Workarea.config.cache_expirations.sitemap_fragment_cache do
    - if @sitemap.first_page?
      %meta{ name: 'robots', content: 'index, follow' }
    - else
      %meta{ name: 'robots', content: 'noindex, follow' }

    - if @sitemap.first_page?
      %link{ href: sitemap_path, rel: 'canonical' }
    - else
      %link{ href: sitemap_path(page: @sitemap.page), rel: 'canonical' }

    - if @sitemap.second_page?
      %link{ href: sitemap_path, rel: 'prev' }
    - elsif !@sitemap.first_page?
      %link{ href: url_for(page: @sitemap.prev_page), rel: 'prev' }

    - unless @sitemap.last_page?
      %link{ href: url_for(page: @sitemap.next_page), rel: 'next' }

.view

  %h1= t('workarea.storefront.sitemaps.heading')

  - cache @sitemap, expires_in: Workarea.config.cache_expirations.sitemap_fragment_cache do
    - unless @sitemap.results.any?
      %p= t('workarea.storefront.sitemaps.none_found')
    - else
      %ul.sitemap
        - @sitemap.results.each do |taxon|
          - name = taxon.ancestors_and_self.map(&:name).join(' > ')
          %li.sitemap__item= link_to name, storefront_path_for(taxon), class: 'sitemap__link'
      - if @sitemap.total_pages > 1
        = render 'workarea/storefront/sitemaps/pagination', collection: @sitemap.taxons

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.5.27 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.26 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.4.45 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.25 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.23 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.4.44 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.22 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.4.43 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.21 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.4.42 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.20 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.4.41 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.19 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.4.40 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.18 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.4.39 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.17 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.4.38 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.5.16 app/views/workarea/storefront/sitemaps/show.html.haml
workarea-storefront-3.4.37 app/views/workarea/storefront/sitemaps/show.html.haml