From f46453cd89d07c94debcd07ce93b095b277e165a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 18 Aug 2023 11:38:53 +0100 Subject: [PATCH] Bug 33737: Link from patron bookings to biblio bookings Signed-off-by: Esther Melander Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- .../prog/en/includes/js-biblio-format.inc | 2 ++ .../prog/en/modules/members/moremember.tt | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc index 498a7a44e9..9d31b778c3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc @@ -41,6 +41,8 @@ title = '' + title + ''; } else if (config.link === 'isbd') { title = '' + title + ''; + } else if (config.link === 'bookings') { + title = '' + title + ''; } else { title = '' + title + ''; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 71d2991a93..e468079c1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -747,8 +747,8 @@ [% END %] [% Asset.js("js/holds.js") | $raw %] [% INCLUDE 'calendar.inc' %] - [% Asset.js("js/bookings.js") | $raw %] [% Asset.js("js/cancel_booking_modal.js") | $raw %] + [% INCLUDE 'js-biblio-format.inc' %] [% INCLUDE 'str/members-menu.inc' %] [% Asset.js("js/members-menu.js") | $raw %] [% Asset.js("js/recalls.js") | $raw %] @@ -804,7 +804,9 @@ "searchable": true, "orderable": true, "render": function(data,type,row,meta) { - return row.biblio.title; + return $biblio_to_html(row.biblio, { + link: 'bookings' + }); } }, { @@ -815,7 +817,7 @@ "defaultContent": "Any item", "render": function(data,type,row,meta) { if ( row.item ) { - return row.item.external_id; + return row.item.external_id + " (" + row.booking_id + ")"; } else { return null; } @@ -842,10 +844,14 @@ { "data": "", "title": "Actions", + "class": "actions", "searchable": false, "orderable": false, "render": function(data, type, row, meta) { - var result = ''; + let result = ""; + [% IF CAN_user_circulate_manage_bookings %] + result += ''; + [% END %] return result; } }] -- 2.39.5