- @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)

- @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)

Fix bug where table body is not same width as header when no product category is added
Fix bug where table body is not same width as header when no product category is added
