Commit 1a662b306dd728474a728da8d89cf354444ad340

Authored by Gust
Committed by Fabio Teixeira
1 parent 779e07dc

Add software profile button to control painel

Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
controllers/mpog_software_info_controller.rb 0 → 100644
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +class MpogSoftwareInfoController < MyProfileController
  2 + append_view_path File.join(File.dirname(__FILE__) + '/../views')
  3 +
  4 + def index
  5 + end
  6 +
  7 + def edit
  8 + end
  9 +
  10 + def edit_software
  11 + puts "="*80
  12 + end
  13 +
  14 +end
  15 +end
controllers/mpog_software_plugin_myprofile_controller.rb
@@ -100,5 +100,10 @@ class MpogSoftwarePluginMyprofileController &lt; MyProfileController @@ -100,5 +100,10 @@ class MpogSoftwarePluginMyprofileController &lt; 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 &lt; Noosfero::Plugin @@ -197,12 +197,16 @@ class MpogSoftwarePlugin &lt; 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
public/mpog-software.js 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +
  2 +jQuery(document).ready(function(){
  3 +};
  4 +//jQuery(".control-panel")[0].innerHTML = jQuery(".control-panel-edit-profile-group")[1].outerHTML + jQuery(".control-panel")[0].innerHTML
0 \ No newline at end of file 5 \ No newline at end of file
views/mpog_software_plugin_myprofile/edit_software.html.erb 0 → 100644
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +<!-- TODO: add partials -->
0 \ No newline at end of file 2 \ No newline at end of file