diff --git a/app/helpers/manage_products_helper.rb b/app/helpers/manage_products_helper.rb index 719fe18..d65d2d7 100644 --- a/app/helpers/manage_products_helper.rb +++ b/app/helpers/manage_products_helper.rb @@ -195,7 +195,12 @@ module ManageProductsHelper def display_qualifiers(product) data = '' product.product_qualifiers.each do |pq| - certified_by = pq.certifier ? _(' certified by %s') % link_to(pq.certifier.name, pq.certifier.link) : '' + certified_by = '' + certifier = pq.certifier + if certifier + certifier_name = certifier.link.blank? ? certifier.name : link_to(certifier.name, certifier.link) + certified_by = _(' certified by %s') % certifier_name + end data << content_tag('li', '✔ ' + pq.qualifier.name + certified_by, :class => 'product-qualifiers-item') end content_tag('ul', data, :id => 'product-qualifiers') diff --git a/app/views/manage_products/show.rhtml b/app/views/manage_products/show.rhtml index c44f7fe..88c0305 100644 --- a/app/views/manage_products/show.rhtml +++ b/app/views/manage_products/show.rhtml @@ -25,6 +25,6 @@ <% button_bar do %> - <%= button :back, _('Back to the product listing'), :action => 'index' %> + <%= button :back, _('Back to the product listing'), :controller => 'catalog', :action => 'index' %> <%= button :delete, _('Remove product or service'), {:action => 'destroy', :id => @product}, :class => 'requires-permission-manage_products', :style => 'display:none;' %> <% end %> diff --git a/test/functional/manage_products_controller_test.rb b/test/functional/manage_products_controller_test.rb index a0f9ed1..4638f3c 100644 --- a/test/functional/manage_products_controller_test.rb +++ b/test/functional/manage_products_controller_test.rb @@ -257,7 +257,7 @@ class ManageProductsControllerTest < Test::Unit::TestCase :descendant => { :tag => 'a', :attributes => { - :href => "/myprofile/#{enterprise.identifier}/manage_products", + :href => "/catalog/#{enterprise.identifier}", }, :content => /Back to the product listing/ } -- libgit2 0.21.2