@@ -, +, @@
---
.../bug_19532_-_add_Recalls_syspref.sql | 1 +
installer/data/mysql/sysprefs.sql | 1 +
.../intranet-tmpl/prog/en/includes/circ-menu.inc | 2 ++
.../intranet-tmpl/prog/en/includes/circ-nav.inc | 8 ++++---
.../prog/en/includes/members-menu.inc | 3 +++
.../en/modules/admin/preferences/circulation.pref | 17 +++++++++----
.../prog/en/modules/circ/circulation-home.tt | 8 ++++---
.../prog/en/modules/circ/circulation.tt | 4 ++--
.../prog/en/modules/circ/recalls_overdue.tt | 7 ++++++
.../prog/en/modules/circ/recalls_queue.tt | 28 ++++++++++++++--------
.../prog/en/modules/circ/recalls_waiting.tt | 8 +++++++
.../prog/en/modules/members/moremember.tt | 4 ++--
.../prog/en/modules/members/recallshistory.tt | 14 ++++++++---
.../opac-tmpl/bootstrap/en/includes/usermenu.inc | 12 ++++++----
.../opac-tmpl/bootstrap/en/modules/opac-recall.tt | 10 ++++++++
.../opac-tmpl/bootstrap/en/modules/opac-recalls.tt | 8 +++++++
.../opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 ++--
members/recallshistory.pl | 26 +++++++++++++++++---
opac/opac-detail.pl | 2 +-
19 files changed, 128 insertions(+), 39 deletions(-)
create mode 100644 installer/data/mysql/atomicupdate/bug_19532_-_add_Recalls_syspref.sql
--- a/installer/data/mysql/atomicupdate/bug_19532_-_add_Recalls_syspref.sql
+++ a/installer/data/mysql/atomicupdate/bug_19532_-_add_Recalls_syspref.sql
@@ -0,0 +1, @@
+INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('UseRecalls','1',NULL,'Enable or disable recalls','YesNo');
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -588,6 +588,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
+('UseRecalls', '1', NULL, 'Enable or disable recalls', 'YesNo'),
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
@@ -120,6 +120,8 @@
[% IF Koha.Preference('ILLModule') %]
Interlibrary loans
[% END %]
+ [% IF Koha.Preference('UseRecalls') %]
Recalls history
+ [% END %]
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc
@@ -49,9 +49,11 @@
[% IF Koha.Preference('OnSiteCheckouts') %]
Pending on-site checkouts
[% END %]
- Recalls queue
- Overdue recalls
- Recalls awaiting pickup
+ [% IF Koha.Preference('UseRecalls') %]
+ Recalls queue
+ Overdue recalls
+ Recalls awaiting pickup
+ [% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc
@@ -23,6 +23,9 @@
[% IF Koha.Preference('HouseboundModule') %]
[% IF houseboundview %][% ELSE %] [% END %]Housebound
[% END %]
+ [% IF Koha.Preference('UseRecalls') %]
+ Recalls history
+ [% END %]
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
@@ -160,11 +160,6 @@ Circulation:
Checkout Policy:
-
- - Mark a recall as problematic if it has been waiting to be picked up for
- - pref: RecallsMaxPickUpDelay
- - class: integer
- - days.
- -
- pref: AllowTooManyOverride
choices:
yes: Allow
@@ -880,6 +875,18 @@ Circulation:
yes: Enable
no: Disable
- "housebound module"
+ Recalls:
+ -
+ - pref: UseRecalls
+ choices:
+ yes: Use
+ no: "Don't use"
+ - recalls
+ -
+ - Mark a recall as problematic if it has been waiting to be picked up for
+ - pref: RecallsMaxPickUpDelay
+ - class: integer
+ - days.
Article Requests:
-
- pref: ArticleRequests
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
@@ -55,9 +55,11 @@
[% IF Koha.Preference('OnSiteCheckouts') %]
Pending on-site checkouts
[% END %]
- Recalls queue
- Overdue recalls
- Recalls awaiting pickup
+ [% IF Koha.Preference('UseRecalls') %]
+ Recalls queue
+ Overdue recalls
+ Recalls awaiting pickup
+ [% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -818,7 +818,7 @@ No patron matched [% message | html %]
[% END %]
- [% IF recalls.count %]
+ [% IF Koha.Preference('UseRecalls') && recalls.count %]
[% recalls.count %] Recall(s)
[% END %]
@@ -932,7 +932,7 @@ No patron matched [% message | html %]
[% END %]
-[% IF recalls.count %]
+[% IF Koha.Preference('UseRecalls') && recalls.count %]
[% INCLUDE 'recalls.inc' %]
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt
@@ -27,6 +27,7 @@
Overdue recalls
+ [% IF Koha.Preference('UseRecalls') %]
[% IF recalls.count %]
@@ -103,6 +104,12 @@
[% END %]
+ [% ELSE %]
+
+
Recalls have not been enabled. Enable the
UseRecalls system preference to use recalls.
+
+ [% END %]
+
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_queue.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_queue.tt
@@ -28,23 +28,31 @@
Recalls queue
- [% IF recalls.count %]
+ [% IF Koha.Preference('UseRecalls') %]
-
+ [% INCLUDE 'recalls-reports.inc' %]
+
+
+ Cancel selected recalls
+
+
+
+ [% ELSE %]
+
+ No recalls have been made.
+
+ [% END %]
[% ELSE %]
- No recalls have been made.
+ Recalls have not been enabled. Enable the
UseRecalls system preference to use recalls.
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_waiting.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_waiting.tt
@@ -40,6 +40,8 @@
Recalls awaiting pickup
+ [% IF Koha.Preference('UseRecalls') %]
+
[% IF recalls.size > 0 %]
@@ -152,6 +154,12 @@
[% END %]
+ [% ELSE %]
+
+
Recalls have not been enabled. Enable the
UseRecalls system preference to use recalls.
+
+ [% END %]
+
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -415,7 +415,7 @@
0 Holds
[% END %]
- [% IF recalls.count %]
+ [% IF Koha.Preference('UseRecalls') && recalls.count %]
[% recalls.count %] Recall(s)
[% END %]
[% IF Koha.Preference('ArticleRequests') %]
@@ -530,7 +530,7 @@
[% ELSE %]Patron has nothing on hold.
[% END %]
-[% IF recalls %]
+[% IF Koha.Preference('UseRecalls') && recalls %]
[% INCLUDE 'recalls.inc' %]
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/recallshistory.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/recallshistory.tt
@@ -1,7 +1,7 @@
[% USE KohaDates %]
[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
-Recalls history for [% patron.firstname %] [% patron.surname %]
+Recalls history for [% INCLUDE 'patron-title.inc' %]
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'datatables.inc' %]
@@ -14,7 +14,7 @@
Home ›
Patrons ›
- Recalls history for [% patron.firstname %] [% patron.surname %]
+ Recalls history for [% INCLUDE 'patron-title.inc' %]
@@ -26,7 +26,15 @@
Recalls history
- [% INCLUDE 'recalls.inc' %]
+ [% IF Koha.Preference('UseRecalls') %]
+
+ [% INCLUDE 'recalls.inc' %]
+
+ [% ELSE %]
+
+
Recalls have not been enabled. Enable the
UseRecalls system preference to use recalls.
+
+ [% END %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc
@@ -114,12 +114,14 @@
your interlibrary loan requests
[% END %]
- [% IF ( recallsview ) %]
-
- [% ELSE %]
-
+ [% IF Koha.Preference('UseRecalls') %]
+ [% IF ( recallsview ) %]
+
+ [% ELSE %]
+
+ [% END %]
+ your recalls history
[% END %]
- your recalls history
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt
@@ -24,6 +24,9 @@
Recall an item
+
+ [% IF Koha.Preference('UseRecalls') %]
+
[% IF error %]
[% IF error == 'notloggedin' %]
@@ -52,6 +55,13 @@
[% END %]
[% END %]
+
+ [% ELSE %]
+
+ Recalls have not been enabled. Please contact your library.
+
+ [% END %]
+
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt
@@ -27,6 +27,8 @@
Recalls history
+ [% IF Koha.Preference('UseRecalls') %]
+
[% IF RECALLS.count %]
@@ -114,6 +116,12 @@
[% END # / # RECALLS.count %]
+ [% ELSE %]
+
+ Recalls have not been enabled. Please contact your library.
+
+ [% END %]
+
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
@@ -154,7 +154,7 @@ Using this account is not recommended because some parts of Koha will not functi
[% END %]
[% IF ( RESERVES.count ) %]Holds ([% RESERVES.count %]) [% END %]
- [% IF ( RECALLS.count ) %]Recalls ([% RECALLS.count %]) [% END %]
+ [% IF ( Koha.Preference('UseRecalls') && RECALLS.count ) %]Recalls ([% RECALLS.count %]) [% END %]
[% IF Koha.Preference('ArticleRequests') && borrower.article_requests_current %]Article requests ([% borrower.article_requests_current.count %]) [% END %]
[% IF ( OverDriveCirculation ) %]
OverDrive Account
@@ -778,7 +778,7 @@ Using this account is not recommended because some parts of Koha will not functi
[% END # / #RESERVES.count %]
- [% IF RECALLS.count %]
+ [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
Recalls ([% RECALLS.count %])
--- a/members/recallshistory.pl
+++ a/members/recallshistory.pl
@@ -44,10 +44,30 @@ my $recalls = Koha::Recalls->search({ borrowernumber => $loggedinuser });
my $patron = Koha::Patrons->find($loggedinuser);
+$template->param( picture => 1 ) if $patron->image;
+
$template->param(
- recalls => $recalls,
- patron => $patron,
- recallsview => 1
+ recalls => $recalls,
+ recallsview => 1,
+ borrowernumber => $loggedinuser,
+ title => $patron->title,
+ initials => $patron->initials,
+ surname => $patron->surname,
+ firstname => $patron->firstname,
+ cardnumber => $patron->cardnumber,
+ categorycode => $patron->categorycode,
+ category_type => $patron->category->category_type,
+ categoryname => $patron->category->description,
+ address => $patron->address,
+ streetnumber => $patron->streetnumber,
+ streettype => $patron->streettype,
+ address2 => $patron->address2,
+ city => $patron->city,
+ zipcode => $patron->zipcode,
+ country => $patron->country,
+ phone => $patron->phone,
+ email => $patron->email,
+ branchcode => $patron->branchcode
);
output_html_with_http_headers $input, $cookie, $template->output;
--- a/opac/opac-detail.pl
+++ a/opac/opac-detail.pl
@@ -709,7 +709,7 @@ if ( not $viewallitems and @items > $max_items_to_display ) {
if grep /^$itm->{itemnumber}$/, @itemnumbers_on_order;
}
- if ( $itm->{datedue} && $borrowernumber && $itm->{borrowernumber} != $borrowernumber ) {
+ if ( $itm->{datedue} && $borrowernumber && $itm->{borrowernumber} != $borrowernumber && C4::Context->preference('UseRecalls') ) {
$itm->{avail_for_recall} = 1;
}
--