Merge Request #84

Merged
softwarepublico/softwarepublico!84
Created by Gabriel Silva

Software Community and Gov User improvements

Improvements on Organiation Ratings plugin (related to gov_user and software_communities)

  • Move software statistics from blocks table to softwares table
  • Update methods called on view to display software statistics
  • Software now automagically sums saved_resources and benefited people when the task is accepted
  • Adds message to warn that a rating has an institution with active ratings
  • Adds one hotspot to insert content on ratings task and another one to ratings container (used on ratings page and ratings block)
  • Removes statistic block fields that are no longer used
  • Adds number_to_human method to get better visualization for numbers
  • Makes the software tasks page closer to the prototype (changes in the divs, sizes and aligns).
  • Fixed broken tests on software_profile_editor_controller
Assignee: Daniela Feitosa
Milestone: None

Merged by Daniela Feitosa

Source branch has been removed
Commits (3)
  • Dylan Guedes
     
  • - Adds message to warn that a rating has an institution with active ratings
    - Adds one hotspot to insert content on ratings task and another one to ratings container (used on
    ratings page and ratings block)
    - Adds number_to_human method to get better visualization for numbers
    - Makes the software tasks page closer to the prototype (changes in the divs, sizes and aligns).
    
    Signed-off-by: Dylan Guedes <djmgguedes@gmail.com>
    Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com>
    Signed-off-by: Gustavo Coelho <gust.rod.coelho@gmail.com>
    Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
    Signed-off-by: Pedro de Lyra <pedrodelyra@gmail.com>
    Signed-off-by: Tallys Martins <tallysmartins@gmail.com>
    Signed-off-by: Thiago Ribeiro <thiagitosouza@gmail.com>
    Gabriel Silva
     
  • - Move software statistics from blocks table to softwares table
    - Update methods called on view to display software statistics
    - Software now automagically sums saved_resources and benefited people  when the task is accepted
    - Adds one hotspot to insert content on ratings task and another one to ratings container (used on
    ratings page and ratings block)
    - Removes statistic block fields that are no longer used
    - Adds number_to_human method to get better visualization for numbers
    - Makes the software tasks page closer to the prototype (changes in the divs, sizes and aligns).
    - Fixed broken tests on software_profile_editor_controller
    
    Signed-off-by: Dylan Guedes <djmgguedes@gmail.com>
    Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com>
    Signed-off-by: Gustavo Coelho <gust.rod.coelho@gmail.com>
    Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
    Signed-off-by: Pedro de Lyra <pedrodelyra@gmail.com>
    Signed-off-by: Tallys Martins <tallysmartins@gmail.com>
    Signed-off-by: Thiago Ribeiro <thiagitosouza@gmail.com>
    Gabriel Silva
     
