Bugzilla – Attachment 20710 Details for
Bug 10774
Allow individual holds to be suspended and resumed from the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10774 - Allow individual holds to be suspended and resumed from the OPAC
Bug-10774---Allow-individual-holds-to-be-suspended.patch (text/plain), 6.24 KB, created by
Kyle M Hall (khall)
on 2013-08-28 15:30:33 UTC
(
hide
)
Description:
Bug 10774 - Allow individual holds to be suspended and resumed from the OPAC
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-08-28 15:30:33 UTC
Size:
6.24 KB
patch
obsolete
>From 0abaa3d2c4b1ba563d2af00a189156ee8800f98d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 21 Aug 2013 07:30:54 -0400 >Subject: [PATCH] Bug 10774 - Allow individual holds to be suspended and resumed from the OPAC > >Right now, holds can only be suspended and resumed from the OPAC as a >whole. It would be nice to be able to suspend and resume holds on a hold >by hold basis from the OPAC. > >Test Plan: >1) Apply this patch >2) Log in to the OPAC >3) Place a number of holds >4) Browse to "my summary" and select the holds tab >5) From here, test the following actions > a) Suspend a hold indefinitely ( no resume date ) > b) Suspend a hold with a date to automatically resume > c) Manually resume a suspended hold >6) Disable AutoResumeSuspendedHolds, ensure the suspend until date field > is no longer visible. >7) Disable SuspendHoldsOpac, ensure all suspension related fields are > no longer visible. >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 53 +++++++++++++++++----- > opac/opac-modrequest-suspend.pl | 16 +++++-- > 2 files changed, 52 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >index 31d6c32..a210aba 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >@@ -47,7 +47,7 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended > $("#renewall").submit(); > }); > $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %] >- $( "#suspend_until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future >+ $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future > }); > //]]> > </script> >@@ -351,20 +351,28 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended > <div id="opac-user-holds"> > <table id="holdst"> > <caption>Holds <span class="count">([% reserves_count %] total)</span></caption> >- <!-- RESERVES TABLE ROWS --> >- <thead><tr> >+ >+ <!-- RESERVES TABLE ROWS --> >+ <thead> >+ <tr> > <th>Title</th> > <th class="psort">Placed on</th> >- [% IF OpacHoldNotes %]<th>Notes</th>[% END %] >- <th>Expires on</th> >+ [% IF OpacHoldNotes %] >+ <th>Notes</th> >+ [% END %] >+ <th>Expires on</th> > <th>Pick up location</th> >- [% IF ( showpriority ) %] >- <th>Priority</th> >- [% END %] >+ [% IF ( showpriority ) %] >+ <th>Priority</th> >+ [% END %] > <th>Status</th> >- <th class="nosort">Modify</th> >- </tr></thead> >- <tbody> >+ <th class="nosort">Modify</th> >+ [% IF SuspendHoldsOpac %] >+ <th class="nosort" >Suspend individual holds</th> >+ [% END %] >+ </tr> >+ </thead> >+ <tbody> > [% FOREACH RESERVE IN RESERVES %] > [% IF ( RESERVE.wait ) %] > [% IF ( RESERVE.atdestination ) %] >@@ -428,6 +436,27 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended > [% END %] > </td> > >+ [% IF SuspendHoldsOpac %] >+ <td> >+ [% IF ( RESERVE.cancelable ) %] >+ <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> >+ <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" /> >+ >+ [% IF RESERVE.suspend %] >+ <input type="submit" name="submit" value="Resume suspended hold" /> >+ [% ELSE %] >+ <input type="submit" name="submit" class="icon delete cancel" value="Suspend hold" /> >+ >+ [% IF AutoResumeSuspendedHolds %] >+ <label for="suspend_until_[% RESERVE.reserve_id %]"> until </label> >+ <input name="suspend_until" id="suspend_until_[% RESERVE.reserve_id %]" class="suspend-until" readonly="readonly" size="10" /> >+ <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until_[% RESERVE.reserve_id %]').value='';return false;">Clear date</a> >+ [% END %] >+ [% END %] >+ </form> >+ [% END %] >+ </td> >+ [% END %] > > </tr> > [% END %] >@@ -442,7 +471,7 @@ var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended > > [% IF AutoResumeSuspendedHolds %] > <label for="suspend_until"> until </label> >- <input name="suspend_until" id="suspend_until" readonly="readonly" size="10" /> >+ <input 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</a></p> > [% END %] > </form> >diff --git a/opac/opac-modrequest-suspend.pl b/opac/opac-modrequest-suspend.pl >index ec15265..e153538 100755 >--- a/opac/opac-modrequest-suspend.pl >+++ b/opac/opac-modrequest-suspend.pl >@@ -36,11 +36,17 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > > my $suspend = $query->param('suspend'); > my $suspend_until = $query->param('suspend_until') || undef; >+my $reserve_id = $query->param('reserve_id'); > >-SuspendAll( >- borrowernumber => $borrowernumber, >- suspend => $suspend, >- suspend_until => $suspend_until, >-); >+if ($reserve_id) { >+ ToggleSuspend( $reserve_id, $suspend_until ); >+} >+else { >+ SuspendAll( >+ borrowernumber => $borrowernumber, >+ suspend => $suspend, >+ suspend_until => $suspend_until, >+ ); >+} > > print $query->redirect("/cgi-bin/koha/opac-user.pl#opac-user-holds"); >-- >1.7.2.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 10774
:
20534
|
20535
|
20710
|
23211
|
23212
|
24016
|
24017
|
24018