Bugzilla – Attachment 88985 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), 5.51 KB, created by
Katrin Fischer
on 2019-04-27 14:38:03 UTC
(
hide
)
Description:
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended.
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-27 14:38:03 UTC
Size:
5.51 KB
patch
obsolete
>From dba56c4fb876ff2513ac8b7c9483d5d731429d09 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 26 Apr 2019 13:55:31 +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. > >Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../bootstrap/en/includes/holds-table.inc | 44 ++++++++++++---------- > 1 file changed, 25 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >index e96a73caa0..b3bb1cf729 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >@@ -32,7 +32,11 @@ > </tr> > </thead> > <tbody> >+ [% SET all_holds_waiting = 1 %] > [% FOREACH HOLD IN HOLDS %] >+ [% UNLESS ( HOLD.is_waiting || HOLD.is_in_transit ) %] >+ [% SET all_holds_waiting = 0 %] >+ [% END %] > [% IF ( HOLD.is_waiting ) %] > [% IF ( HOLD.is_at_destination ) %] > [% IF ( HOLD.is_found ) %] >@@ -127,7 +131,7 @@ > Item in transit from <b> [% Branches.GetName( transfer.frombranch ) | html %]</b> since > [% transfer.datesent | $KohaDates %] > [% ELSIF ( HOLD.suspend ) %] >- Suspended [% IF ( HOLD.suspend_until ) %] until [% HOLD.suspend_until | html %] [% END %] >+ Suspended [% IF ( HOLD.suspend_until ) %] until [% HOLD.suspend_until | $KohaDates %] [% END %] > [% ELSE %] > [% IF HOLD.itemtype %] > Pending for next available item of item type '[% ItemTypes.GetDescription( HOLD.itemtype ) | html %]' >@@ -199,25 +203,27 @@ > </table> > > [% IF SuspendHoldsOpac and ! onlyinfo %] >- <div> >- <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> >- <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_SUSPEND_HOLDS);"><i class="fa fa-pause"></i> Suspend all holds</button> >- <input type="hidden" name="suspend" value="1" /> >+ [% 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 action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> >- <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_RESUME_HOLDS);"><i class="fa fa-play"></i> Resume all suspended holds</button> >- <input type="hidden" name="suspend" value="0" /> >- </form> >- </div> >+ [% 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 # / #HOLDS.count %] >-- >2.11.0
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