Commit 624d235992bbf8db1f6736b1a8e8dbe82f41e0a5
1 parent
644913c2
Exists in
master
and in
29 other branches
Fix for solidarity economy percentage on product search view
Showing
2 changed files
with
4 additions
and
5 deletions
Show diff stats
app/models/product.rb
app/views/search/_product.rhtml
... | ... | @@ -23,10 +23,10 @@ |
23 | 23 | <% product.inputs.each{ |i| t_i += 1; se_i += 1 if i.is_from_solidarity_economy } %> |
24 | 24 | <% p = case (se_i.to_f/t_i)*100 |
25 | 25 | when 0..24.999 then ["0", _("")]; |
26 | - when 25..49.999 then ["0", _("25%")]; | |
27 | - when 50..74.999 then ["25", _("50%")]; | |
28 | - when 75..99.999 then ["50", _("75%")]; | |
29 | - when 100 then ["75", _("100%")]; | |
26 | + when 25..49.999 then ["25", _("25%")]; | |
27 | + when 50..74.999 then ["50", _("50%")]; | |
28 | + when 75..99.999 then ["75", _("75%")]; | |
29 | + when 100 then ["100", _("100%")]; | |
30 | 30 | end %> |
31 | 31 | <div class="search-product-percentage-from-solidarity-economy search-product-ecosol-percentage-icon-<%=p[0]%>" title="<%=_('Percentage of inputs from solidarity economy')%>"> |
32 | 32 | <%= p[1] %> | ... | ... |