5 participants
  • 79ebee40dd44c661fc4ad27b3656be68?s=40&d=identicon
    Álvaro Fernando Matos de Souza @alvarofernandoms

    Added 1 new commit:

    • 4b450038 - New style for software review moderation page
    Choose File ...   File name...
    Cancel
  • B6dd822230d315124f3352380142d943?s=40&d=identicon
    Dylan Guedes @dylanguedes

    Added 1 new commit:

    • 47c22ee7 - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • B6dd822230d315124f3352380142d943?s=40&d=identicon
    Dylan Guedes @dylanguedes

    Added 1 new commit:

    • 8c218b42 - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva @gabrielssilva

    Added 3 new commits:

    • 2890d7a8 - Software Communities plugin rating improvements
    • a4f5818b - Organiztion Ratings plugin improvements
    • 3d42d2b1 - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva @gabrielssilva

    Added 2 new commits:

    • bd661e1a - Gov User plugin rating improvements
    • d05b613e - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • 800e3af93350753db9dee1864cef10ff?s=40&d=identicon
    Thiago Ribeiro @thiago

    Added 3 new commits:

    • 6aa39a4c - Software Communities plugin rating improvements
    • 870bb27c - Gov User plugin rating improvements
    • 0b9ecfcd - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva @gabrielssilva

    Added 3 new commits:

    • afbf7a84 - Software Communities plugin rating improvements
    • 8dd68f13 - Gov User plugin rating improvements
    • 223ef36a - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva @gabrielssilva

    Added 3 new commits:

    • 489447fa - Software Communities plugin rating improvements
    • bf3b1f06 - Gov User plugin rating improvements
    • f21eea08 - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • 800e3af93350753db9dee1864cef10ff?s=40&d=identicon
    Thiago Ribeiro @thiago

    Added 60 new commits:

    • fb8bf07a - Updates kalibro-configurations spec
    • dbdf7b11 - Added password validator for gitlab
    • dce5c218 - Add modal to create institution in use report.
    • 69653c91 - API improvements for spb plugins
    • 353a9563 - Merge branch 'api_for_colab' into 'master'
    • c31fef04 - Add software communities endpoint to API
    • f093099b - Merge branch 'software_communities_api' into 'master'
    • dc4912df - Only admin can edit if software is public
    • 73f3aa5b - Merge branch 'admin_public_software_fields_edit' into 'master'
    • e1f7033e - doc: support for push with HTTPS and multiples repos
    • 93a39ae6 - Merge branch 'update_doc' into 'master'
    • 6aacc037 - Regenerate private_token when token is expired.
    • d828cc68 - Merge branch 'noosfero_regenerate_expired_token' into 'master'
    • dfbf2427 - Unified release process
    • 413e0d3b - Merge branch 'release-process-v2'
    • 45340488 - Added masks for use report fields
    • 22cd99c6 - Merge branch 'refactor_saved_value' into 'master'
    • fe196cc3 - Created migration to remove softwares without community
    • aedd76a8 - Merge branch 'bug_bloco_sei' into 'master'
    • 4c195680 - Add institution in social menu.
    • 89190395 - Merge branch 'add_institution_in_social_menu' into 'master'
    • cf86f45e - colab_test: fix "settings is in place" test
    • dfd6263e - Refactor software_communities.
    • 3ab32308 - Merge branch 'fix_create_software_without_community' into 'master'
    • 1326ae47 - Adding namespace to app.py
    • e35b38be - Merge branch 'removing_namespace' into 'master'
    • 76ab812b - Allow Colab to request Gitlab API using self signed certs
    • 73f57c97 - Adding tutorial for environment with noosfero+colab - #413
    • 233bad74 - Fixing theme on search for institutions - #416
    • 94738abb - Adjustments in the area of blog and blog tab - #437
    • c0192640 - Formatting question mark for use report - #418
    • 827d1dce - Alignment posts 2,3 and 4 blog page - #437
    • e69828c8 - Fixed height image for the home area of news - #329
    • 47a88afc - Fixes of sprint 40
    • 30933c38 - Add software event block css
    • 9181939c - improve solution of image height overflow on homepage's news section
    • 65888ef9 - fix image margin on first page of blog
    • 829ddd20 - hide read-more link of each post on profile blog tab
    • 6fb4392c - tmp solution of report use - govuser fields for development modification on plugin view
    • 39a81339 - Additional improvements on search institutions page
    • 80febdec - hide border bottom from last item on event block
    • a11b751e - Merge branch 'design_41' into 'master'
    • 824fdd6d - solve conflicts - that was only redundancy - on event block style
    • c73f1bbf - Software events block, only display on profile page in - Need to develop
    • 01abb668 - fix agenda button opacity on calendar page and display event block on edit sideblocks page
    • 83de26da - Merge branch 'design_42' into 'master'
    • c896d5f4 - ajust details for average rating on catalog
    • 6f2cc74e - Add rating and favorite filter to software catalog
    • 536d9288 - apply software catalog average rating design
    • ca88bc8c - Merge branch 'software_rating_on_catalog' into 'master'
    • f77c83ab - Fix css/html in institution modal
    • b7d62204 - Update gov_user translations.
    • 517180c6 - Merge branch 'create_institution_bootstrap_modal' into 'master'
    • 76337877 - Merge branch 'master' of beta.softwarepublico.gov.br:softwarepublico/softwarepublico
    • b70e437f - Update kalibro-configurations and deps versions
    • 2f40b2e4 - Bump kalibro-configuration-deps release
    • f50cbb93 - Fix kalibro-processor-deps version and release
    • 6e93d102 - Software Communities plugin rating improvements
    • fd35a912 - Gov User plugin rating improvements
    • 6e887087 - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • 0743c2eb05e68c92baa5f8c498995a20?s=40&d=identicon
    Daniela Feitosa started a discussion on the outdated diff
    last updated by Daniela Feitosa
    src/noosfero-spb/software_communities/db/migrate/20151116140329_move_software_statistics_from_block_to_software_info.rb 0 → 100644
      1 +class MoveSoftwareStatisticsFromBlockToSoftwareInfo < ActiveRecord::Migration
      2 + def up
      3 + select_all("SELECT * FROM software_infos").each do |software|
    1
    • 0743c2eb05e68c92baa5f8c498995a20?s=40&d=identicon
      Daniela Feitosa @daniela

      Só o "id" do software é usado, então o select pode ser só SELECT id FROM software_infos

      Choose File ...   File name...
      Cancel
    0743c2eb05e68c92baa5f8c498995a20?s=40&d=identicon
    Daniela Feitosa started a discussion on the outdated diff
    last updated by Daniela Feitosa
    src/noosfero-spb/software_communities/db/migrate/20151116140329_move_software_statistics_from_block_to_software_info.rb 0 → 100644
      1 +class MoveSoftwareStatisticsFromBlockToSoftwareInfo < 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'").each do |task|
    1
    • 0743c2eb05e68c92baa5f8c498995a20?s=40&d=identicon
      Daniela Feitosa @daniela

      O select pode ser só SELECT data FROM tasks WHERE status=3 AND type='CreateOrganizationRatingComment'

      Choose File ...   File name...
      Cancel
    0743c2eb05e68c92baa5f8c498995a20?s=40&d=identicon
    Daniela Feitosa started a discussion on the outdated diff
    last updated by Daniela Feitosa
    src/noosfero-spb/software_communities/db/migrate/20151116140329_move_software_statistics_from_block_to_software_info.rb 0 → 100644
      1 +class MoveSoftwareStatisticsFromBlockToSoftwareInfo < 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'").each do |task|
      8 + settings = YAML.load(task['data'])
      9 + organization_rating = select_all("SELECT * FROM organization_ratings WHERE id=#{settings[:organization_rating_id]}").first
    1
    • 0743c2eb05e68c92baa5f8c498995a20?s=40&d=identicon
      Daniela Feitosa @daniela

      Como você só precisa retornar um rating, pode colocar limite no select para não ter que usar o .first: SELECT * FROM organization_ratings WHERE id=#{settings[:organization_rating_id]} LIMIT 1

      Choose File ...   File name...
      Cancel
    0743c2eb05e68c92baa5f8c498995a20?s=40&d=identicon
    Daniela Feitosa started a discussion on the outdated diff
    last updated by Daniela Feitosa
    src/noosfero-spb/gov_user/views/organization_ratings_task_extra_fields_show_institution.html.erb 0 → 100644
      1 +<% if user_rating.institution %>
      2 +<div class="aditional-informations">
      3 + <div class="comments-user-institution">
      4 + <span><%=_("Institution")%> :<span> <%= user_rating.institution.name %>
    1
  • 800e3af93350753db9dee1864cef10ff?s=40&d=identicon
    Thiago Ribeiro @thiago

    Added 3 new commits:

    • 32df146e - Software Communities plugin rating improvements
    • fc0c1093 - Gov User plugin rating improvements
    • acd2fbca - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • 0743c2eb05e68c92baa5f8c498995a20?s=40&d=identicon
    Daniela Feitosa started a discussion on the outdated diff
    last updated by Daniela Feitosa
    src/noosfero-spb/software_communities/views/profile_editor/edit_software_community.html.erb
    78 78 <% if user && user.has_permission?('destroy_profile', profile) && !@first_edit %>
    79 79 <% button_bar(:id => 'delete-profile') do %>
    80 80 <%= button(:remove, _('Delete software and community'), {:action => :destroy_profile}) %>
    81   - <% if environment.admins.include?(current_person) %>
    82   - <% if profile.visible? %>
      81 + <% if user.is_admin? %>
      82 + <% iprofile.visible? %>
    1
  • 800e3af93350753db9dee1864cef10ff?s=40&d=identicon
    Thiago Ribeiro @thiago

    Added 3 new commits:

    • 53ef4b90 - Software Communities plugin rating improvements
    • 15a66159 - Gov User plugin rating improvements
    • 083c4e4a - Changes box size of task status list, changes task message size.
    Choose File ...   File name...
    Cancel
  • 0743c2eb05e68c92baa5f8c498995a20?s=40&d=identicon
    Daniela Feitosa @daniela
    Choose File ...   File name...
    Cancel
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva started a discussion on commit 53ef4b90
    last updated by Gabriel Silva
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva @gabrielssilva
    Choose File ...   File name...
    Cancel
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva @gabrielssilva

    mentioned in commit 5f605edf575fd8627fea2df965cd52cb7d3ed669

    Choose File ...   File name...
    Cancel
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva started a discussion on commit 15a66159
    last updated by Gabriel Silva
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva @gabrielssilva
    Choose File ...   File name...
    Cancel
  • Df604377056e7cd36436e90bf2b9af70?s=40&d=identicon
    Gabriel Silva @gabrielssilva

    mentioned in commit 8511989a2d030b1390b24c1b68ba75b3e6885281

    Choose File ...   File name...
    Cancel
  • B6dd822230d315124f3352380142d943?s=40&d=identicon
    Dylan Guedes started a discussion on commit 083c4e4a
    last updated by Dylan Guedes
  • B6dd822230d315124f3352380142d943?s=40&d=identicon
    Dylan Guedes @dylanguedes
    Choose File ...   File name...
    Cancel
  • B6dd822230d315124f3352380142d943?s=40&d=identicon
    Dylan Guedes @dylanguedes

    mentioned in commit e7c60eda2dc24a888a6b9d6f74d4cad37ec89f7b

    Choose File ...   File name...
    Cancel