Merge Request #7
← To merge requests
From
r4_add_portal_suggest_values_in_software_statistics_block
into
r4
R4 add portal suggest values in software statistics block
Commits (6)
-
Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com> Signed-off-by: Simiao Carvalho <simiaosimis@gmail.com> Signed-off-by: Thiago Ribeiro <thiagitosouza@gmail.com>
-
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Simiao Carvalho <simiaosimis@gmail.com> Signed-off-by: Tallys Martins <tallysmartins@gmail.com>
-
Signed-off-by: brenddongontijo <brenddongontijo@msn.com> Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Pedro de Lyra <pedrodelyra@gmail.com> Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com> Signed-off-by: Simiao Carvalho <simiaosimis@gmail.com> Signed-off-by: Victor Matias Navarro <victor.matias.navarro@gmail.com>
Showing
9 changed files
Show diff stats
db/migrate/20150814185902_add_people_benefited_and_saved_value_to_create_community_rating.rb
0 → 100644
... | ... | @@ -0,0 +1,11 @@ |
1 | +class AddPeopleBenefitedAndSavedValueToCreateCommunityRating < ActiveRecord::Migration | |
2 | + def up | |
3 | + add_column :community_ratings, :people_benefited, :integer | |
4 | + add_column :community_ratings, :saved_value, :decimal | |
5 | + end | |
6 | + | |
7 | + def down | |
8 | + remove_column :community_ratings, :people_benefited | |
9 | + remove_column :community_ratings, :saved_value | |
10 | + end | |
11 | +end | ... | ... |
views/box_organizer/_statistic_block.html.erb
1 | 1 | <div id='edit-softwares-block'> |
2 | + <% suggestion_benefited_people = @block.owner.community_ratings.collect{|community_rating| community_rating.people_benefited.to_f}.inject(:+) || 0.0 %> | |
3 | + <% suggestion_saved_resources = @block.owner.community_ratings.collect{|community_rating| community_rating.saved_value.to_f}.inject(:+) || 0.0 %> | |
4 | + | |
2 | 5 | <%= labelled_form_field _('Benefited People'), text_field(:block, :benefited_people) %> |
6 | + <p> <%= _("Portal suggested value: ") %> <span> <%= "%d" % (suggestion_benefited_people) %> <span> </p> | |
3 | 7 | <%= labelled_form_field _('Saved Resources'), text_field(:block, :saved_resources) %> |
8 | + <p> <%= _("Portal suggested value: ") %> <span> <%= "R$%.2f" % (suggestion_saved_resources) %> <span> </p> | |
4 | 9 | </div> |
5 | 10 | ... | ... |
views/comments_extra_fields.html.erb
... | ... | @@ -10,12 +10,12 @@ |
10 | 10 | <div class="comments-software-people-benefited"> |
11 | 11 | <%= label_tag "comments_people_benefited", _("Number of Beneficiaries")%> |
12 | 12 | <span class="star-tooltip" title="Quantidade de pessoas beneficiadas com a utilização do software"></span> |
13 | - <%= text_field_tag "comments[people_benefited]", "" %> | |
13 | + <%= text_field_tag "community_rating[people_benefited]", "" %> | |
14 | 14 | </div> |
15 | 15 | |
16 | 16 | <div class="comments-software-saved-values"> |
17 | 17 | <%= label_tag "comments_saved_value", _("Saved resources")%> |
18 | 18 | <span class="star-tooltip" title="Valores em “Real” economizados com a utilização do software"></span> |
19 | - <%= text_field_tag "comments[saved_value]", "", :placeholder=>"R$"%> | |
19 | + <%= text_field_tag "community_rating[saved_value]", "", :placeholder=>"R$"%> | |
20 | 20 | </div> |
21 | 21 | </div> | ... | ... |
views/communities_ratings_extra_fields_show_data.html.erb
1 | 1 | <div class="aditional-informations"> |
2 | 2 | <div class="comments-people-benefited"> |
3 | - <span>People benefited :</span> <%= user_rating.comment.people_benefited unless user_rating.comment.nil? %> | |
3 | + <span>People benefited :</span> <%= user_rating.people_benefited unless user_rating.nil? %> | |
4 | 4 | </div> |
5 | 5 | |
6 | 6 | <div class="comments-saved-value"> |
7 | - <span>Saved Value :</span> <%= user_rating.comment.saved_value unless user_rating.comment.nil? %> | |
7 | + <span>Saved Value :</span> <%= user_rating.saved_value unless user_rating.nil? %> | |
8 | 8 | </div> |
9 | 9 | </div> |
10 | 10 | ... | ... |
views/search/_software_search_form.html.erb
... | ... | @@ -12,10 +12,12 @@ |
12 | 12 | <%= hidden_field_tag :filter, params[:filter] %> |
13 | 13 | |
14 | 14 | <%= labelled_radio_button _('Public Software'), :software_type, 'public_software', @public_software_selected, :id => "public_software_radio_button", :class => "project-software" %> |
15 | - <span class="doubts-catalog-software" title="<%= _('Public Software.') %>">?</span> | |
15 | + <span class="doubts-catalog-software" title="<%= _('Projects that have passed by the Avalia SPB process according to the requirements of IN 01/2011.') %>">?</span> | |
16 | + <!-- Projetos que passaram pelo processo do Avalia SPB de acordo com os requisitos da IN 01/2011. --> | |
16 | 17 | |
17 | 18 | <%= labelled_radio_button _('All'), :software_type, 'all', @all_selected, :id => "all_radio_button", :class => "project-software" %> |
18 | - <span class="doubts-catalog-software" title="<%= _('All.') %>">?</span> | |
19 | + <span class="doubts-catalog-software" title="<%= _('Projects included in the portal as cases provided by the IN 01/2011.') %>">?</span> | |
20 | + <!-- Projetos incluídos no portal, conforme casos previstos na IN 01/2011. --> | |
19 | 21 | |
20 | 22 | <div class="search-field"> |
21 | 23 | <span class="formfield"> | ... | ... |
-
mentioned in commit 1b31314403d69ddcea1ff71ee2eb7b686366d37d