From 50ce48522d1cae8b9403c5d079dd707ed44736e5 Mon Sep 17 00:00:00 2001 From: Aleisha Date: Tue, 17 May 2016 04:35:46 +0000 Subject: [PATCH] Bug 16530: Adding a circ sidebar navigation menu Edit: Fast cataloging link should now show on all pages, removed offline circulation links Note: This patch does not create the syspref to activate or deactivate the sidebar, will add that in another patch This adds a sidebar to circ/branchoverdues.tt circ/circulation.tt (I also fixed up some of the indentation in this file to make it easier to see where the divs started and ended) circ/renew.tt circ/returns.tt circ/selectbranchprinter.tt circ/transferstoreceive.tt circ/view_holdsqueue.tt circ/waitingreserves.tt offline_circ/list.tt offline_circ/process_koc.tt To test: 1) Go to all of the above pages and confirm the sidebar menu shows up and fast cataloging link shows up 2) Trigger any error messages you can possibly think of (i.e. on renew.pl: barcode does not exist). Confirm that this does not mess up the layout of the page 3) Go to a user account page, Check out tab. (Since this is a circ/circulation.pl page). Ensure the circ nav sidebar doesn't show up (confirm it looks as it usually does) 4) Decide if you like how things look or not! Sponsored-by: Catalyst IT Signed-off-by: Jan Kissig --- circ/branchoverdues.pl | 4 + circ/renew.pl | 5 + circ/returns.pl | 4 + circ/selectbranchprinter.pl | 4 + circ/transferstoreceive.pl | 4 + circ/view_holdsqueue.pl | 4 + circ/waitingreserves.pl | 4 + .../intranet-tmpl/prog/en/includes/circ-nav.inc | 54 ++++++++ .../prog/en/modules/circ/branchoverdues.tt | 7 +- .../prog/en/modules/circ/circulation.tt | 18 ++- .../intranet-tmpl/prog/en/modules/circ/renew.tt | 12 +- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 129 ++++++++++---------- .../prog/en/modules/circ/selectbranchprinter.tt | 7 +- .../prog/en/modules/circ/transferstoreceive.tt | 7 +- .../prog/en/modules/circ/view_holdsqueue.tt | 7 +- .../prog/en/modules/circ/waitingreserves.tt | 7 +- .../prog/en/modules/offline_circ/list.tt | 14 ++- .../prog/en/modules/offline_circ/process_koc.tt | 11 +- 18 files changed, 219 insertions(+), 83 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc diff --git a/circ/branchoverdues.pl b/circ/branchoverdues.pl index d04f5e4..d7ef309 100755 --- a/circ/branchoverdues.pl +++ b/circ/branchoverdues.pl @@ -156,4 +156,8 @@ $template->param( location => $location, ); +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $fa); + output_html_with_http_headers $input, $cookie, $template->output; diff --git a/circ/renew.pl b/circ/renew.pl index a87ba76..b8f6f08 100755 --- a/circ/renew.pl +++ b/circ/renew.pl @@ -26,6 +26,7 @@ use C4::Output; use C4::Circulation; use Koha::DateUtils; use Koha::Database; +use C4::Koha; my $cgi = new CGI; @@ -109,4 +110,8 @@ if ($barcode) { ); } +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $fa); + output_html_with_http_headers( $cgi, $cookie, $template->output ); diff --git a/circ/returns.pl b/circ/returns.pl index c91d784..42ac887 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -657,5 +657,9 @@ if ( $itemnumber ) { } } +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $fa); + # actually print the page! output_html_with_http_headers $query, $cookie, $template->output; diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl index 36fd9a5..04c9aa4 100755 --- a/circ/selectbranchprinter.pl +++ b/circ/selectbranchprinter.pl @@ -138,4 +138,8 @@ $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); + output_html_with_http_headers $query, $cookie, $template->output; diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index 4be2bcb..1719ba7 100755 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -124,5 +124,9 @@ $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); + output_html_with_http_headers $input, $cookie, $template->output; diff --git a/circ/view_holdsqueue.pl b/circ/view_holdsqueue.pl index d21d3e7..d0bab39 100755 --- a/circ/view_holdsqueue.pl +++ b/circ/view_holdsqueue.pl @@ -76,5 +76,9 @@ $template->param( itemtypeloop => \@itemtypesloop, ); +# Checking if there is a Fast Cataloging Framework +my $fa = getframeworkinfo('FA'); +$template->param( fast_cataloging => 1 ) if (defined $fa); + # writing the template output_html_with_http_headers $query, $cookie, $template->output; diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 0050ce3..d438db7 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -164,6 +164,10 @@ $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); + if ($item && $tab eq 'holdsover') { print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover"); } elsif ($cancelall) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc new file mode 100644 index 0000000..7bcd94c --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc @@ -0,0 +1,54 @@ + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt index ff3424d..ca0c0e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt @@ -8,10 +8,11 @@ -
+
+
@@ -163,4 +164,8 @@
+
+ [% INCLUDE 'circ-nav.inc' %] +
+
[% INCLUDE 'intranet-bottom.inc' %] 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 0056dfc..a836bb5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -962,12 +962,22 @@ No patron matched [% message %] [% END %]
[% END %] - +[% UNLESS ( borrowers ) %] + [% IF not( borrowernumber and borrower ) %] +
+ [% INCLUDE 'circ-nav.inc' %] +
+ [% 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 %]