diff --git a/app/views/manage_products/_subcategories.rhtml b/app/views/manage_products/_subcategories.rhtml index 569cf88..1a4b1c8 100644 --- a/app/views/manage_products/_subcategories.rhtml +++ b/app/views/manage_products/_subcategories.rhtml @@ -1,10 +1,15 @@

<%= _('Current category:') %>

-<%= hidden_field_tag 'product[product_category_id]', @current_category.id %> +<%= hidden_field_tag 'product[product_category_id]', @current_category ? @current_category.id : nil %> <% categories = [@current_category] categories.push(@current_category) while @current_category and @current_category = @current_category.parent %> -<%= categories.compact.reverse.map{|i| link_to(i.name, {}, :class => 'select-current-category-link')}.join(' → ') %> +<%= categories.compact.reverse.map{|i| + link_to_remote(i.name, + :update => "subcategories", + :url => { :action => 'update_subcategories', :id => i, :loaded => visual_effect(:highlight, "subcategories") }, + :class => 'select-current-category-link')}.join(' → ') +%> <% unless @categories.empty? %>

<%= _('Select a subcategory:') %>

-- libgit2 0.21.2