Commit 9049f9e37f889dce5a219b3a5c779ce57ea8cd66
1 parent
d0c953ce
Exists in
master
and in
20 other branches
organization-ratings: add hotspot for rating creation
Showing
2 changed files
with
5 additions
and
0 deletions
Show diff stats
plugins/organization_ratings/controllers/organization_ratings_plugin_profile_controller.rb
@@ -43,6 +43,7 @@ class OrganizationRatingsPluginProfileController < ProfileController | @@ -43,6 +43,7 @@ class OrganizationRatingsPluginProfileController < ProfileController | ||
43 | rating.value = params[:organization_rating_value] if params[:organization_rating_value] | 43 | rating.value = params[:organization_rating_value] if params[:organization_rating_value] |
44 | 44 | ||
45 | if rating.save | 45 | if rating.save |
46 | + @plugins.dispatch(:organization_ratings_plugin_rating_created, rating, params) | ||
46 | create_rating_comment(rating) | 47 | create_rating_comment(rating) |
47 | session[:notice] = _("%s successfully rated!") % profile.name | 48 | session[:notice] = _("%s successfully rated!") % profile.name |
48 | else | 49 | else |
plugins/organization_ratings/lib/organization_ratings_plugin.rb
@@ -25,6 +25,10 @@ class OrganizationRatingsPlugin < Noosfero::Plugin | @@ -25,6 +25,10 @@ class OrganizationRatingsPlugin < Noosfero::Plugin | ||
25 | def organization_ratings_plugin_extra_fields_show_data user_rating | 25 | def organization_ratings_plugin_extra_fields_show_data user_rating |
26 | nil | 26 | nil |
27 | end | 27 | end |
28 | + | ||
29 | + def organization_ratings_plugin_rating_created rating, params | ||
30 | + nil | ||
31 | + end | ||
28 | end | 32 | end |
29 | 33 | ||
30 | # Plugin Hotspot to display the average rating | 34 | # Plugin Hotspot to display the average rating |