From 05a035f20ecca82ab95df797c3258ed2fe2abfc4 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 30 Jan 2025 16:44:45 +0000 Subject: [PATCH] Bug 39003: Move SuspendHoldsOpac check from script to template To test: 1. SuspendHoldsOpac to 'allow' 2. Make some holds for a patron 3. Log in as that patron and go to 'Summary' 4. Click the 'Holds' tab 5. No suspend column 6. APPLY PATCH, restart_all 7. Try again, the column should show. 8. Turn off SuspendHoldsOpac, the column should be hidden. --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 1 + opac/opac-user.pl | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index a2b2f208fd2..6768f6a8b90 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -15,6 +15,7 @@ [% SET borrower_enrollable_clubs = logged_in_user.get_enrollable_clubs(1) %] [% SET OverDriveEnabled = ( Koha.Preference( "OPACOverDrive" ) && Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') ) %] [% SET OverDriveCirculation = ( OverDriveEnabled && Koha.Preference( "OverDriveCirculation" ) ) %] +[% SET SuspendHoldsOpac = Koha.Preference( "SuspendHoldsOpac" ) %] [% INCLUDE 'doc-head-open.inc' %] Your library home › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 3f1ca4ad59e..d21315a49eb 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -412,7 +412,6 @@ $template->param( OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"), userview => 1, tab => $query->param('tab'), - SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'), AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'), OpacHoldNotes => C4::Context->preference('OpacHoldNotes'), failed_holds => scalar $query->param('failed_holds'), -- 2.39.5