Commit cc5e18e11741a26eb22f413f79414a00f09ce534

Authored by Diego Camarinha
Committed by Paulo Meireles
1 parent 4e192d90

[Mezuro] Added content types to mezuro_plugin.rb

Showing 1 changed file with 10 additions and 2 deletions   Show diff stats
plugins/mezuro/lib/mezuro_plugin.rb
... ... @@ -14,11 +14,19 @@ class MezuroPlugin < Noosfero::Plugin
14 14 _("A metric analizer plugin.")
15 15 end
16 16  
  17 + def content_types
  18 + if context.profile.is_a?(Community)
  19 + MezuroPlugin::ProjectContent
  20 + else
  21 + MezuroPlugin::ConfigurationContent
  22 + end
  23 + end
  24 +
17 25 def control_panel_buttons
18 26 if context.profile.is_a?(Community)
19   - {:title => _('Mezuro Project'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ProjectContent'}, :icon => 'mezuro' }
  27 + {:title => _('Mezuro project'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ProjectContent'}, :icon => 'mezuro' }
20 28 else
21   - {:title => _('Mezuro Configuration'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ConfigurationContent'}, :icon => 'mezuro' }
  29 + {:title => _('Mezuro configuration'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ConfigurationContent'}, :icon => 'mezuro' }
22 30 end
23 31 end
24 32  
... ...