Bugzilla – Attachment 86747 Details for
Bug 22537
Don't show Suspend all holds button when holds can no longer be susppended in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended.
Bug-22537-Suspend-all-hold-button-appears-even-if-.patch (text/plain), 6.58 KB, created by
Owen Leonard
on 2019-03-19 14:50:43 UTC
(
hide
)
Description:
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended.
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-03-19 14:50:43 UTC
Size:
6.58 KB
patch
obsolete
>From 9bceea47d6d80b8116115b652987728a879626f9 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 19 Mar 2019 14:43:52 +0000 >Subject: [PATCH] Bug 22537: Suspend all hold button appears even if the hold > can no longer be suspended. > >This patch adds to the user summary page in the OPAC a check for waiting >or in-transit holds. If all holds are waiting or in transit the "Suspend >all" controls will be hidden. > >This patch also adds a missing $KohaDates filter to the "suspended >until" date. > >To test, apply the patch and log in to the OPAC as a patron with holds. >Test these conditions: > > - All holds are waiting and/or in transit > - The "Suspend holds" controls at the bottom of the page should not > appear. > - Some holds are waiting and/or in transit > - The "Suspend holds" controls should appear. >--- > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 46 ++++++++++++---------- > 1 file changed, 26 insertions(+), 20 deletions(-) > >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 7c55d8d..c3c95a8 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -626,7 +626,11 @@ > </tr> > </thead> > <tbody> >+ [% SET all_holds_waiting = 1 %] > [% FOREACH RESERVE IN RESERVES %] >+ [% UNLESS ( RESERVE.is_waiting || RESERVE.is_in_transit ) %] >+ [% SET all_holds_waiting = 0 %] >+ [% END %] > [% IF ( RESERVE.is_waiting ) %] > [% IF ( RESERVE.is_at_destination ) %] > [% IF ( RESERVE.is_found ) %] >@@ -710,7 +714,7 @@ > Item in transit from <b> [% Branches.GetName( transfer.frombranch ) | html %]</b> since > [% transfer.datesent | $KohaDates %] > [% ELSIF ( RESERVE.suspend ) %] >- Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until | html %] [% END %] >+ Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until | $KohaDates %] [% END %] > [% ELSE %] > [% IF RESERVE.itemtype %] > Pending for next available item of item type '[% ItemTypes.GetDescription( RESERVE.itemtype ) | html %]' >@@ -780,25 +784,27 @@ > </table> > > [% IF SuspendHoldsOpac %] >- <div> >- <form class="form-inline" id="suspend_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> >- <button type="submit" id="suspend_all_submit" class="btn"><i class="fa fa-pause"></i> Suspend all holds</button> >- <input type="hidden" name="suspend" value="1" /> >- >- [% IF AutoResumeSuspendedHolds %] >- <label for="suspend_until"> until </label> >- <input type="text" name="suspend_until" id="suspend_until" class="suspend-until" readonly="readonly" size="10" /> >- <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date to suspend indefinitely</a> >- [% END %] >- </form> >- </div> >- <br/> >- <div> >- <form id="resume_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> >- <button type="submit" id="resume_all_submit" class="btn"><i class="fa fa-play"></i> Resume all suspended holds</button> >- <input type="hidden" name="suspend" value="0" /> >- </form> >- </div> >+ [% UNLESS ( all_holds_waiting ) %] >+ <div> >+ <form class="form-inline" id="suspend_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> >+ <button type="submit" id="suspend_all_submit" class="btn"><i class="fa fa-pause"></i> Suspend all holds</button> >+ <input type="hidden" name="suspend" value="1" /> >+ >+ [% IF AutoResumeSuspendedHolds %] >+ <label for="suspend_until"> until </label> >+ <input type="text" name="suspend_until" id="suspend_until" class="suspend-until" readonly="readonly" size="10" /> >+ <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date to suspend indefinitely</a> >+ [% END %] >+ </form> >+ </div> >+ <br/> >+ <div> >+ <form id="resume_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> >+ <button type="submit" id="resume_all_submit" class="btn"><i class="fa fa-play"></i> Resume all suspended holds</button> >+ <input type="hidden" name="suspend" value="0" /> >+ </form> >+ </div> >+ [% END %] > [% END %] > </div> <!-- / #opac-user-holds --> > [% END # / #RESERVES.count %] >-- >2.1.4
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 22537
:
86742
|
86747
|
86749
|
88924
|
88985