From acbbf4736e4d2be7ef84748d77383e29d117865e Mon Sep 17 00:00:00 2001
From: p31729568
Date: Mon, 15 Jul 2019 08:38:40 +0800
Subject: [PATCH] library modify
---
app/controllers/libraries_controller.rb | 4 +-
app/views/libraries/publish_success.html.erb | 6 +--
app/views/libraries/show.html.erb | 45 --------------------
3 files changed, 5 insertions(+), 50 deletions(-)
diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb
index 27e814d7..82981e62 100644
--- a/app/controllers/libraries_controller.rb
+++ b/app/controllers/libraries_controller.rb
@@ -37,7 +37,7 @@ class LibrariesController < ApplicationController
Libraries::SaveService.new(@library, current_user, form_params).call
if with_publish?
Libraries::SubmitService.new(@library).call
- redirect_to publish_success_libraries_path
+ redirect_to publish_success_libraries_path(id: @library.id)
else
redirect_to library_path(id: @library.id)
end
@@ -61,7 +61,7 @@ class LibrariesController < ApplicationController
Libraries::SaveService.new(@library, current_user, form_params).call
if with_publish?
Libraries::SubmitService.new(@library).call
- redirect_to publish_success_libraries_path
+ redirect_to publish_success_libraries_path(id: @library.id)
else
redirect_to library_path(id: @library.id)
end
diff --git a/app/views/libraries/publish_success.html.erb b/app/views/libraries/publish_success.html.erb
index 372053e6..1f6ef18b 100644
--- a/app/views/libraries/publish_success.html.erb
+++ b/app/views/libraries/publish_success.html.erb
@@ -3,11 +3,11 @@
- 通过平台管理员审核后,即可公开显示
+ 平台正在审核您的申请,审核结果将以平台消息的形式通知您
- <%= link_to '查看已上传文档', libraries_path(type: 'mine'), class: 'white-btn edu-blueline-btn changebtn mr20 fl' %>
+ <%= link_to '查看已上传文档', library_path(id: params[:id]), class: 'white-btn edu-blueline-btn changebtn mr20 fl' %>
<%= link_to '继续上传', new_library_path, class: 'white-btn edu-blueback-btn changebtn fl' %>
diff --git a/app/views/libraries/show.html.erb b/app/views/libraries/show.html.erb
index f8d45050..50ec6711 100644
--- a/app/views/libraries/show.html.erb
+++ b/app/views/libraries/show.html.erb
@@ -23,25 +23,6 @@
<%= link_to('返回', libraries_path, class: 'fr color-grey-9 mt5') %>
- <% if admin_or_self && !@library.published? && @library_applies.size > 0 %>
-
-
- 私有化原因
- (请按照提示修改,并在完成编辑后重新提交)
-
-
-
-
- <% end %>
<%= link_to image_tag(url_to_avatar(@library.user), width: 50, height: 50, class: 'radius mr15 mt3'), user_path(@library.user) %>
@@ -82,21 +63,6 @@