From 53cae21e9084c08728f7e745b762e686cabbb7ff Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 6 Feb 2025 15:23:43 +0000 Subject: [PATCH] Bug 39046: Use Bootstrap badge to indicate late transfers This patch removes the error class from the table of late transfers. Instead, the days late status is shown as a Bootstrap badge. The patch also adds pluralization to the string so that it adapts based on the number of late transfers. To test you would ideally have multiple pending transfers to your library, some late and some not. This will presumably require manually updated your database to change the date of pending transfers. - Make at least one transfer multiple days late by changing the `datesent` value to a date late enough to exceed the number of days defined in the TransfersMaxDaysWarning system preference. - Make at least one transfer only one day late. - When you go to Circulation -> Transfers to receive you should see badge-style labels on the transfers which are late. - The text of the labels should be correct according to the number: "1 day late" or "XX days late" Sponsored-by: Athens County Public Libraries --- .../prog/en/modules/circ/transferstoreceive.tt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt index f757bf9f7fc..2ac650d73b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt @@ -55,14 +55,13 @@ > [% FOREACH reser IN branchesloo.reserv %] - [% SET tr_class = '' %] - [% IF ( reser.messcompa ) %] - [% tr_class = 'problem' %] - [% END %] - -

[% reser.datetransfer | $KohaDates %]

[% IF ( reser.messcompa ) %]Transfer is [% reser.diff | html %] days late[% END %] + + + [% reser.datetransfer | $KohaDates %] + [% IF ( reser.messcompa ) %] + [% tnx('{count} day late', '{count} days late', reser.diff, { count = reser.diff }) %] + [% END %] + [% INCLUDE 'biblio-title.inc' biblio=reser link = 1 %] [% IF ( reser.author ) %]by [% reser.author | html %][% END %] [% IF ( reser.itemtype ) %]([% reser.itemtype | html %])[% END %] -- 2.39.5