Commit 9ee7fdc35ba302afc5cb07a56a465d1bb8a520cc
Exists in
master
and in
43 other branches
Merge branch 'master' of beta.softwarepublico.gov.br:softwarepublico/softwarepublico
Showing
7 changed files
with
29 additions
and
3 deletions
Show diff stats
src/colab-spb-theme-plugin/Makefile
src/colab-spb-theme-plugin/colab_spb_theme/templates/header_sisp.html
src/colab-spb-theme-plugin/colab_spb_theme/templates/header_spb.html
src/noosfero-spb/noosfero-spb-theme/css/community-pages.css
... | ... | @@ -1052,7 +1052,7 @@ float: left; |
1052 | 1052 | padding-bottom: 30px; |
1053 | 1053 | } |
1054 | 1054 | |
1055 | -.action-profile-members .box-1 .common-profile-list-block span{ | |
1055 | +.action-profile-members .box-1 .common-profile-list-block .profile-list-members span{ | |
1056 | 1056 | margin-right: 0px; |
1057 | 1057 | width: 90px; |
1058 | 1058 | height: 86px; | ... | ... |
src/noosfero-spb/software_communities/db/migrate/20160104170028_changing_software_statistics_from_block_to_software_info.rb
0 → 100644
... | ... | @@ -0,0 +1,22 @@ |
1 | +class ChangingSoftwareStatisticsFromBlockToSoftwareInfo < ActiveRecord::Migration | |
2 | + def up | |
3 | + select_all("SELECT * FROM software_infos").each do |software| | |
4 | + benefited_people = 0 | |
5 | + saved_resources = 0 | |
6 | + | |
7 | + select_all("SELECT * FROM tasks WHERE status=3 AND type='CreateOrganizationRatingComment' AND target_id=#{software['community_id']}").each do |task| | |
8 | + settings = YAML.load(task['data']) | |
9 | + organization_rating = select_one("SELECT * FROM organization_ratings WHERE id=#{settings[:organization_rating_id]}") | |
10 | + | |
11 | + benefited_people += organization_rating["people_benefited"].to_i | |
12 | + saved_resources += organization_rating["saved_value"].to_f | |
13 | + end | |
14 | + execute("UPDATE software_infos SET benefited_people=#{benefited_people}, saved_resources=#{saved_resources} WHERE id=#{software['id']}") | |
15 | + end | |
16 | + | |
17 | + end | |
18 | + | |
19 | + def down | |
20 | + execute("UPDATE software_infos SET benefited_people=0,saved_resources=0") | |
21 | + end | |
22 | +end | ... | ... |
src/noosfero-spb/software_communities/views/profile/_profile_members_list.html.erb