Sha256: e0a42a0a6b1e7e05559adee9f2aef7887161d28bd7627ecfaed89ee2bf79f567

Contents?: true

Size: 906 Bytes

Versions: 4

Compression:

Stored size: 906 Bytes

Contents

- unless @letters.empty?
  %nav.navigation--letter{ aria:{ label: I18n.t('pugin.components.navigation-letter.aria_label') } }
    %ol
      %li{ data: { letter: 'all' }, class: ('active' unless local_assigns[:all_path]) }
        - if @letters.empty? || !local_assigns[:all_path]
          %span= I18n.t('pugin.components.navigation-letter.all').capitalize
        - else
          = link_to "#{I18n.t('pugin.components.navigation-letter.all').upcase}", send(all_path)
      - ('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, route_args: local_assigns.fetch(:route_args, []), letter: letter)
            - else
              %span= letter
          - else
            %span= letter

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pugin-1.3.0 app/views/pugin/components/_navigation-letter.haml
pugin-1.2.5 app/views/pugin/components/_navigation-letter.haml
pugin-1.2.4 app/views/pugin/components/_navigation-letter.haml
pugin-1.2.3 app/views/pugin/components/_navigation-letter.haml