app/views/refinery/products/admin/categories/_form.html.erb
<%= form_for [refinery, :products_admin, @category],
:url => (refinery.products_admin_category_path(@category.nested_url) if @category.persisted?) do |f| %>
<%= render '/refinery/admin/error_messages',
:object => f.object,
:include_object_name => true %>
<%= render '/refinery/admin/locale_picker',
:current_locale => Globalize.locale %>
<div class='field'>
<%= f.label :title -%>
<%= f.text_field :title, :class => 'larger widest' -%>
</div>
<div class='field'>
<%= f.label :body -%>
<%= f.text_area :body, :rows => 20, :class => 'wymeditor widest' -%>
</div>
<div class='field'>
<%= f.label :photo -%>
<%= render '/refinery/admin/image_picker',
:f => f,
:field => :photo_id,
:image => @category.photo,
:toggle_image_display => false -%>
</div>
<div class='field'>
<span class='label_with_help'>
<%= f.label :parent_id, t('parent_category', :scope => 'activerecord.attributes.refinery/products/category') %>
</span>
<%= f.select :parent_id, parent_id_nested_set_options(@category), :include_blank => true %>
</div>
<div class='field'>
<%= f.label :promote -%>
<%= f.check_box :promote, :class => 'larger widest' -%>
</div>
<%= render '/refinery/admin/form_actions', :f => f,
:continue_editing => false,
:delete_title => t('delete', :scope => 'refinery.categories.admin.categories.category'),
:delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @category.title),
:cancel_url => refinery.products_admin_categories_path %>
<% end -%>