From 5a6eae13bfcb7cf08b9b278fcc97a937afd571ec 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 (cherry picked from commit 1792ab3d813839b61b060967f4d4f174462eaaa7) Signed-off-by: Fridolin Somers --- 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 e621d6409d..5decffc27a 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 1447335c5b..5991a56620 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -115,7 +115,6 @@ $template->param( is_child => ($data->{'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 00d21f02e2..21c91ea672 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -128,7 +128,6 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_ phone => $bor->{'phone'}, email => $bor->{'email'}, branchcode => $bor->{'branchcode'}, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); if ($countissues >0) { $template->param(ItemsOnIssues => $countissues); diff --git a/members/files.pl b/members/files.pl index 5002c3ea80..864a137f39 100755 --- a/members/files.pl +++ b/members/files.pl @@ -103,7 +103,6 @@ else { $template->param( categoryname => $data->{'description'}, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); if (C4::Context->preference('ExtendedPatronAttributes')) { diff --git a/members/mancredit.pl b/members/mancredit.pl index f8a3681f61..44a24fc0dd 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -99,7 +99,6 @@ if ($add){ borrowernumber => $borrowernumber, categoryname => $data->{'description'}, is_child => ($data->{'category_type'} eq 'C'), - 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 e69a1ca348..0306f2a94a 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -124,7 +124,6 @@ if ($add){ borrowernumber => $borrowernumber, categoryname => $data->{'description'}, is_child => ($data->{'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 95f533017d..e8134ce67e 100755 --- a/members/member-flags.pl +++ b/members/member-flags.pl @@ -212,7 +212,6 @@ $template->param( branchcode => $bor->{'branchcode'}, loop => \@loop, is_child => ($bor->{'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 4fdf699427..6413aff4e2 100755 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -145,7 +145,6 @@ $template->param( destination => $destination, is_child => ( $bor->{'category_type'} eq 'C' ), minPasswordLength => $minpw, - 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 59c70f9475..34509bd656 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -360,7 +360,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 58d4f6ead3..751816e2c6 100755 --- a/members/notices.pl +++ b/members/notices.pl @@ -79,7 +79,6 @@ $template->param( borrowernumber => $borrowernumber, sentnotices => 1, categoryname => $borrower->{'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 288688b653..51bce06315 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -114,7 +114,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 6b5ff4a831..e7b63ecaba 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -179,7 +179,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 f967b10a1a..c0e7d80c3d 100755 --- a/members/purchase-suggestions.pl +++ b/members/purchase-suggestions.pl @@ -50,7 +50,6 @@ foreach my $key ( keys %$borrower ) { $template->param( suggestionsview => 1, categoryname => $borrower->{'description'}, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); if (C4::Context->preference('ExtendedPatronAttributes')) { diff --git a/members/readingrec.pl b/members/readingrec.pl index 9daf48c314..9519b5040a 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -126,7 +126,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 c3e6c8d965..8a820f7699 100755 --- a/members/routing-lists.pl +++ b/members/routing-lists.pl @@ -93,7 +93,6 @@ $template->param( borrowernumber => $borrowernumber, branch => $branch, categoryname => $borrower->{description}, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); if (C4::Context->preference('ExtendedPatronAttributes')) { diff --git a/members/statistics.pl b/members/statistics.pl index a63d3285b3..92fc59c2b3 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 b7ddb6a787..bddc63a534 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -91,7 +91,6 @@ if ( $src eq 'circ' ) { menu => 1, borrowernumber => $borrowernumber, categoryname => $data->{'description'}, - RoutingSerials => C4::Context->preference('RoutingSerials'), ); } -- 2.39.5