From 5c4c208fd13dcebae20ceb85504c9f1232db4601 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 15 Oct 2024 14:17:16 +0200 Subject: [PATCH] Bug 38147: Fix Edit and Cancel translatability in booking table It seems that "Edit" was not picked by the translator script because there was a TT tag on the same line. See comment 0 for a test plan. --- .../intranet-tmpl/prog/en/modules/bookings/list.tt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt index ce2aaeb0062..a3f5a9a3402 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt @@ -81,15 +81,16 @@ var update_success = 0; var bookings_table; var timeline; + let biblionumber = "[% biblionumber | uri %]"; $(document).ready(function(){ var items = $.ajax({ - url: '/api/v1/biblios/[% biblionumber | uri %]/items?bookable=1', + url: '/api/v1/biblios/%s/items?bookable=1'.format(biblionumber), dataType: 'json', type: 'GET' }); var bookings = $.ajax({ - url: '/api/v1/biblios/[% biblionumber | uri %]/bookings?_per_page=-1', + url: '/api/v1/biblios/%s/bookings?_per_page=-1'.format(biblionumber), headers: { 'x-koha-embed': 'patron' }, dataType: 'json', type: 'GET', @@ -217,7 +218,7 @@ } }; - var bookings_table_url = "/api/v1/biblios/[% biblionumber | uri %]/bookings"; + var bookings_table_url = "/api/v1/biblios/%s/bookings".format(biblionumber); bookings_table = $('#bookings_table').kohaTable({ "ajax": { "url": bookings_table_url @@ -310,8 +311,8 @@ "render": function(data, type, row, meta) { let result = ""; [% IF CAN_user_circulate_manage_bookings %] - result += ''; - result += ''; + result += ''.format(row.booking_id, biblionumber, row.item_id, row.patron_id, row.pickup_library_id, row.start_date, row.end_date, _("Edit")); + result += ''.format(row.booking_id, ("Cancel")); [% END %] return result; } -- 2.34.1