From 0ffedd2d6ef19629b32ea80e6014c94746950e50 Mon Sep 17 00:00:00 2001 From: Gust Date: Mon, 13 Oct 2014 14:46:29 -0300 Subject: [PATCH] Add button create software to user profile --- lib/mpog_software_plugin.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mpog_software_plugin.rb b/lib/mpog_software_plugin.rb index 9b10793..88af783 100644 --- a/lib/mpog_software_plugin.rb +++ b/lib/mpog_software_plugin.rb @@ -198,7 +198,8 @@ class MpogSoftwarePlugin < Noosfero::Plugin def control_panel_buttons if context.profile.software? return { :title => _("Software Info"), :icon => "edit-profile-group", :url => {:controller => "mpog_software_plugin_myprofile", :action => "edit_software"} } - else + elsif context.profile.person? + return { :title => _("Create a new software"), :icon => "design-editor", :url => {:controller => "mpog_software_plugin_myprofile", :action => "new_software"} } return nil end end -- libgit2 0.21.2