From d0fe23bb294a658cbedd77743b38feb429e994a5 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Fri, 13 Sep 2019 18:42:41 +0000
Subject: [PATCH] Bug 23611: Add export option to authorized values
administration
This patch changes the authorized values DataTables configuration to add
export options.
To test apply the patch and go to Administration -> Authorized values.
Test the "Export" button and confirm that the data is exported correctly
with each option.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
---
.../intranet-tmpl/prog/en/modules/admin/authorised_values.tt | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
index e62749a5bc..26dcfb97a0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
@@ -264,7 +264,7 @@
<tr>
<th>Category</th>
<th>Description</th>
- <th> </th>
+ <th class="noExport"> </th>
</tr>
</thead>
<tbody>
@@ -298,15 +298,18 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
<script>
$(document).ready(function() {
- $(".authorized_values_table").dataTable($.extend(true, {}, dataTablesDefaults, {
+ var columns_settings = []; // Empty because there are no columns we want to be configurable
+
+ KohaTable("categoriest", {
"aoColumnDefs": [
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
],
"aaSorting": [[ 0, "asc" ]],
"sPaginationType": "full"
- }));
+ }, columns_settings);
if ( $("#branches option:selected").length < 1 ) {
$("#branches option:first").attr("selected", "selected");
--
2.11.0