From ae8079805d1bfd5cac0637a49b4ec3ae0847ad76 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 16 Oct 2025 11:53:21 +0200 Subject: [PATCH] Bug 39814: [24.11] Restore filtering to the serials search table --- .../prog/en/modules/serials/serials-search.tt | 53 +++++-------------- 1 file changed, 13 insertions(+), 40 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index 97b0f4a64b9..98d5a19ab77 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -68,7 +68,9 @@ [% END %] - + [% SET table_id = closed ? "closed_subscriptions" : "opened_subscriptions" %] + +
@@ -185,31 +187,10 @@ [% END # IF closed %] - [% END # /UNLESS subscription.cannotdisplay %] [% END # /FOREACH subscription %] - - - - - - - - - - [% SET column_num = 6 %] - [% UNLESS closed %] - - [% SET column_num = column_num + 1 %] - [% END %] - [% FOR field IN additional_fields_for_subscription %] - - [% END %] - - -
[% END # /BLOCK subscriptions_table %] @@ -311,6 +292,7 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] @@ -343,24 +325,15 @@ } $(document).ready(function() { - var osrlt = $("#opened_panel table").dataTable($.extend(true, {}, dataTablesDefaults, { - "pagingType": "full", - "order": [[ 2, "asc" ]], - "columnDefs": [ - { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] }, - { "type": "anti-the", "targets": [ 'anti-the'] } - ] - })); - - var csrlt = $("#closed_panel table").dataTable($.extend(true, {}, dataTablesDefaults, { - // FIXME sort function of additional_fields! - "order": [[ 2, "asc" ]], - "pagingType": "full", - "columnDefs": [ - { "orderable": false, "targets": [ 'NoSort' ] }, - { "type": "anti-the", "targets": [ 'anti-the'] } - ] - })); + var osrlt = KohaTable("opened_subscriptions", { + pagingType: "full", + order: [[2, "asc"]], + }, null, true); + + var csrlt = KohaTable("closed_subscriptions", { + order: [[2, "asc"]], + pagingType: "full", + }, null, true); var manarlt = $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, { "pagingType": "full", -- 2.34.1