Bug 41563: Tidy kohaTable - acqui/newordersuggestion.tt

See bug 41324 comment 6
1. Variable serialization

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2026-01-06 16:30:42 +01:00 committed by Lucas Gass
parent a5989d0832
commit e99cdb29f2
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,5 @@
[% USE raw %]
[% USE To %]
[% USE Koha %]
[% USE Branches %]
[% USE Price %]
@ -129,6 +130,10 @@
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'calendar.inc' %]
<script>
const logged_in_user = [% To.json(logged_in_user.unblessed) | $raw %];
</script>
<script>
$(document).ready(function() {
var suggestionst = $("#suggestionst").kohaTable({
@ -140,7 +145,7 @@
let table_dt = suggestionst.DataTable();
$("#show_only_mine").on('click', function(e){
e.preventDefault();
table_dt.columns(0).search('^[% logged_in_user.borrowernumber | html %]$', true).draw();
table_dt.columns(0).search(`^${logged_in_user.borrowernumber}$`, true).draw();
});
$("#show_all").on('click', function(e){
e.preventDefault();