Sha256: 4b8331228a0b6969eb855d09255470ac7268bed20bd3bd4b10577bda4248b20a

Contents?: true

Size: 1.05 KB

Versions: 5

Compression:

Stored size: 1.05 KB

Contents

- @page_title = t('shoppe.product_category.product_categories')

= content_for :header do
  %p.buttons=link_to t('shoppe.product_category.new_category'), :new_product_category, :class => 'button green'
  %h2.products= t('shoppe.product_category.product_categories')

.table
  %table.data
    %thead
      %tr
        %th= t('shoppe.product_category.name')
        - I18n.available_locales.each do |i|
          %th
    %tbody
      - if @product_categories_without_parent.empty?
        %tr.empty
          %td= t('shoppe.product_category.no_categories')
      - else
        - for cat in @product_categories_without_parent
          %tr
            %td= link_to cat.name, [:edit, cat]
            - I18n.available_locales.each do |i|
              - if cat.translations.where(locale: i).count >= 1
                %td= link_to i, edit_product_category_localisation_path(cat, cat.translations.where(locale: i).first.id)
              - else
                %td= link_to i, new_product_category_localisation_path(cat, locale_field: i)
          = nested_product_category_rows(cat)

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
shoppe-1.1.1 app/views/shoppe/product_categories/index.html.haml
shoppe-1.1.0 app/views/shoppe/product_categories/index.html.haml
shoppe-1.0.9 app/views/shoppe/product_categories/index.html.haml
shoppe-1.0.8 app/views/shoppe/product_categories/index.html.haml
kylekthompson-shoppe-1.0.7 app/views/shoppe/product_categories/index.html.haml