Commit 1a662b306dd728474a728da8d89cf354444ad340
Committed by
Fabio Teixeira
1 parent
779e07dc
Exists in
master
and in
5 other branches
Add software profile button to control painel
Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com> Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing
5 changed files
with
30 additions
and
1 deletions
Show diff stats
controllers/mpog_software_plugin_myprofile_controller.rb
@@ -100,5 +100,10 @@ class MpogSoftwarePluginMyprofileController < MyProfileController | @@ -100,5 +100,10 @@ class MpogSoftwarePluginMyprofileController < MyProfileController | ||
100 | result = environment.people.find(:all, :conditions => ['LOWER(name) LIKE ?', "%#{arg}%"]) | 100 | result = environment.people.find(:all, :conditions => ['LOWER(name) LIKE ?', "%#{arg}%"]) |
101 | render :text => prepare_to_token_input(result).to_json | 101 | render :text => prepare_to_token_input(result).to_json |
102 | end | 102 | end |
103 | + | ||
104 | + def edit_software | ||
105 | + | ||
106 | + end | ||
107 | + | ||
103 | end | 108 | end |
104 | end | 109 | end |
lib/mpog_software_plugin.rb
@@ -197,12 +197,16 @@ class MpogSoftwarePlugin < Noosfero::Plugin | @@ -197,12 +197,16 @@ class MpogSoftwarePlugin < Noosfero::Plugin | ||
197 | end | 197 | end |
198 | end | 198 | end |
199 | 199 | ||
200 | + def control_panel_buttons | ||
201 | + return { :title => _("Software Info"), :icon => "edit-profile-group", :url => {:controller => "mpog_software_plugin_myprofile", :action => "edit_software"} } | ||
202 | + end | ||
203 | + | ||
200 | def stylesheet? | 204 | def stylesheet? |
201 | true | 205 | true |
202 | end | 206 | end |
203 | 207 | ||
204 | def js_files | 208 | def js_files |
205 | - ["mpog-software-validations.js", "mpog-user-validations.js", "mpog-institution-validations.js", "mpog-incomplete-registration.js", "mpog-search.js", "jquery.maskedinput.min.js"] | 209 | + ["mpog-software.js", "mpog-software-validations.js", "mpog-user-validations.js", "mpog-institution-validations.js", "mpog-incomplete-registration.js", "mpog-search.js", "jquery.maskedinput.min.js"] |
206 | end | 210 | end |
207 | 211 | ||
208 | def add_new_organization_buttons | 212 | def add_new_organization_buttons |
views/mpog_software_plugin_myprofile/edit_software.html.erb
0 → 100644