Bugzilla – Attachment 182068 Details for
Bug 26479
Always show "Check in"-button if SCOAllowCheckin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26479: Always show "Check in"-button if SCOAllowCheckin
Bug-26479-Always-show-Check-in-button-if-SCOAllowC.patch (text/plain), 6.26 KB, created by
David Nind
on 2025-05-08 11:19:58 UTC
(
hide
)
Description:
Bug 26479: Always show "Check in"-button if SCOAllowCheckin
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-05-08 11:19:58 UTC
Size:
6.26 KB
patch
obsolete
>From 2a8d9b70281ed96465127278dd7359b7129ae939 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >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 <david@davidnind.com> >--- > .../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 84c20c616b..486b442fcd 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 @@ > <th>Call number</th> > <th class="psort">Due</th> > <th class="all no-sort">Renew</th> >+ [% IF Koha.Preference('SCOAllowCheckin') %] >+ <th class="all no-sort">Check in</th> >+ [% END %] > [% UNLESS ( nofines ) %] > <th>Fines</th> > [% END %] >@@ -236,19 +239,26 @@ > [% ELSE %] > <span>No renewals allowed</span> > [% END %] >- [% IF Koha.Preference('SCOAllowCheckin') %] >- <div> >- <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" /> >- <input type="hidden" name="op" value="cud-returnbook" /> >- <input type="hidden" name="confirmed" value="" /> >- </div> >- [% END %] > [% END %] > [% IF ISSUE.auto_renew %] > <br /><span>This item is scheduled for automatic renewal</span> > [% END %] > </form> > </td> >+ [% IF Koha.Preference('SCOAllowCheckin') %] >+ <td> >+ <form action="/cgi-bin/koha/sco/sco-main.pl" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <legend class="sr-only">Issue renews</legend> >+ <input type="hidden" name="patronid" value="[% patronid | html %]" /> >+ <input type="hidden" name="load_checkouts" value="[% load_checkouts | html %]" /> >+ <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" /> >+ <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" /> >+ <input type="hidden" name="op" value="cud-returnbook" /> >+ <input type="hidden" name="confirmed" value="" /> >+ </form> >+ </td> >+ [% END %] > [% UNLESS ( nofines ) %] > <td> [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %] </td> > [% END %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26479
:
170758
|
170808
|
182063
|
182068
|
182081