From 9a87534f1c17943e900ffee2079d7bf4461b4249 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Mon, 1 Jul 2019 15:32:39 +0800 Subject: [PATCH] published library disable publish action --- app/views/libraries/_form.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/libraries/_form.html.erb b/app/views/libraries/_form.html.erb index 86abea58..b3ed4721 100644 --- a/app/views/libraries/_form.html.erb +++ b/app/views/libraries/_form.html.erb @@ -49,7 +49,9 @@
- <%= link_to '申请发布', 'javascript:void(0)', class: 'white-btn edu-blueback-btn changebtn mr20 fl apply-publish-btn' %> + <% unless @library.published? %> + <%= link_to '申请发布', 'javascript:void(0)', class: 'white-btn edu-blueback-btn changebtn mr20 fl apply-publish-btn' %> + <% end %> <%= link_to '保存', 'javascript:void(0)', class: 'white-btn edu-blueline-btn changebtn mr20 fl submit-btn' %>
<% end %>