= form_for @product_category do |f| = f.error_messages = field_set_tag t('kkt_shoppe.product_category.category_details') do %dl %dt= f.label :name, t('kkt_shoppe.product_category.name') %dd= f.text_field :name, :class => 'focus text' .splitContainer %dl.half %dt= f.label :permalink, t('kkt_shoppe.product_category.permalink') %dd= f.text_field :permalink, :class => 'text' %dl.half %dt   %dd.checkbox = f.check_box :permalink_includes_ancestors = f.label :permalink_includes_ancestors, t('kkt_shoppe.product_category.permalink_includes_ancestors') %dl.cleared %dt= f.label :description, t('kkt_shoppe.product_category.description') %dd= f.text_area :description, :class => 'text' = field_set_tag t('kkt_shoppe.product_category.nesting.category_nesting') do %dl %dt= f.label :parent_id, t('kkt_shoppe.product_category.nesting.category_parent') %dd= f.collection_select :parent_id, KktShoppe::ProductCategory.except_descendants(@product_category).ordered, :id, :name, {:include_blank => t('kkt_shoppe.product_category.nesting.blank_option')}, {:class => 'chosen'} %dl %dt= f.label :child_ids, t('kkt_shoppe.product_category.nesting.hierarchy') %dd %table.categoryChildren %tbody - if @product_category.children.count == 0 %tr %td = t('kkt_shoppe.product_category.nesting.no_children') - else %tr %td = "#{@product_category.name} (#{t('kkt_shoppe.product_category.nesting.current_category')})" = nested_product_category_rows(@product_category, current_category = @product_category, link_to_current = false, relative_depth = @product_category.depth) = field_set_tag t('kkt_shoppe.product_category.attachments') do %dl %dt= f.label :image_file, t('kkt_shoppe.product_category.image') %dd = attachment_preview @product_category.image %p= f.file_field :image_file %p.submit - unless @product_category.new_record? %span.right= link_to t('kkt_shoppe.delete') , @product_category, :class => 'button purple', :method => :delete, :data => {:confirm => t('kkt_shoppe.product_category.delete_confirmation') } = f.submit t('kkt_shoppe.submit'), :class => 'button green'