diff --git a/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb b/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb index 6234531..44272ad 100644 --- a/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb +++ b/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb @@ -176,7 +176,13 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon respond_to do |format| if @writing_patent.update_attributes(params[:writing_patent]) - format.html { redirect_to(panel_personal_patent_back_end_writing_patents_url) } + + if params[:writing_patent][:user_id] + format.html { redirect_to(admin_users_new_interface_url(:id=>params[:writing_patent][:user_id],:show_plugin_profile=>"WritingPatent")) } + else + format.html { redirect_to(panel_personal_patent_back_end_writing_patents_url) } + end + # format.js { render 'toggle_enable' } format.xml { head :ok } else @@ -195,7 +201,13 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon @writing_patent.destroy respond_to do |format| - format.html { redirect_to(panel_personal_patent_back_end_writing_patents_url) } + + if params[:user_id] + format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingPatent")) } + else + format.html { redirect_to(panel_personal_patent_back_end_writing_patents_url) } + end + # format.xml { head :ok } format.js end diff --git a/app/views/panel/personal_patent/front_end/writing_patents/show.html.erb b/app/views/panel/personal_patent/front_end/writing_patents/show.html.erb index ea30e50..26c0f9e 100644 --- a/app/views/panel/personal_patent/front_end/writing_patents/show.html.erb +++ b/app/views/panel/personal_patent/front_end/writing_patents/show.html.erb @@ -1,5 +1,6 @@ <% # encoding: utf-8 %> +
<%= t("personal_patent.publication_date")%> | <%= @writing_patent.publish_date %> |
---|---|
<%= t("personal_patent.publication_date")%> | <%= @writing_patent.publish_date.strftime("%Y.%m") %> |
<%= t("personal_patent.url")%> | <%= link_to t(:url), @writing_patent.url, {:target => '_blank', :title => @writing_patent.url} if !@writing_patent.url.blank? %> |
<%= t("personal_patent.authors")%> | <%= "#{User.from_id(@writing_patent.create_user_id).name rescue ''},#{@writing_patent.authors rescue ''}"%> |
<%= t("personal_patent.authors")%> | <%= "#{@writing_patent.authors rescue ''}"%> |
<%= t("personal_patent.file")%> | @@ -53,3 +56,4 @@ <% end %>
<%= check_box_tag 'to_change[]', writing_patent.id.to_s, false, :class => "list-check" %> @@ -64,6 +64,14 @@ | <%= writing_patent.publish_date.strftime("%Y.%m") %> |
<%= link_to writing_patent.patent_title, panel_personal_patent_front_end_writing_patent_path(writing_patent) %>
+
+
+ |