Commit ab2031c319ad50d4f2cd407e3a9c434a6de6e987
1 parent
3c93f5c0
Exists in
master
and in
3 other branches
Insert user institution into community rating list
Signed-off-by: Brenddon Gontijo <brenddongontijo@msn.com> Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>
Showing
2 changed files
with
19 additions
and
0 deletions
Show diff stats
lib/gov_user_plugin.rb
... | ... | @@ -237,6 +237,17 @@ class GovUserPlugin < Noosfero::Plugin |
237 | 237 | Proc::new do render :file => 'comments_extra_field' end |
238 | 238 | end |
239 | 239 | |
240 | + def communities_ratings_plugin_extra_fields_show_data user_rating | |
241 | + is_admin = environment.admins.include?(current_user.person) | |
242 | + | |
243 | + if is_admin and context.profile.software? | |
244 | + Proc::new { | |
245 | + render :file => 'communities_ratings_extra_fields_show_institution', | |
246 | + :locals => {:user_rating => user_rating} | |
247 | + } | |
248 | + end | |
249 | + end | |
250 | + | |
240 | 251 | private |
241 | 252 | |
242 | 253 | def call_model_transaction(model,name) | ... | ... |
views/communities_ratings_extra_fields_show_institution.html.erb
0 → 100644