Commit 1b41bd0789c6c8e858ec86eaab8fbd46888940e9
Committed by
Luciano Prestes
1 parent
9dda8ae7
Exists in
master
and in
5 other branches
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>
Showing
3 changed files
with
9 additions
and
3 deletions
Show diff stats
controllers/mpog_software_plugin_myprofile_controller.rb
@@ -116,7 +116,11 @@ class MpogSoftwarePluginMyprofileController < MyProfileController | @@ -116,7 +116,11 @@ class MpogSoftwarePluginMyprofileController < MyProfileController | ||
116 | 116 | ||
117 | begin | 117 | begin |
118 | @software_info.save! | 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 | rescue ActiveRecord::RecordInvalid => invalid | 124 | rescue ActiveRecord::RecordInvalid => invalid |
121 | end | 125 | end |
122 | end | 126 | end |
views/mpog_software_plugin_myprofile/_public_software_info.html.erb
@@ -99,3 +99,4 @@ | @@ -99,3 +99,4 @@ | ||
99 | <%= label_tag(:demonstration_url ,_("Demonstration url:"), :class=>"formlabel") %> | 99 | <%= label_tag(:demonstration_url ,_("Demonstration url:"), :class=>"formlabel") %> |
100 | <%= text_field_tag("software[demonstration_url]", @software_info.demonstration_url) %> | 100 | <%= text_field_tag("software[demonstration_url]", @software_info.demonstration_url) %> |
101 | </div> | 101 | </div> |
102 | +</div> |
views/mpog_software_plugin_myprofile/edit_software.html.erb
@@ -4,16 +4,17 @@ | @@ -4,16 +4,17 @@ | ||
4 | 4 | ||
5 | <%= labelled_form_for :mpog_software_plugin_myprofile, :html => { :multipart => true, :id => 'edit-form' } do |f| %> | 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 | :content => (render :partial => 'main_software_editor_extras')} %> | 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 | :content => (render :partial => 'public_software_info')} %> | 11 | :content => (render :partial => 'public_software_info')} %> |
12 | 12 | ||
13 | <%= render_tabs(tabs) %> | 13 | <%= render_tabs(tabs) %> |
14 | 14 | ||
15 | <% button_bar do %> | 15 | <% button_bar do %> |
16 | <%= submit_button(:save, _('Save')) %> | 16 | <%= submit_button(:save, _('Save')) %> |
17 | + <%= submit_button(:save, _('Save and Configure Community')) %> | ||
17 | <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> | 18 | <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> |
18 | <% end %> | 19 | <% end %> |
19 | <% end %> | 20 | <% end %> |
20 | \ No newline at end of file | 21 | \ No newline at end of file |