From cc539e8a42913cc3d7c8e8cbbb89dee1e309ddb8 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Thu, 8 May 2025 09:07:31 +0200 Subject: [PATCH] Bug 26479: Always show "Check in"-button if SCOAllowCheckin To reproduce: - Make sure SCO is enabled and SCOAllowCheckin = Allow - Log in to SCO in the OPAC - Check an item out to yourself - The item has a green "Renew item" button. Click this button until all renewals have been used up, and you get a blue "Check in item" button. To test: - Apply the patch - Check an item out to yourself - Verify the item has a green "Renew item" button in the "Renew" column, and a blue "Check in item" button in the "Check in" column - Click "Renew item" until all renewals are used up. Verify you eventually get the "No renewals allowed" message in the "Renew" column, but no blue "Check in item" button (in that column) - Verify the "Check in item" button works as expected - Set SCOAllowCheckin = Don't allow, reload the SCO page and verify that no "Check in" column and no blue "Check in item" button is shown, even after all renewals has been used up Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- .../bootstrap/en/modules/sco/sco-main.tt | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index 84c20c616be..486b442fcd7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -182,6 +182,9 @@ Call number Due Renew + [% IF Koha.Preference('SCOAllowCheckin') %] + Check in + [% END %] [% UNLESS ( nofines ) %] Fines [% END %] @@ -236,19 +239,26 @@ [% ELSE %] No renewals allowed [% END %] - [% IF Koha.Preference('SCOAllowCheckin') %] -
- - - -
- [% END %] [% END %] [% IF ISSUE.auto_renew %]
This item is scheduled for automatic renewal [% END %] + [% IF Koha.Preference('SCOAllowCheckin') %] + +
+ [% INCLUDE 'csrf-token.inc' %] + Issue renews + + + + + + +
+ + [% END %] [% UNLESS ( nofines ) %] [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %] [% END %] -- 2.49.0