@@ -, +, @@ circSidebar syspref to activate/deactivate --- circ/branchoverdues.pl | 9 ++- circ/branchtransfers.pl | 11 +++- circ/on-site_checkouts.pl | 10 +++- circ/renew.pl | 10 +++- circ/returns.pl | 9 ++- circ/selectbranchprinter.pl | 10 +++- circ/transferstoreceive.pl | 11 +++- circ/view_holdsqueue.pl | 9 ++- circ/waitingreserves.pl | 11 +++- .../bug_16530-add_CircSidebar_syspref.sql | 1 + installer/data/mysql/sysprefs.sql | 1 + .../intranet-tmpl/prog/en/includes/circ-nav.inc | 54 +++++++++++++++++ .../en/modules/admin/preferences/circulation.pref | 6 ++ .../prog/en/modules/circ/branchoverdues.tt | 10 +++- .../prog/en/modules/circ/branchtransfers.tt | 13 ++++- .../prog/en/modules/circ/circulation.tt | 20 +++++-- .../prog/en/modules/circ/on-site_checkouts.tt | 3 +- .../intranet-tmpl/prog/en/modules/circ/renew.tt | 14 +++-- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 68 +++++++++++++++++----- .../prog/en/modules/circ/selectbranchprinter.tt | 10 +++- .../prog/en/modules/circ/transferstoreceive.tt | 10 +++- .../prog/en/modules/circ/view_holdsqueue.tt | 10 +++- .../prog/en/modules/circ/waitingreserves.tt | 10 +++- 23 files changed, 275 insertions(+), 45 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_16530-add_CircSidebar_syspref.sql create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc --- a/circ/branchoverdues.pl +++ a/circ/branchoverdues.pl @@ -27,6 +27,7 @@ use C4::Biblio; use C4::Koha; use C4::Debug; use Koha::DateUtils; +use Koha::BiblioFrameworks; use Data::Dumper; =head1 branchoverdues.pl @@ -61,7 +62,7 @@ use Data::Dumper; my $input = new CGI; my $dbh = C4::Context->dbh; -my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ +my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user({ template_name => "circ/branchoverdues.tt", query => $input, type => "intranet", @@ -155,4 +156,10 @@ $template->param( location => $location, ); +# Checking if there is a Fast Cataloging Framework +$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); + +# Checking if the transfer page needs to be displayed +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); + output_html_with_http_headers $input, $cookie, $template->output; --- a/circ/branchtransfers.pl +++ a/circ/branchtransfers.pl @@ -31,7 +31,7 @@ use C4::Items; use C4::Auth qw/:DEFAULT get_session/; use C4::Koha; use C4::Members; - +use Koha::BiblioFrameworks; use Koha::AuthorisedValues; ############################################### @@ -52,7 +52,7 @@ if (!C4::Context->userenv){ ####################################################################################### # Make the page ..... -my ($template, $user, $cookie) = get_template_and_user( +my ($template, $user, $cookie, $flags ) = get_template_and_user( { template_name => "circ/branchtransfers.tt", query => $query, @@ -236,5 +236,12 @@ $template->param( errmsgloop => \@errmsgloop, CircAutocompl => C4::Context->preference("CircAutocompl") ); + +# Checking if there is a Fast Cataloging Framework +$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); + +# Checking if the transfer page needs to be displayed +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); + output_html_with_http_headers $query, $cookie, $template->output; --- a/circ/on-site_checkouts.pl +++ a/circ/on-site_checkouts.pl @@ -21,10 +21,12 @@ use Modern::Perl; use C4::Auth; use C4::Circulation qw( GetPendingOnSiteCheckouts ); use C4::Output; +use C4::Koha; +use Koha::BiblioFrameworks; my $cgi = new CGI; -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( +my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( { template_name => "circ/on-site_checkouts.tt", query => $cgi, @@ -34,6 +36,12 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +# Checking if there is a Fast Cataloging Framework +$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); + +# Checking if the transfer page needs to be displayed +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); + my $pending_onsite_checkouts = C4::Circulation::GetPendingOnSiteCheckouts(); $template->param( --- a/circ/renew.pl +++ a/circ/renew.pl @@ -24,12 +24,14 @@ use C4::Context; use C4::Auth qw/:DEFAULT get_session/; use C4::Output; use C4::Circulation; +use C4::Koha; use Koha::DateUtils; use Koha::Database; +use Koha::BiblioFrameworks; my $cgi = new CGI; -my ( $template, $librarian, $cookie ) = get_template_and_user( +my ( $template, $librarian, $cookie, $flags ) = get_template_and_user( { template_name => "circ/renew.tt", query => $cgi, @@ -116,4 +118,10 @@ if ($barcode) { ); } +# Checking if there is a Fast Cataloging Framework +$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); + +# Checking if the transfer page needs to be displayed +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); + output_html_with_http_headers( $cgi, $cookie, $template->output ); --- a/circ/returns.pl +++ a/circ/returns.pl @@ -51,11 +51,12 @@ use Koha::AuthorisedValues; use Koha::DateUtils; use Koha::Calendar; use Koha::Checkouts; +use Koha::BiblioFrameworks; my $query = new CGI; #getting the template -my ( $template, $librarian, $cookie ) = get_template_and_user( +my ( $template, $librarian, $cookie, $flags ) = get_template_and_user( { template_name => "circ/returns.tt", query => $query, @@ -647,5 +648,11 @@ if ( $itemnumber ) { } } +# Checking if there is a Fast Cataloging Framework +$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); + +# Checking if the transfer page needs to be displayed +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); + # actually print the page! output_html_with_http_headers $query, $cookie, $template->output; --- a/circ/selectbranchprinter.pl +++ a/circ/selectbranchprinter.pl @@ -26,14 +26,14 @@ use C4::Output; use C4::Auth qw/:DEFAULT get_session/; use C4::Print; # GetPrinters use C4::Koha; - +use Koha::BiblioFrameworks; use Koha::Libraries; # this will be the script that chooses branch and printer settings.... my $query = CGI->new(); -my ( $template, $borrowernumber, $cookie ) = get_template_and_user({ +my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user({ template_name => "circ/selectbranchprinter.tt", query => $query, type => "intranet", @@ -134,4 +134,10 @@ $template->param( recycle_loop=> \@recycle_loop, ); +# Checking if there is a Fast Cataloging Framework +$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); + +# Checking if the transfer page needs to be displayed +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); + output_html_with_http_headers $query, $cookie, $template->output; --- a/circ/transferstoreceive.pl +++ a/circ/transferstoreceive.pl @@ -24,7 +24,6 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output; use C4::Auth; -use Koha::DateUtils; use C4::Biblio; use C4::Circulation; use C4::Members; @@ -37,11 +36,13 @@ use Date::Calc qw( use C4::Koha; use C4::Reserves; use Koha::Libraries; +use Koha::DateUtils; +use Koha::BiblioFrameworks; my $input = new CGI; my $itemnumber = $input->param('itemnumber'); -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( +my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( { template_name => "circ/transferstoreceive.tt", query => $input, @@ -124,5 +125,11 @@ $template->param( latetransfers => $latetransfers ? 1 : 0, ); +# Checking if there is a Fast Cataloging Framework +$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); + +# Checking if the transfer page needs to be displayed +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); + output_html_with_http_headers $input, $cookie, $template->output; --- a/circ/view_holdsqueue.pl +++ a/circ/view_holdsqueue.pl @@ -31,9 +31,10 @@ use C4::Biblio; use C4::Items; use C4::Koha; # GetItemTypes use C4::HoldsQueue qw(GetHoldsQueueItems); +use Koha::BiblioFrameworks; my $query = new CGI; -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( +my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( { template_name => "circ/view_holdsqueue.tt", query => $query, @@ -74,5 +75,11 @@ $template->param( itemtypeloop => \@itemtypesloop, ); +# Checking if there is a Fast Cataloging Framework +$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); + +# Checking if the transfer page needs to be displayed +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); + # writing the template output_html_with_http_headers $query, $cookie, $template->output; --- a/circ/waitingreserves.pl +++ a/circ/waitingreserves.pl @@ -28,7 +28,6 @@ use C4::Circulation; use C4::Members; use C4::Biblio; use C4::Items; -use Koha::DateUtils; use Date::Calc qw( Today Add_Delta_Days @@ -36,6 +35,8 @@ use Date::Calc qw( ); use C4::Reserves; use C4::Koha; +use Koha::DateUtils; +use Koha::BiblioFrameworks; my $input = new CGI; @@ -47,7 +48,7 @@ my $all_branches = $input->param('allbranches') || ''; my $cancelall = $input->param('cancelall'); my $tab = $input->param('tab'); -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( +my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( { template_name => "circ/waitingreserves.tt", query => $input, @@ -163,6 +164,12 @@ $template->param( tab => $tab, ); +# Checking if there is a Fast Cataloging Framework +$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); + +# Checking if the transfer page needs to be displayed +$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) ); + if ($item && $tab eq 'holdsover' && !@cancel_result) { print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover"); } elsif ($cancelall) { --- a/installer/data/mysql/atomicupdate/bug_16530-add_CircSidebar_syspref.sql +++ a/installer/data/mysql/atomicupdate/bug_16530-add_CircSidebar_syspref.sql @@ -0,0 +1, @@ +INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('CircSidebar','0','','Activate or deactivate the navigation sidebar on all Circulation pages','YesNo'); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -102,6 +102,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'), ('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'), ('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'), +('CircSidebar','0',NULL,'Activate or deactivate the navigation sidebar on all Circulation pages','YesNo'), ('ClaimsBccCopy','0','','Bcc the ClaimAcquisition and ClaimIssues alerts','YesNo'), ('Coce','0', NULL, 'If on, enables cover retrieval from the configured Coce server', 'YesNo'), ('CoceHost', '', NULL, 'Coce server URL', 'Free'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc @@ -0,0 +1,54 @@ + + + --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -2,6 +2,12 @@ Circulation: # FIXME: printcirculationslips is also omitted. It _technically_ could work, but C4::Print is HLT specific and needs a little bit of refactoring. Interface: - + - pref: CircSidebar + choices: + yes: Activate + no: Deactivate + - the navigation sidebar on all Circulation pages. + - - pref: CircAutocompl choices: yes: Try --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt @@ -1,4 +1,5 @@ [% USE Branches %] +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Overdues at [% LoginBranchname %] [% INCLUDE 'doc-head-close.inc' %] @@ -9,10 +10,11 @@ -
+[% IF Koha.Preference('CircSidebar') %]
[% ELSE %]
[% END %]
+ [% IF Koha.Preference('CircSidebar') %]
[% END %]
@@ -163,5 +165,11 @@
+[% IF Koha.Preference('CircSidebar') %] +
+
+ [% INCLUDE 'circ-nav.inc' %] +
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ -12,9 +12,10 @@ -
+[% IF Koha.Preference('CircSidebar') %]
[% ELSE %]
[% END %]
- +
+[% IF Koha.Preference('CircSidebar') %]
[% END %] [% IF ( found ) %]

Reserve found

@@ -196,6 +197,12 @@ [% END %] - + +[% IF Koha.Preference('CircSidebar') %] +
+[% INCLUDE 'circ-nav.inc' %] +
+[% END %] + [% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1005,12 +1005,24 @@ No patron matched [% message | html %] [% END %] [% END %] - +[% IF Koha.Preference('CircSidebar') %] +[% UNLESS ( borrowers ) %] + [% IF not( borrowernumber and borrower ) %] +
+ [% INCLUDE 'circ-nav.inc' %] +
+ [% END %] +[% END %] +[% END %] -[% UNLESS ( borrowers ) %][% IF borrowernumber and borrower %]
-[% INCLUDE 'circ-menu.inc' %] -
[% END %][% END %] +[% UNLESS ( borrowers ) %] + [% IF borrowernumber and borrower %] +
+ [% INCLUDE 'circ-menu.inc' %] +
+ [% END %] +[% END %]
- [% INCLUDE 'circ-menu.inc' %] + [% IF Koha.Preference('CircSidebar') %][% INCLUDE 'circ-nav.inc' %][% END %]
[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -26,9 +26,10 @@ -
+[% IF Koha.Preference('CircSidebar') %]
[% ELSE %]
[% END %]
- +
+ [% IF Koha.Preference('CircSidebar') %]
[% END %] [% IF error %]

Cannot renew:

@@ -140,7 +141,6 @@

[% END %] -
@@ -163,9 +163,15 @@ [% END %]
-
+[% IF Koha.Preference('CircSidebar') %] +
+ +
+ [% INCLUDE 'circ-nav.inc' %] +
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -155,11 +155,11 @@ $(document).ready(function () { -
- -
-
+[% IF Koha.Preference('CircSidebar') %]
[% ELSE %]
[% END %] +
+
+[% IF Koha.Preference('CircSidebar') %]
[% END %]
[% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %] @@ -634,15 +634,48 @@ $(document).ready(function () { [% END %] [% IF ( errmsgloo.prevdebarred ) %]

Reminder: Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].

- [% END %] - [% IF ( errmsgloo.foreverdebarred ) %] -

Reminder: Patron has an indefinite restriction.

- [% END %] - [% END %] - [% ELSE %] + [% IF ( errmsgloo.badbarcode ) %] +

No item with barcode: [% errmsgloo.msg %]

+ [% END %] + [% IF ( errmsgloo.ispermanent ) %] +

Please return item to: [% errmsgloo.msg %]

+ [% END %] + [% IF ( errmsgloo.notissued ) %] +

Not checked out.

+ [% END %] + [% IF ( errmsgloo.localuse) %] +

Local use recorded

+ [% END %] + [% IF ( errmsgloo.waslost ) %] +

Item was lost, now found.

+ [% IF ( LostItemFeeRefunded ) %] +

A refund has been applied to the borrowing patron's account.

+ [% ELSE %] +

Any lost item fees for this item will remain on the patron's account.

+ [% END %] + [% END %] + [% IF ( errmsgloo.withdrawn ) %] + [% IF BlockReturnOfWithdrawnItems %] +
Cannot check in
+

NOT CHECKED IN

+

Item is withdrawn.

+ [% ELSE %] +

Item is withdrawn.

+ [% END %] + [% END %] + [% IF ( errmsgloo.debarred ) %] +

[% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %]) is now debarred until [% errmsgloo.debarred | $KohaDates %].

+ [% END %] + [% IF ( errmsgloo.prevdebarred ) %] +

Reminder: Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].

+ [% END %] + [% IF ( errmsgloo.foreverdebarred ) %] +

Reminder: Patron has an indefinite restriction.

+ [% END %] [% END %]
+[% END %] [% IF ( checkinmsg ) %] [% IF ( checkinmsgtype == 'alert' ) %] @@ -664,7 +697,7 @@ $(document).ready(function () {

Book drop mode. (Effective checkin date is [% dropboxdate %] ).

-
+
@@ -791,9 +824,16 @@ $(document).ready(function () { [% END %] -
+ [% END %] - - +
+[% IF Koha.Preference('CircSidebar') %] +
+
+ [% INCLUDE 'circ-nav.inc' %] +
+[% END %] +
+
[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt @@ -1,4 +1,5 @@ [% USE Branches %] +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Set library [% INCLUDE 'doc-head-close.inc' %] @@ -16,7 +17,7 @@ › Set library
-
+[% IF Koha.Preference('CircSidebar') %]
[% ELSE %]
[% END %]
@@ -89,5 +90,10 @@ Updated:
-
+[% IF Koha.Preference('CircSidebar') %] +
+ [% INCLUDE 'circ-nav.inc' %] +
+[% END %] +
[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% USE KohaDates %] [% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] @@ -29,10 +30,11 @@ $(document).ready(function() { -
+[% IF Koha.Preference('CircSidebar') %]
[% ELSE %]
[% END %]
+ [% IF Koha.Preference('CircSidebar') %]
[% END %]

Transfers made to your library as of [% show_date | $KohaDates %]

@@ -95,5 +97,11 @@ $(document).ready(function() {
+[% IF Koha.Preference('CircSidebar') %] +
+
+ [% INCLUDE 'circ-nav.inc' %] +
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% USE KohaDates %] [% USE ItemTypes %] [% USE Branches %] @@ -53,10 +54,11 @@ $(document).ready(function() { [% IF ( run_report ) %] › Results[% END %]
-
+[% IF Koha.Preference('CircSidebar') %]
[% ELSE %]
[% END %]
+ [% IF Koha.Preference('CircSidebar') %]
[% END %]

Holds queue

@@ -226,5 +228,11 @@ $(document).ready(function() {
+[% IF Koha.Preference('CircSidebar') %] +
+
+ [% INCLUDE 'circ-nav.inc' %] +
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% USE KohaDates %] [% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] @@ -31,10 +32,11 @@ › Holds awaiting pickup
-
+[% IF Koha.Preference('CircSidebar') %]
[% ELSE %]
[% END %]
+ [% IF Koha.Preference('CircSidebar') %]
[% END %]

Holds awaiting pickup for your library on: [% show_date | $KohaDates %] @@ -201,5 +203,11 @@

+[% IF Koha.Preference('CircSidebar') %] +
+
+ [% INCLUDE 'circ-nav.inc' %] +
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %] --