diff --git a/app/views/search/_product.rhtml b/app/views/search/_product.rhtml index 71fb2c4..591ffa2 100644 --- a/app/views/search/_product.rhtml +++ b/app/views/search/_product.rhtml @@ -21,18 +21,29 @@ <% if product.inputs.count > product.inputs.collect(&:is_from_solidarity_economy).count(nil) %> <% se_i = t_i = 0 %> <% product.inputs.each{ |i| t_i += 1; se_i += 1 if i.is_from_solidarity_economy } %> - <% p = case (se_i.to_f/t_i)*100 when 0..24.999 then ["0", _("0%")]; when 25..49.999 then ["25", _("25%")]; when 50..74.999 then ["50", _("50%")]; when 75..100 then ["75", _("100%")]; end %> + <% p = case (se_i.to_f/t_i)*100 + when 0..24.999 then ["0", _("")]; + when 25..49.999 then ["0", _("25%")]; + when 50..74.999 then ["25", _("50%")]; + when 75..99.999 then ["50", _("75%")]; + when 100 then ["75", _("100%")]; + end %>
<% end %> - <% if product.inputs.count == product.inputs.collect(&:has_price_details?).count(true) %> + <% if product.price_described? %> <% title = product.inputs.map{ |i| '