Sha256: 083216d84252562947466c38f3334bfe851370fbce214f683497c0e27d392bb5

Contents?: true

Size: 788 Bytes

Versions: 3

Compression:

Stored size: 788 Bytes

Contents

%p
  A to Z -
  = params[:letter].present? ? "#{I18n.t('pugin.components.navigation-letter.showing_results')} #{params[:letter].capitalize}" : "#{I18n.t('pugin.components.navigation-letter.select_letter')}"
%nav.navigation--letter{ aria:{ label: I18n.t('pugin.components.navigation-letter.aria_label') } }
  %ul
    - ('a'..'z').each do |letter|
      %li{ data: { letter: letter }, class: ('active' if (params[:letter] == letter)) }
        - if @letters.include?(letter.upcase)
          - unless letter == params[:letter]
            = navigation_link(route_symbol: route_symbol, letter: letter, primary_id: local_assigns.fetch(:primary_id, nil), secondary_id: local_assigns.fetch(:secondary_id, nil))
          - else
            %span= letter
        - else 
          %span= letter

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pugin-0.7.0 app/views/pugin/components/_navigation-letter.haml
pugin-0.6.4 app/views/pugin/components/_navigation-letter.haml
pugin-0.6.3 app/views/pugin/components/_navigation-letter.haml