Commit 1a662b306dd728474a728da8d89cf354444ad340

Authored by Gust
Committed by Fabio Teixeira
1 parent 779e07dc
Exists in master and in 79 other branches add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev_env_minimal, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

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 @@
  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 100 result = environment.people.find(:all, :conditions => ['LOWER(name) LIKE ?', "%#{arg}%"])
101 101 render :text => prepare_to_token_input(result).to_json
102 102 end
  103 +
  104 + def edit_software
  105 +
  106 + end
  107 +
103 108 end
104 109 end
... ...
lib/mpog_software_plugin.rb
... ... @@ -197,12 +197,16 @@ class MpogSoftwarePlugin &lt; Noosfero::Plugin
197 197 end
198 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 204 def stylesheet?
201 205 true
202 206 end
203 207  
204 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 210 end
207 211  
208 212 def add_new_organization_buttons
... ...
public/mpog-software.js 0 → 100644
... ... @@ -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 5 \ No newline at end of file
... ...
views/mpog_software_plugin_myprofile/edit_software.html.erb 0 → 100644
... ... @@ -0,0 +1 @@
  1 +<!-- TODO: add partials -->
0 2 \ No newline at end of file
... ...