From 54bdb276426d44cdf12250ec5f29c480c48a2ee6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 27 May 2025 15:21:47 +0000 Subject: [PATCH] Bug 39939: Cancel selected holds button on waitingreserves.pl is the same color as the background This patch makes some minor changes to the "Holds awaiting pickup" page so that the cancel buttons are clear and usable. The patch also wraps the reference to the TransferWhenCancelAllWaitingHolds system preference in a permission check so that it can be linked to the preference when appropriate. To test you should have some waiting holds in three categories: 1. Holds which have not been waiting longer than the number of days specified in the ReservesMaxPickUpDelay system preference. 2. Holds which have been waiting longer. I belive the only way to test this is to manually update the expiration date of an already waiting hold so that it is in the past. 3. Waiting holds which a patron has requested be cancelled. (Requires that the patron and hold are allowed according to the "Cancellation allowed" setting under Administration -> Circulation and fine rules -> Default waiting hold cancellation policy. - Log in to the OPAC as a patron who has a waiting hold. On the "Your summary" page, under the "Holds" tab, click the "Request to cancel" button for at least one of the waiting holds. - In the staff interface, go to Circulation -> Holds awaiting pickup. - Under each tab, check the appearance of the "Cancel selected" buttons (and the "Cancel and transfer all" button under "Holds awaiting past..." tab). - When testing as a user with system preference privileges, and the TransferWhenCancelAllWaitingHolds preference set to "Don't transfer," the hint shown under the "Holds awaiting past..." tab should be linked to system preferences. A user without system preference privileges should not see a link. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind Signed-off-by: Emily Lamancusa --- .../prog/en/modules/circ/waitingreserves.tt | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt index 1de9bd9eac..5b44502d5c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -15,6 +15,15 @@ [% END %] [% INCLUDE 'doc-head-close.inc' %] +[% FILTER collapse %] + +[% END %] @@ -97,8 +106,8 @@ [% WRAPPER tab_panels %] [% WRAPPER tab_panel tabname="holdswaiting" bt_active= 1 %] [% IF ( reserveloop ) %] -
- +
+
[% INCLUDE waiting_holds.inc table_name='holdst' reserveloop=reserveloop tab='holdwaiting' %] [% ELSE %] @@ -108,8 +117,8 @@ [% WRAPPER tab_panel tabname="holdsover" %] [% IF ( overloop ) %] -
- +
+
[% INCLUDE 'csrf-token.inc' %] @@ -117,15 +126,22 @@ [% IF TransferWhenCancelAllWaitingHolds %] - + [% ELSE %] - + [% END %]
[% UNLESS TransferWhenCancelAllWaitingHolds %] -
Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds syspref)
+
Only items that need not be transferred will be cancelled + [% IF ( CAN_user_parameters_manage_sysprefs ) %] + (TransferWhenCancelAllWaitingHolds syspref) + [% ELSE %] + (TransferWhenCancelAllWaitingHolds syspref) + [% END %] +
[% END %] [% INCLUDE waiting_holds.inc table_name='holdso' reserveloop=overloop tab='holdsover' %] [% ELSE %] @@ -135,8 +151,8 @@ [% WRAPPER tab_panel tabname="holdscancelled" %] [% IF cancel_reqs_count %] -
- +
+
[% INCLUDE waiting_holds.inc select_column='1' table_name='holdscr' reserveloop=cancel_reqs tab='holdscr' %] [% ELSE %] -- 2.34.1