Commit d7698aae141f42ccf66b39e53776f119178028c5
1 parent
bc734b35
Exists in
master
and in
29 other branches
ActionItem862: not displaying links for disabled enterprises
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/helpers/catalog_helper.rb
| ... | ... | @@ -11,7 +11,7 @@ include DisplayHelper |
| 11 | 11 | content_tag('h3', link_to_product(product)) + |
| 12 | 12 | content_tag('ul', |
| 13 | 13 | (product.price ? content_tag('li', _('Price: %s') % ( "%.2f" % product.price), :class => 'product_price') : '') + |
| 14 | - content_tag('li', link_to_category(product.product_category), :class => 'product_category') | |
| 14 | + content_tag('li', profile.enabled? ? link_to_category(product.product_category) : product.product_category, :class => 'product_category') | |
| 15 | 15 | ) + |
| 16 | 16 | (product.description ? content_tag('div', txt2html(product.description), :class => 'description') : tag('br', :style => 'clear:both')), |
| 17 | 17 | :class => 'product') | ... | ... |
app/helpers/display_helper.rb
| ... | ... | @@ -2,7 +2,7 @@ module DisplayHelper |
| 2 | 2 | |
| 3 | 3 | def link_to_product(product, opts={}) |
| 4 | 4 | return _('No product') unless product |
| 5 | - link_to content_tag( 'span', product.name ), | |
| 5 | + link_to_if product.enterprise.enabled?, content_tag( 'span', product.name ), | |
| 6 | 6 | product.enterprise.generate_url(:controller => 'catalog', :action => 'show', :id => product), |
| 7 | 7 | opts |
| 8 | 8 | end | ... | ... |