ref: master
plugins/consumers_coop/lib/consumers_coop_plugin/base.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 31 |
class ConsumersCoopPlugin::Base < Noosfero::Plugin def stylesheet? true end def js_files ['consumers_coop'].map{ |j| "javascripts/#{j}" } end def control_panel_buttons profile = context.profile return unless profile.community? or profile.consumers_coop_settings.enabled { title: I18n.t('consumers_coop_plugin.lib.plugin.name'), icon: 'consumers-coop', url: {controller: :consumers_coop_plugin_myprofile, profile: profile.identifier, action: :settings} } end def self.plugin_name I18n.t('consumers_coop_plugin.lib.plugin.name') end def self.plugin_description I18n.t('consumers_coop_plugin.lib.plugin.description') end def self.extra_blocks { ConsumersCoopPlugin::ConsumersCoopMenuBlock => {type: [Community]} } end end |