Bug 7951 - Suspending holds needs a system preference
Adds system preferences SuspendHoldsIntranet and SuspendHoldsOpac. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Conflicts: installer/data/mysql/sysprefs.sql Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
a3d0cd2378
commit
08e57b52a8
|
|
@ -708,7 +708,9 @@ $template->param(
|
|||
soundon => C4::Context->preference("SoundOn"),
|
||||
fast_cataloging => $fast_cataloging,
|
||||
CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"),
|
||||
activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
|
||||
activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
|
||||
SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
|
||||
AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
|
||||
);
|
||||
|
||||
# save stickyduedate to session
|
||||
|
|
@ -733,6 +735,4 @@ $template->param(
|
|||
canned_bor_notes_loop => $canned_notes,
|
||||
);
|
||||
|
||||
$template->param( AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds') );
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -363,4 +363,5 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES (
|
|||
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacStarRatings','all',NULL,'disable|all|details','Choice');
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice');
|
||||
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsIntranet', '1', NULL , 'Allow holds to be suspended from the intranet.', 'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsOpac', '1', NULL , 'Allow holds to be suspended from the OPAC.', 'YesNo');
|
||||
|
|
|
|||
|
|
@ -5235,6 +5235,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
|||
SetVersion($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = "3.09.00.012";
|
||||
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
||||
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsIntranet', '1', NULL , 'Allow holds to be suspended from the intranet.', 'YesNo')");
|
||||
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsOpac', '1', NULL , 'Allow holds to be suspended from the OPAC.', 'YesNo')");
|
||||
print "Upgrade to $DBversion done (Add system preference OpacBrowseResults ))\n";
|
||||
SetVersion($DBversion);
|
||||
}
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=head2 TableExists($table)
|
||||
|
|
|
|||
|
|
@ -350,6 +350,18 @@ Circulation:
|
|||
yes: Allow
|
||||
no: "Don't allow"
|
||||
- suspended holds to be automatically resumed by a set date.
|
||||
-
|
||||
- pref: SuspendHoldsIntranet
|
||||
choices:
|
||||
yes: Allow
|
||||
no: "Don't allow"
|
||||
- holds to be suspended from the intranet.
|
||||
-
|
||||
- pref: SuspendHoldsOpac
|
||||
choices:
|
||||
yes: Allow
|
||||
no: "Don't allow"
|
||||
- holds to be suspended from the OPAC.
|
||||
Fines Policy:
|
||||
-
|
||||
- Calculate fines based on days overdue
|
||||
|
|
|
|||
|
|
@ -990,6 +990,7 @@ No patron matched <span class="ex">[% message %]</span>
|
|||
<fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel marked holds" /></fieldset>
|
||||
</form>
|
||||
|
||||
[% IF SuspendHoldsIntranet %]
|
||||
<fieldset class="action">
|
||||
<form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
|
||||
<input type="hidden" name="from" value="circ" />
|
||||
|
|
@ -1041,8 +1042,9 @@ No patron matched <span class="ex">[% message %]</span>
|
|||
<input type="submit" value="Resume all suspended holds" />
|
||||
</form>
|
||||
</fieldset>
|
||||
[% END # IF SuspendHoldsIntranet %]
|
||||
|
||||
[% ELSE %]
|
||||
[% ELSE %]
|
||||
<p>Patron has nothing on hold.</p>
|
||||
[% END %]
|
||||
</div> <!-- reservesloop -->
|
||||
|
|
|
|||
|
|
@ -646,6 +646,8 @@ function validate1(date) {
|
|||
|
||||
<fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel marked holds" /></fieldset>
|
||||
</form>
|
||||
|
||||
[% IF SuspendHoldsIntranet %]
|
||||
<fieldset class="action">
|
||||
<form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
|
||||
<input type="hidden" name="from" value="borrower" />
|
||||
|
|
@ -697,6 +699,7 @@ function validate1(date) {
|
|||
<input type="submit" value="Resume all suspended holds" />
|
||||
</form>
|
||||
</fieldset>
|
||||
[% END # IF SuspendHoldsIntranet %]
|
||||
|
||||
[% ELSE %]<p>Patron has nothing on hold.</p>[% END %]
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ function checkMultiHold() {
|
|||
<th><img src="/intranet-tmpl/[% theme %]/img/go-bottom.png" border="0" alt="Toggle set to lowest priority" /></th>
|
||||
[% END %]
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
[% IF SuspendHoldsIntranet %]<th> </th><!-- Suspend Holds Column Header -->[% END %]
|
||||
</tr>
|
||||
[% FOREACH reserveloo IN biblioloo.reserveloop %]
|
||||
[% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
|
||||
|
|
@ -730,6 +730,7 @@ function checkMultiHold() {
|
|||
</a>
|
||||
</td>
|
||||
|
||||
[% IF SuspendHoldsIntranet %]
|
||||
<td>
|
||||
[% UNLESS ( reserveloo.wait ) %]
|
||||
<input type="button" value="[% IF ( reserveloo.suspend ) %]Unsuspend[% ELSE %]Suspend[% END %]" onclick="window.location.href='request.pl?action=toggleSuspend&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&date=[% reserveloo.date %]&suspend_until=' + $('#suspend_until_[% reserveloo.borrowernumber %]').val()" />
|
||||
|
|
@ -768,6 +769,8 @@ function checkMultiHold() {
|
|||
<input type="hidden" name="suspend_until" value="" />
|
||||
[% END %]
|
||||
</td>
|
||||
[% END # IF SuspendHoldsIntranet %]
|
||||
|
||||
</tr>
|
||||
|
||||
[% END %] <!-- existing reserveloop -->
|
||||
|
|
|
|||
|
|
@ -421,6 +421,7 @@ $.tablesorter.addParser({
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
[% IF SuspendHoldsOpac %]
|
||||
<div>
|
||||
<form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
|
||||
<input type="submit" name="submit" class="icon delete cancel" value="Suspend all holds" onclick="return confirmDelete('Are you sure you want to suspend all holds?');" />
|
||||
|
|
@ -472,6 +473,7 @@ $.tablesorter.addParser({
|
|||
<input type="hidden" name="suspend" value="0" />
|
||||
</form>
|
||||
</div>
|
||||
[% END %]
|
||||
</div>
|
||||
[% END %]
|
||||
</div><!-- /opac-user views -->
|
||||
|
|
|
|||
|
|
@ -430,7 +430,9 @@ $template->param(
|
|||
samebranch => $samebranch,
|
||||
quickslip => $quickslip,
|
||||
activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
|
||||
AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds') );
|
||||
AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
|
||||
SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
|
||||
);
|
||||
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
||||
|
|
|
|||
|
|
@ -362,7 +362,10 @@ $template->param(
|
|||
);
|
||||
|
||||
$template->param( DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar() );
|
||||
$template->param( AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds') );
|
||||
$template->param(
|
||||
SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'),
|
||||
AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds') ,
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
||||
|
|
|
|||
|
|
@ -633,7 +633,10 @@ if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) {
|
|||
$template->param( reserve_in_future => 1 );
|
||||
}
|
||||
|
||||
$template->param( AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds') );
|
||||
$template->param(
|
||||
SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
|
||||
AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
|
||||
);
|
||||
|
||||
# printout the page
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
|
|
|||
Loading…
Reference in New Issue