From 1792ab3d813839b61b060967f4d4f174462eaaa7 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 13 Nov 2017 17:18:44 +0000 Subject: [PATCH] Bug 19621: Use Koha.Preference on template side to display/hide "Routing lists" tab MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch applies without issue and functions as described. Signed-off-by: Dilan Johnpullé Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +- members/boraccount.pl | 1 - members/deletemem.pl | 1 - members/files.pl | 1 - members/mancredit.pl | 1 - members/maninvoice.pl | 1 - members/member-flags.pl | 1 - members/member-password.pl | 1 - members/moremember.pl | 1 - members/notices.pl | 1 - members/pay.pl | 1 - members/paycollect.pl | 1 - members/purchase-suggestions.pl | 1 - members/readingrec.pl | 1 - members/routing-lists.pl | 1 - members/statistics.pl | 1 - tools/viewlog.pl | 1 - 17 files changed, 1 insertion(+), 17 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index de75551999..7a419bd4e6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -81,7 +81,7 @@ [% IF ( finesview ) %]
  • [% ELSE %]
  • [% END %]Fines
  • [% END %] [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] - [% IF ( RoutingSerials ) %][% IF ( routinglistview ) %]
  • [% ELSE %]
  • [% END %]Routing lists
  • [% END %] + [% IF Koha.Preference("RoutingSerials") %][% IF ( routinglistview ) %]
  • [% ELSE %]
  • [% END %]Routing lists
  • [% END %] [% END %] [% IF ( CAN_user_borrowers ) %] [% IF ( intranetreadinghistory ) %] diff --git a/members/boraccount.pl b/members/boraccount.pl index e7d769efaf..ac7cee248a 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -117,7 +117,6 @@ $template->param( is_child => ($patron->category->category_type eq 'C'), reverse_col => $reverse_col, accounts => $accts, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/deletemem.pl b/members/deletemem.pl index 4cbb4d660b..ea12ae6008 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -132,7 +132,6 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_ phone => $patron->phone, email => $patron->email, branchcode => $patron->branchcode, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); if ($countissues >0) { $template->param(ItemsOnIssues => $countissues); diff --git a/members/files.pl b/members/files.pl index 8cc25a918d..069182deb7 100755 --- a/members/files.pl +++ b/members/files.pl @@ -109,7 +109,6 @@ else { $template->param( categoryname => $patron_category->description, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); if (C4::Context->preference('ExtendedPatronAttributes')) { diff --git a/members/mancredit.pl b/members/mancredit.pl index 5a93e956be..7534b8311d 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -101,7 +101,6 @@ if ($add){ borrowernumber => $borrowernumber, categoryname => $patron->category->description, is_child => ($patron->category->category_type eq 'C'), # FIXME is_child should be a Koha::Patron method - RoutingSerials => C4::Context->preference('RoutingSerials'), ); output_html_with_http_headers $input, $cookie, $template->output; } diff --git a/members/maninvoice.pl b/members/maninvoice.pl index bd24a10fd8..44d2b18447 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -127,7 +127,6 @@ if ($add){ borrowernumber => $borrowernumber, categoryname => $patron->category->description, is_child => ($patron->category->category_type eq 'C'), - RoutingSerials => C4::Context->preference('RoutingSerials'), ); output_html_with_http_headers $input, $cookie, $template->output; } diff --git a/members/member-flags.pl b/members/member-flags.pl index 158074a4fc..27e020c96a 100755 --- a/members/member-flags.pl +++ b/members/member-flags.pl @@ -219,7 +219,6 @@ $template->param( branchcode => $bor->{'branchcode'}, loop => \@loop, is_child => ( $category_type eq 'C' ), - RoutingSerials => C4::Context->preference('RoutingSerials'), csrf_token => Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ), ); diff --git a/members/member-password.pl b/members/member-password.pl index c458ae8f1f..db51b17226 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -145,7 +145,6 @@ $template->param( userid => $bor->{'userid'}, destination => $destination, is_child => ( $category_type eq 'C' ), - RoutingSerials => C4::Context->preference('RoutingSerials'), csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID'), }), ); diff --git a/members/moremember.pl b/members/moremember.pl index 2a54cbeaf2..27185efca5 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -357,7 +357,6 @@ $template->param( quickslip => $quickslip, housebound_role => scalar $patron->housebound_role, privacy_guarantor_checkouts => $data->{'privacy_guarantor_checkouts'}, - RoutingSerials => C4::Context->preference('RoutingSerials'), PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, relatives_issues_count => $relatives_issues_count, relatives_borrowernumbers => \@relatives, diff --git a/members/notices.pl b/members/notices.pl index 9f0ab11623..7129f18b5a 100755 --- a/members/notices.pl +++ b/members/notices.pl @@ -82,7 +82,6 @@ $template->param( borrowernumber => $borrowernumber, sentnotices => 1, categoryname => $patron->category->description, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/pay.pl b/members/pay.pl index 2295061a89..230b7f2a45 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -123,7 +123,6 @@ for (@names) { $template->param( finesview => 1, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); add_accounts_to_template(); diff --git a/members/paycollect.pl b/members/paycollect.pl index 9ec3077777..6b09090f4e 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -188,7 +188,6 @@ $template->param( borrower => $borrower, categoryname => $borrower->{description}, total => $total_due, - RoutingSerials => C4::Context->preference('RoutingSerials'), ExtendedPatronAttributes => C4::Context->preference('ExtendedPatronAttributes'), csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }), diff --git a/members/purchase-suggestions.pl b/members/purchase-suggestions.pl index 5acc3cc2e6..f6df07d598 100755 --- a/members/purchase-suggestions.pl +++ b/members/purchase-suggestions.pl @@ -57,7 +57,6 @@ foreach my $key ( keys %$data ) { $template->param( suggestionsview => 1, categoryname => $data->{'description'}, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); if (C4::Context->preference('ExtendedPatronAttributes')) { diff --git a/members/readingrec.pl b/members/readingrec.pl index ba5e17497d..7fe990da9a 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -131,7 +131,6 @@ $template->param( categoryname => $data->{description}, is_child => ( $data->{category_type} eq 'C' ), loop_reading => $issues, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/routing-lists.pl b/members/routing-lists.pl index b03be94749..be9a863a3f 100755 --- a/members/routing-lists.pl +++ b/members/routing-lists.pl @@ -91,7 +91,6 @@ $template->param( borrowernumber => $borrowernumber, branch => $branch, categoryname => $patron_info->{description}, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); if (C4::Context->preference('ExtendedPatronAttributes')) { diff --git a/members/statistics.pl b/members/statistics.pl index 07019d3ec5..ffed67209e 100755 --- a/members/statistics.pl +++ b/members/statistics.pl @@ -107,7 +107,6 @@ $template->param( count_total_issues_returned => $count_total_issues_returned, count_total_precedent_state => $count_total_precedent_state, count_total_actual_state => $count_total_actual_state, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 00469ba845..0b11aac94a 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -95,7 +95,6 @@ if ( $src eq 'circ' ) { menu => 1, borrowernumber => $borrowernumber, categoryname => $patron->category->description, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); } -- 2.39.5