diff --git a/app/controllers/panel/personal_book/back_end/writing_books_controller.rb b/app/controllers/panel/personal_book/back_end/writing_books_controller.rb index a2b1333..c663dde 100644 --- a/app/controllers/panel/personal_book/back_end/writing_books_controller.rb +++ b/app/controllers/panel/personal_book/back_end/writing_books_controller.rb @@ -231,7 +231,13 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl respond_to do |format| if @writing_book.update_attributes(params[:writing_book]) - format.html { redirect_to(panel_personal_book_back_end_writing_books_url) } + + if params[:writing_book][:user_id] + format.html { redirect_to(admin_users_new_interface_url(:id=>params[:writing_book][:user_id],:show_plugin_profile=>"WritingBook")) } + else + format.html { redirect_to(panel_personal_book_back_end_writing_books_url) } + end + # format.js { render 'toggle_enable' } format.xml { head :ok } else @@ -251,7 +257,13 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl @writing_book.destroy respond_to do |format| - format.html { redirect_to(panel_personal_book_back_end_writing_books_url) } + + if params[:user_id] + format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingBook")) } + else + format.html { redirect_to(panel_personal_book_back_end_writing_books_url) } + end + # format.xml { head :ok } format.js end diff --git a/app/views/panel/personal_book/back_end/writing_books/_form.html.erb b/app/views/panel/personal_book/back_end/writing_books/_form.html.erb index 3ead8d3..b561fa2 100644 --- a/app/views/panel/personal_book/back_end/writing_books/_form.html.erb +++ b/app/views/panel/personal_book/back_end/writing_books/_form.html.erb @@ -255,7 +255,7 @@
<%= t("personal_book.url")%> | <%= link_to t(:url), @writing_book.url, {:target => '_blank', :title => @writing_book.url} if !@writing_book.url.blank? %> |
---|---|
<%= t("personal_book.authors")%> | <%= "#{User.from_id(@writing_book.create_user_id).name rescue ''},#{@writing_book.authors rescue ''}"%> |
<%= t("personal_book.authors")%> | <%= "#{@writing_book.authors rescue ''}"%> |
<%= t("personal_book.files")%> | @@ -77,3 +80,4 @@ <% end %>
<%= check_box_tag 'to_change[]', writing_book.id.to_s, false, :class => "list-check" %> @@ -64,6 +64,14 @@ | <%= writing_book.year %> |
<%= link_to writing_book.create_link, panel_personal_book_front_end_writing_book_path(writing_book) %>
+
+
+ |