diff --git a/app/helpers/catalog_helper.rb b/app/helpers/catalog_helper.rb index 984b5b4..f2329fd 100644 --- a/app/helpers/catalog_helper.rb +++ b/app/helpers/catalog_helper.rb @@ -11,7 +11,7 @@ include DisplayHelper content_tag('h3', link_to_product(product)) + content_tag('ul', (product.price ? content_tag('li', _('Price: %s') % ( "%.2f" % product.price), :class => 'product_price') : '') + - content_tag('li', link_to_category(product.product_category), :class => 'product_category') + content_tag('li', profile.enabled? ? link_to_category(product.product_category) : product.product_category, :class => 'product_category') ) + (product.description ? content_tag('div', txt2html(product.description), :class => 'description') : tag('br', :style => 'clear:both')), :class => 'product') diff --git a/app/helpers/display_helper.rb b/app/helpers/display_helper.rb index 09d82bf..4b96489 100644 --- a/app/helpers/display_helper.rb +++ b/app/helpers/display_helper.rb @@ -2,7 +2,7 @@ module DisplayHelper def link_to_product(product, opts={}) return _('No product') unless product - link_to content_tag( 'span', product.name ), + link_to_if product.enterprise.enabled?, content_tag( 'span', product.name ), product.enterprise.generate_url(:controller => 'catalog', :action => 'show', :id => product), opts end -- libgit2 0.21.2