diff --git a/lib/ext/entities.rb b/lib/ext/entities.rb index cc712e6..0d9c2fe 100644 --- a/lib/ext/entities.rb +++ b/lib/ext/entities.rb @@ -5,7 +5,20 @@ module Noosfero module Entities class Person < Profile - expose :orientacao_sexual, :identidade_genero, :transgenero, :etnia, :points, :level, :gamification_plugin_level_percent + expose :orientacao_sexual, :identidade_genero, :transgenero, :etnia + + expose :points do |person, options| + person.points if person.respond_to?(:points) + end + + expose :level do |person, options| + person.level if person.respond_to?(:level) + end + + expose :gamification_plugin_level_percent do |person, options| + person.gamification_plugin_level_percent if person.respond_to?(:gamification_plugin_level_percent) + end + end end diff --git a/lib/juventude_plugin.rb b/lib/juventude_plugin.rb index 60bc0ca..f1a0ead 100644 --- a/lib/juventude_plugin.rb +++ b/lib/juventude_plugin.rb @@ -1,20 +1,20 @@ class JuventudePlugin < Noosfero::Plugin - def self.plugin_name - _('Juventude custom plugin') - end - - def self.plugin_description - _("Provide a plugin to juventude environment.") - end - - def self.api_mount_points - [JuventudePlugin::API] - end - - def control_panel_buttons - {:title => _('Generate Report'), :icon => 'report', :url => {:controller => 'juventude_plugin_myprofile', :action => :send_report}, :html_options => {:class => 'admin-report'}} if context.send(:current_person).is_admin? - - end +# def self.plugin_name +# _('Juventude custom plugin') +# end +# +# def self.plugin_description +# _("Provide a plugin to juventude environment.") +# end +# +# def self.api_mount_points +# [JuventudePlugin::API] +# end +# +# def control_panel_buttons +# {:title => _('Generate Report'), :icon => 'report', :url => {:controller => 'juventude_plugin_myprofile', :action => :send_report}, :html_options => {:class => 'admin-report'}} if context.send(:current_person).is_admin? +# +# end end -- libgit2 0.21.2