Bug 39775: Restore filtering to the serials claims table

This patch implements the 'add_filters' argument for kohaTable() to restore filtering to the serials claims table

Test plan:
1) Navigate to Serials and then Claims (if prompted to create a notice, please do this)
2) If you have no claims listed, return to the serials page and create a new serial (the details of this aren't too important)
3) Return to the serials claims page, try to use one of the filters at the bottom of the table
4) Nothing will happen and the table won't filter
5) Apply patch
6) Hard refresh the browser
7) The filters will now be at the top of the table and should work

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matt Blenkinsop 2025-04-29 15:22:15 +01:00 committed by Katrin Fischer
parent 1da28b221a
commit d323fa4467
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 10 additions and 24 deletions

View File

@ -133,24 +133,6 @@
</tr>
[% END # /FOREACH missingissue %]
</tbody>
<tfoot>
<tr>
<td></td>
<td><input type="text" class="filter" data-column_num="1" placeholder="Search vendor" /></td>
<td><input type="text" class="filter" data-column_num="2" placeholder="Search library" /></td>
<td><input type="text" class="filter" data-column_num="3" placeholder="Search title" /></td>
<td><input type="text" class="filter" data-column_num="4" placeholder="Search ISSN" /></td>
<td><input type="text" class="filter" data-column_num="5" placeholder="Search issue number" /></td>
<td><input type="text" class="filter" data-column_num="6" placeholder="Search status" /></td>
<td><input type="text" class="filter" data-column_num="7" placeholder="Search since" /></td>
<td><input type="text" class="filter" data-column_num="8" placeholder="Search publication date" /></td>
<td><input type="text" class="filter" data-column_num="9" placeholder="Search claim count" /></td>
<td><input type="text" class="filter" data-column_num="10" placeholder="Search claim date" /></td>
[% FOR field IN additional_fields_for_subscription %]
<td><input type="text" class="filter" data-column_num="[% loop.count + 10 | html %]" placeholder="Search [% field.name | html %]" /></td>
[% END %]
</tr>
</tfoot>
</table>
<!-- /#claimst -->
</div>
@ -238,12 +220,16 @@
var sTable;
$(document).ready(function () {
enableSelectedActions();
sTable = $("#claimst").kohaTable({
dom: "t",
order: [[7, "asc"]],
columnDefs: [{ sortable: false, targets: ["no-sort"] }],
paging: false,
});
sTable = $("#claimst").kohaTable(
{
dom: "t",
order: [[7, "asc"]],
columnDefs: [{ sortable: false, targets: ["no-sort"] }],
paging: false,
},
null,
true
);
// Checkboxes : Select All / None
$("span.checkall").html('<input type="checkbox" name="CheckAll"> ' + _("Check all") + "</input>");