From 66411419bbf743a6ef2a599f3c97ef9603de825f Mon Sep 17 00:00:00 2001 From: Luciano Prestes Cavalcanti Date: Wed, 29 Oct 2014 16:39:45 -0200 Subject: [PATCH] Register software redirect to edit community of software --- controllers/mpog_software_plugin_myprofile_controller.rb | 2 +- views/mpog_software_plugin_myprofile/new_software.html.erb | 22 +--------------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/controllers/mpog_software_plugin_myprofile_controller.rb b/controllers/mpog_software_plugin_myprofile_controller.rb index 366debd..15a7683 100644 --- a/controllers/mpog_software_plugin_myprofile_controller.rb +++ b/controllers/mpog_software_plugin_myprofile_controller.rb @@ -24,7 +24,6 @@ class MpogSoftwarePluginMyprofileController < MyProfileController valid_license = (request.post? && @license_info.valid?) if valid_software_info && valid_license && valid_community @community = Community.create_after_moderation(user, {:environment => environment}.merge(params[:community]), @software_info, @license_info ) - redirect_to :controller => 'mpog_software_plugin_myprofile', :action => 'edit_software', :profile => @community.identifier unless params[:q].nil? admins = params[:q].split(/,/).map{|n| environment.people.find n.to_i} @@ -35,6 +34,7 @@ class MpogSoftwarePluginMyprofileController < MyProfileController end end + redirect_to :controller => 'profile_editor', :action => 'edit', :profile => @community.identifier else # @list_libraries.each do |lib| # @errors |= lib.errors.full_messages diff --git a/views/mpog_software_plugin_myprofile/new_software.html.erb b/views/mpog_software_plugin_myprofile/new_software.html.erb index abc44f0..af4aa3a 100644 --- a/views/mpog_software_plugin_myprofile/new_software.html.erb +++ b/views/mpog_software_plugin_myprofile/new_software.html.erb @@ -31,14 +31,12 @@
<%= environment.default_hostname %>/ <%= required text_field(:community, :name, :size => 30, :maxlength => 100) %> - <%= content_tag(:small,_('Insert the name'), :id => 'name-tag', :class => "helper-tag") %>
<%= fields_for @software_info do |swf| %>
<%= swf.label("finality" ,_("Finality"), :class=>"formlabel") %> <%= required swf.text_area(:finality, :placeholder => _("It is a software of..."), :cols => 40, :rows => 5, :maxlength => 140) %> - <%= content_tag(:small,_('Insert the finality'), :id => 'finality-tag', :class => "helper-tag") %>
<% end %> @@ -66,22 +64,4 @@ <% end %> - - - - + \ No newline at end of file -- libgit2 0.21.2