Commit 45a0bdf7aa3b9d017f09df520cf4cead2775df90
1 parent
b36676dd
Exists in
master
and in
29 other branches
ActionItem862: fixing link for product when enterprise is disabled
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
app/helpers/display_helper.rb
@@ -2,8 +2,9 @@ module DisplayHelper | @@ -2,8 +2,9 @@ module DisplayHelper | ||
2 | 2 | ||
3 | def link_to_product(product, opts={}) | 3 | def link_to_product(product, opts={}) |
4 | return _('No product') unless product | 4 | return _('No product') unless product |
5 | - link_to_if product.enterprise.enabled?, content_tag( 'span', product.name ), | ||
6 | - product.enterprise.generate_url(:controller => 'catalog', :action => 'show', :id => product), | 5 | + target = product.enterprise.enabled? ? product.enterprise.generate_url(:controller => 'catalog', :action => 'show', :id => product) : '#' |
6 | + link_to content_tag( 'span', product.name ), | ||
7 | + target | ||
7 | opts | 8 | opts |
8 | end | 9 | end |
9 | 10 |