From 6000860abaac060e1aaf21c2482ae112cabb6c6e Mon Sep 17 00:00:00 2001 From: Laura_Escamilla Date: Thu, 25 Sep 2025 21:49:50 +0000 Subject: [PATCH] Bug 39719: Added check for ExportCircHistory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Apply the patch and restart_all 2. Go to Administration → System preferences -> search for ExportCircHistory. Set it to Don't Show 3. View a patron's current checkouts tab. The Export option should not appear. 4. Set ExportCircHistory to 'Show'. The Export option should reappear. 5. Confirm that the Export button remains visible, no matter the option for ExportCircHistory in other locations such as the holdings table. 6. Sign off and have an amazing day! :D --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index 0b5511be2e..e6f00e16ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -885,18 +885,24 @@ function _dt_buttons(params) { }); } - buttons.push({ - extend: "collection", - autoClose: true, - fade: 100, - className: "export_controls", - titleAttr: __("Export or print"), - text: - ' ' + - __("Export") + - "", - buttons: export_buttons, - }); + if (typeof window.exports_enabled === "undefined") { + window.exports_enabled = 1; + } + + if (exports_enabled) { + buttons.push({ + extend: "collection", + autoClose: true, + fade: 100, + className: "export_controls", + titleAttr: __("Export or print"), + text: + ' ' + + __("Export") + + "", + buttons: export_buttons, + }); + } if (table_settings) { const writeToClipboard = async (text, node) => { -- 2.39.5