diff --git a/circ/circulation.pl b/circ/circulation.pl index b6d89415e9..fc22271fc8 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -710,7 +710,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 @@ -735,6 +737,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; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 79f192f8fc..241348a057 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -366,3 +366,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SvcMaxReportRows','10','Maximum number of rows to return via the report web service.',NULL,'Integer'); 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('IssueLostItem', 'alert', 'alert|confirm|nothing', 'Defines what should be done when an attempt is made to issue an item that has been marked as lost.', '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'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4ffac53fef..9cd4b14a78 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -5328,6 +5328,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) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 00974a6707..d2d11b4ae8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -358,6 +358,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 diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index aaa046423e..687773725d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -994,6 +994,7 @@ No patron matched [% message %]
+ [% IF SuspendHoldsIntranet %] + [% END # IF SuspendHoldsIntranet %] - [% ELSE %] +[% ELSE %]Patron has nothing on hold.
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 1e756df3af..9ff94ae5c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -646,6 +646,8 @@ function validate1(date) { + + [% IF SuspendHoldsIntranet %] + [% END # IF SuspendHoldsIntranet %] [% ELSE %]Patron has nothing on hold.
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 5e734eef9c..8e8470bd23 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -598,7 +598,7 @@ function checkMultiHold() {