Bug 39814: [24.11] Restore filtering to the serials search table

Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
Jonathan Druart 2025-10-16 11:53:21 +02:00 committed by Baptiste Wojtkowski
parent 89278ee497
commit 47fdda0603
No known key found for this signature in database
GPG Key ID: 47A8A13E10BC0D40
1 changed files with 12 additions and 39 deletions

View File

@ -68,7 +68,9 @@
</span>
</div>
[% END %]
<table>
[% SET table_id = closed ? "closed_subscriptions" : "opened_subscriptions" %]
<table id="[% table_id | html %]">
<thead>
<tr>
<th class="NoSort noExport"></th>
@ -185,31 +187,10 @@
[% END # IF closed %]
</div> <!-- /.btn-group -->
</td>
</tr>
[% END # /UNLESS subscription.cannotdisplay %]
[% END # /FOREACH subscription %]
</tbody>
<tfoot>
<tr>
<td></td>
<td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search ISSN" /></td>
<td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search title" /></td>
<td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search notes" /></td>
<td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search library" /></td>
<td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search location" /></td>
<td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search callnumber" /></td>
[% SET column_num = 6 %]
[% UNLESS closed %]
<td><input type="text" class="dt-filter" data-column_num="7" placeholder="Search expiration date" /></td>
[% SET column_num = column_num + 1 %]
[% END %]
[% FOR field IN additional_fields_for_subscription %]
<td><input type="text" class="dt-filter" data-column_num="[% loop.count + column_num | html %]" placeholder="Search [% field.name | html %]" /></td>
[% END %]
<td></td>
</tr>
</tfoot>
</table>
</div>
[% END # /BLOCK subscriptions_table %]
@ -311,6 +292,7 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
<script>
var subscriptionid = "[% subscriptionid | html %]";
</script>
@ -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 osrlt = KohaTable("opened_subscriptions", {
pagingType: "full",
order: [[2, "asc"]],
}, null, true);
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 csrlt = KohaTable("closed_subscriptions", {
order: [[2, "asc"]],
pagingType: "full",
}, null, true);
var manarlt = $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, {
"pagingType": "full",