@@ -, +, @@ circSidebar syspref to activate/deactivate --- circ/branchoverdues.pl | 9 +- circ/branchtransfers.pl | 10 +- circ/renew.pl | 10 +- circ/returns.pl | 9 +- circ/selectbranchprinter.pl | 9 +- circ/transferstoreceive.pl | 9 +- circ/view_holdsqueue.pl | 9 +- circ/waitingreserves.pl | 9 +- .../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 ++- .../intranet-tmpl/prog/en/modules/circ/renew.tt | 14 ++- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 131 ++++++++++---------- .../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 +- .../prog/en/modules/offline_circ/list.tt | 4 +- .../prog/en/modules/offline_circ/process_koc.tt | 2 - 23 files changed, 278 insertions(+), 92 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 @@ -62,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", @@ -156,4 +156,11 @@ $template->param( location => $location, ); +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $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 @@ -51,7 +51,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, @@ -240,5 +240,13 @@ $template->param( errmsgloop => \@errmsgloop, CircAutocompl => C4::Context->preference("CircAutocompl") ); + +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $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/renew.pl +++ a/circ/renew.pl @@ -26,10 +26,11 @@ use C4::Output; use C4::Circulation; use Koha::DateUtils; use Koha::Database; +use C4::Koha; 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, @@ -109,4 +110,11 @@ if ($barcode) { ); } +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $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 @@ -54,7 +54,7 @@ use Koha::Calendar; 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, @@ -657,5 +657,12 @@ if ( $itemnumber ) { } } +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $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 @@ -32,7 +32,7 @@ use C4::Branch; # GetBranches GetBranchesLoop 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", @@ -138,4 +138,11 @@ $template->param( recycle_loop=> \@recycle_loop, ); +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $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 @@ -41,7 +41,7 @@ use C4::Reserves; 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 +124,12 @@ $template->param( latetransfers => $latetransfers ? 1 : 0, ); +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $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 @@ -34,7 +34,7 @@ use C4::Branch; # GetBranches use C4::HoldsQueue qw(GetHoldsQueueItems); 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, @@ -76,5 +76,12 @@ $template->param( itemtypeloop => \@itemtypesloop, ); +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $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 @@ -48,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, @@ -164,6 +164,13 @@ $template->param( ReservesMaxPickUpDelay => $max_pickup_delay, ); +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $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') { 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 @@ -94,6 +94,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,3 +1,4 @@ +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Overdues at [% LoginBranchname %] [% INCLUDE 'doc-head-close.inc' %] @@ -8,10 +9,11 @@ -
+[% IF Koha.Preference('circSidebar') %]
[% ELSE %]
[% END %]
+ [% IF Koha.Preference('circSidebar') %]
[% END %]
@@ -162,5 +164,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 @@ -11,9 +11,10 @@ -
+[% IF Koha.Preference('circSidebar') %]
[% ELSE %]
[% END %]
- +
+[% IF Koha.Preference('circSidebar') %]
[% END %] [% IF ( found ) %]

Reserve found

@@ -203,6 +204,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 @@ -962,12 +962,24 @@ No patron matched [% message %] [% 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 %]
+ [% 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,3 +1,4 @@ +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Set library [% INCLUDE 'doc-head-close.inc' %] @@ -15,7 +16,7 @@ › Set library
-
+[% IF Koha.Preference('circSidebar') %]
[% ELSE %]
[% END %]
@@ -94,5 +95,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 %]

@@ -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 %] @@ -52,10 +53,11 @@ $(document).ready(function() { [% IF ( run_report ) %] › Results[% END %]
-
+[% IF Koha.Preference('circSidebar') %]
[% ELSE %]
[% END %]
+ [% IF Koha.Preference('circSidebar') %]
[% END %]

Holds queue

@@ -220,5 +222,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 %] @@ -193,5 +195,11 @@

+[% IF Koha.Preference('circSidebar') %] +
+
+ [% INCLUDE 'circ-nav.inc' %] +
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt @@ -61,7 +61,7 @@
-
+

Offline circulation

@@ -132,6 +132,6 @@ [% END %] -
+
[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt @@ -127,7 +127,5 @@ function CheckForm(f) { [% END %] - -
[% INCLUDE 'intranet-bottom.inc' %] --