Commit 1b41bd0789c6c8e858ec86eaab8fbd46888940e9

Authored by Gabriela Navarro
Committed by Luciano Prestes
1 parent 9dda8ae7
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

Rename tabs and fix the buttons on Software Info. Add Save and configure

community button

Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
controllers/mpog_software_plugin_myprofile_controller.rb
... ... @@ -116,7 +116,11 @@ class MpogSoftwarePluginMyprofileController &lt; MyProfileController
116 116  
117 117 begin
118 118 @software_info.save!
119   - redirect_to :controller => 'profile_editor', :action => 'index'
  119 + if params[:commit] == _('Save and Configure Community')
  120 + redirect_to :controller => 'profile_editor', :action => 'edit'
  121 + else
  122 + redirect_to :controller => 'profile_editor', :action => 'index'
  123 + end
120 124 rescue ActiveRecord::RecordInvalid => invalid
121 125 end
122 126 end
... ...
views/mpog_software_plugin_myprofile/_public_software_info.html.erb
... ... @@ -99,3 +99,4 @@
99 99 <%= label_tag(:demonstration_url ,_("Demonstration url:"), :class=>"formlabel") %>
100 100 <%= text_field_tag("software[demonstration_url]", @software_info.demonstration_url) %>
101 101 </div>
  102 +</div>
... ...
views/mpog_software_plugin_myprofile/edit_software.html.erb
... ... @@ -4,16 +4,17 @@
4 4  
5 5 <%= labelled_form_for :mpog_software_plugin_myprofile, :html => { :multipart => true, :id => 'edit-form' } do |f| %>
6 6  
7   -<% tabs << {:title => _("Basic"), :id => 'basic-info',
  7 +<% tabs << {:title => _("Software"), :id => 'basic-info',
8 8 :content => (render :partial => 'main_software_editor_extras')} %>
9 9  
10   -<% tabs << {:title => _("Especific"), :id => 'especific-info',
  10 +<% tabs << {:title => _("Public Software"), :id => 'especific-info',
11 11 :content => (render :partial => 'public_software_info')} %>
12 12  
13 13 <%= render_tabs(tabs) %>
14 14  
15 15 <% button_bar do %>
16 16 <%= submit_button(:save, _('Save')) %>
  17 + <%= submit_button(:save, _('Save and Configure Community')) %>
17 18 <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
18 19 <% end %>
19 20 <% end %>
20 21 \ No newline at end of file
... ...