From bdce24bf8798e0ee8981b4219ef0344b2144c29c 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 --- .../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 d2d87448b2..a345476e3b 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 @@ -181,6 +181,9 @@ Call number Due Renew + [% IF Koha.Preference('SCOAllowCheckin') %] + Check in + [% END %] [% UNLESS ( nofines ) %] Fines [% END %] @@ -235,19 +238,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.34.1