Sha256: 84831facf0fc5c34500e05e9d48b66b48251540167f77900d554e72fe7e33d7d

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 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')
        - unless @product_categories_without_parent.empty?
          - 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

1 entries across 1 versions & 1 rubygems

Version Path
shoppe-1.1.2 app/views/shoppe/product_categories/index.html.haml