ref: master
plugins/sniffer/lib/sniffer_plugin.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
class SnifferPlugin < Noosfero::Plugin def self.plugin_name "Opportunity Sniffer" end def self.plugin_description _("Sniffs product suppliers and consumers near to your enterprise.") end def stylesheet? true end def control_panel_buttons buttons = [] # Disable it on CIRANAS while it is not useful if profile.enterprise? buttons.push( { :title => _("Consumer Interests"), :icon => 'consumer-interests', :url => {:controller => 'sniffer_plugin_myprofile', :action => 'edit'} } ) end buttons.push( { :title => _("Opportunities Sniffer"), :icon => 'sniff-opportunities', :url => {:controller => 'sniffer_plugin_myprofile', :action => 'search'}, :html_options => { data: {'skip-pjax' => true} } } ) if context.profile.enterprise? buttons end def self.extra_blocks { SnifferPlugin::InterestsBlock => {} } end end |