diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb
index 9163f5473..5153a01d4 100644
--- a/app/controllers/softapplications_controller.rb
+++ b/app/controllers/softapplications_controller.rb
@@ -100,7 +100,7 @@ class SoftapplicationsController < ApplicationController
@softapplication.destroy
respond_to do |format|
- format.html { redirect_to :back }
+ format.html { redirect_to home_path }
format.json { head :no_content }
end
end
diff --git a/app/views/contests/_list_softapplications.html.erb b/app/views/contests/_list_softapplications.html.erb
index 5646f5d12..29c985b7e 100644
--- a/app/views/contests/_list_softapplications.html.erb
+++ b/app/views/contests/_list_softapplications.html.erb
@@ -8,7 +8,6 @@
diff --git a/app/views/softapplications/_form.html.erb b/app/views/softapplications/_form.html.erb
index 5a046801f..f45125ea2 100644
--- a/app/views/softapplications/_form.html.erb
+++ b/app/views/softapplications/_form.html.erb
@@ -1,64 +1,69 @@
-<%= form_for(@softapplication) do |f| %>
+<%= form_for(softapplication) do |f| %>
- <% if @softapplication.errors.any? %>
+ <% if softapplication.errors.any? %>
-
<%= pluralize(@softapplication.errors.count, "error") %> prohibited this softapplication from being saved:
+
<%= pluralize(softapplication.errors.count, "error") %> prohibited this softapplication from being saved:
- <% @softapplication.errors.full_messages.each do |msg| %>
+ <% softapplication.errors.full_messages.each do |msg| %>
<%= msg %>
<% end %>
<% end %>
-
-
- <%= l(:label_softapplication_name) %>
- * :
- <%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %>
- <%= l(:label_softapplication_name_condition)%>
- br>
+
+
+
+ <%= l(:label_softapplication_name) %>
+ * : <%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %>
+ <%= l(:label_softapplication_name_condition)%>
+ br>
+
+
+
+
+ <%= l(:label_softapplication_version_available) %>
+ * : <%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %>
-
- <%= l(:label_softapplication_version_available) %>
- * :
- <%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %>
+ br>
+
+
+
+
+ <%= l(:label_softapplication_type) %>
- br>
+ * : <%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
-
- <%= l(:label_softapplication_type) %>
- * :
- <%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
+ br>
+
+
+
+
+ <%= l(:label_softapplication_description) %>
+ * : <%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %>
- br>
+ br>
+
+
+
+ <%= l(:label_softapplication_developers) %>
+ * : <%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %>
-
- <%= l(:label_softapplication_description) %>
- * :
- <%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %>
-
- br>
-
-
-
-
- <%=l(:label_upload_softapplication_packets)%> :
-
- <%= render :partial => 'attachments/form' %>
-
-
- br> br> br> br> br>
-
-
-
-
<%=l(:label_upload_softapplication_photo)%> : (
<%=l(:label_upload_softapplication_photo_condition)%> )
-
- <%= render :partial => 'attachments/form' %>
-
-
-
+ br>
+
+
+
+ 上传应用软件包和应用截图
+ <%= render_flash_messages %>
+
+ <%= render :partial => 'attachments/form' %>
+
+ (<%=l(:label_upload_softapplication_photo_condition)%>)
+
+
+
+
<%= submit_tag l(:button_create), :onclick => "return true" %>
<% end %>
diff --git a/app/views/softapplications/edit.html.erb b/app/views/softapplications/edit.html.erb
index f93e091d2..c9e0c6f66 100644
--- a/app/views/softapplications/edit.html.erb
+++ b/app/views/softapplications/edit.html.erb
@@ -1,6 +1,8 @@
-
Editing softapplication
+
<%= l(:label_edit_softapplication)%>
+
+<%= render partial: 'form', locals:{softapplication: @softapplication} %>
+
+
-<%= render 'form' %>
-<%= link_to 'Show', @softapplication %> |
-<%= link_to 'Back', softapplications_path %>
diff --git a/app/views/softapplications/new.html.erb b/app/views/softapplications/new.html.erb
index d5ff2c9c2..1112fcfa4 100644
--- a/app/views/softapplications/new.html.erb
+++ b/app/views/softapplications/new.html.erb
@@ -1,76 +1,5 @@
<%= l(:label_release_softapplication)%>
-
+<%= render partial: 'form', locals:{softapplication: @softapplication} %>
-
- <%= form_for Softapplication.new, :url => {:controller => 'softapplications', :action => 'create'}, :update => "bidding_project_list", :complete => '$("#put-bid-form").hide();', :html => {:multipart => true, :id => 'add_homework_form'} do |f| %>
-
-
-
- <%= l(:label_softapplication_name) %>
- * : <%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %>
- <%= l(:label_softapplication_name_condition)%>
- br>
-
-
-
- <%= l(:label_softapplication_version_available) %>
- * : <%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %>
-
- br>
-
-
-
-
- <%= l(:label_softapplication_type) %>
-
- * : <%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
-
- br>
-
-
-
-
- <%= l(:label_softapplication_description) %>
- * : <%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %>
-
- br>
-
-
-
-
- <%= l(:label_softapplication_developers) %>
- * : <%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %>
-
- br>
-
-
-
- 上传应用软件包和应用截图
- <%= render_flash_messages %>
-
- <%= render :partial => 'attachments/form' %>
-
- (<%=l(:label_upload_softapplication_photo_condition)%>)
-
-
-
-
<%= submit_tag l(:button_create), :onclick => "return true" %>
-
-
-
- <% end %>
-
\ No newline at end of file
diff --git a/app/views/softapplications/show.html.erb b/app/views/softapplications/show.html.erb
index a5c3fb596..d5681c4ea 100644
--- a/app/views/softapplications/show.html.erb
+++ b/app/views/softapplications/show.html.erb
@@ -18,6 +18,10 @@