diff --git a/views/box_organizer/_statistic_block.html.erb b/views/box_organizer/_statistic_block.html.erb index 91bb032..c8c5061 100644 --- a/views/box_organizer/_statistic_block.html.erb +++ b/views/box_organizer/_statistic_block.html.erb @@ -1,5 +1,10 @@
+ <% suggestion_benefited_people = @block.owner.community_ratings.collect{|community_rating| community_rating.people_benefited.to_f}.inject(:+) || 0.0 %> + <% suggestion_saved_resources = @block.owner.community_ratings.collect{|community_rating| community_rating.saved_value.to_f}.inject(:+) || 0.0 %> + <%= labelled_form_field _('Benefited People'), text_field(:block, :benefited_people) %> +

<%= _("Portal suggested value: ") %> <%= "%d" % (suggestion_benefited_people) %>

<%= labelled_form_field _('Saved Resources'), text_field(:block, :saved_resources) %> +

<%= _("Portal suggested value: ") %> <%= "R$%.2f" % (suggestion_saved_resources) %>

-- libgit2 0.21.2