From ed2982577f7f80ddb099e90deab854e67fc008fa Mon Sep 17 00:00:00 2001 From: Thusel Date: Thu, 9 Jan 2025 17:58:11 +0100 Subject: [PATCH] LUT-27285 : hide delete button for unarchived blogs --- .../WEB-INF/templates/admin/plugins/blog/manage_blogs.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/WEB-INF/templates/admin/plugins/blog/manage_blogs.html b/webapp/WEB-INF/templates/admin/plugins/blog/manage_blogs.html index c3e63a55..112b9a3f 100644 --- a/webapp/WEB-INF/templates/admin/plugins/blog/manage_blogs.html +++ b/webapp/WEB-INF/templates/admin/plugins/blog/manage_blogs.html @@ -79,7 +79,7 @@ - <#if permission_manage_delete_blog> + <#if permission_manage_delete_blog && status_filter == 3> @@ -213,7 +213,7 @@ <@aButton href='jsp/admin/plugins/blog/ManageBlogs.jsp?action=form_checkbox_action&select_blog_action=0&select_blog_id=${blog.id}' title='#i18n{blog.manage_blog_archives.labelActionArchive}' buttonIcon='archive' hideTitle=['all'] color='warning' /> - <#if permission_manage_delete_blog> + <#if permission_manage_delete_blog && status_filter == 3> <@aButton href='jsp/admin/plugins/blog/ManageBlogs.jsp?action=confirmRemoveBlog&id=${blog.id}' title='#i18n{portal.util.labelDelete}' buttonIcon='trash' hideTitle=['all'] color='danger' /> <@aButton href='jsp/site/Portal.jsp?page=blog&id=${blog.id}' title='#i18n{portal.site.admin_page.labelShowPage}' buttonIcon='external-link' hideTitle=['all'] target='_blank' color='default ms-1' size='' class='btn-preview' /> @@ -303,6 +303,8 @@ // checkbox row let btnApplyActionOnSelection = document.getElementById('button_apply_selected_action') +window.addEventListener("load", ( ) => manageActionButtonVisibility( ) ); + // When the "Check all" / "Uncheck all" element is clicked, check / uncheck all the blog posts' checkboxes document.getElementById('select_all_blogs_id').addEventListener('click', function () { var selectionButton = document.getElementById('select_blog_action')