Commit 0ffedd2d6ef19629b32ea80e6014c94746950e50
Committed by
Fabio Teixeira
1 parent
0635131e
Exists in
master
and in
5 other branches
Add button create software to user profile
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com> Signed-off-by: Gustavo Jaruga Cruz <darksshades@gmail.com>
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/mpog_software_plugin.rb
... | ... | @@ -198,7 +198,8 @@ class MpogSoftwarePlugin < Noosfero::Plugin |
198 | 198 | def control_panel_buttons |
199 | 199 | if context.profile.software? |
200 | 200 | return { :title => _("Software Info"), :icon => "edit-profile-group", :url => {:controller => "mpog_software_plugin_myprofile", :action => "edit_software"} } |
201 | - else | |
201 | + elsif context.profile.person? | |
202 | + return { :title => _("Create a new software"), :icon => "design-editor", :url => {:controller => "mpog_software_plugin_myprofile", :action => "new_software"} } | |
202 | 203 | return nil |
203 | 204 | end |
204 | 205 | end | ... | ... |