Bug 19621: Use Koha.Preference on template side to display/hide "Routing lists" tab

Patch applies without issue and functions as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1792ab3d81)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Nick Clemens 2017-11-13 17:18:44 +00:00 committed by Fridolin Somers
parent cdf608606f
commit 5a6eae13bf
17 changed files with 1 additions and 17 deletions

View File

@ -81,7 +81,7 @@
[% IF ( finesview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Fines</a></li>
[% END %]
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
[% IF ( RoutingSerials ) %][% IF ( routinglistview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/routing-lists.pl?borrowernumber=[% borrowernumber %]">Routing lists</a></li>[% END %]
[% IF Koha.Preference("RoutingSerials") %][% IF ( routinglistview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/routing-lists.pl?borrowernumber=[% borrowernumber %]">Routing lists</a></li>[% END %]
[% END %]
[% IF ( CAN_user_borrowers ) %]
[% IF ( intranetreadinghistory ) %]

View File

@ -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;

View File

@ -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);

View File

@ -103,7 +103,6 @@ else {
$template->param(
categoryname => $data->{'description'},
RoutingSerials => C4::Context->preference('RoutingSerials'),
);
if (C4::Context->preference('ExtendedPatronAttributes')) {

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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'), } ),
);

View File

@ -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'), }),
);

View File

@ -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,

View File

@ -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;

View File

@ -114,7 +114,6 @@ for (@names) {
$template->param(
finesview => 1,
RoutingSerials => C4::Context->preference('RoutingSerials'),
);
add_accounts_to_template();

View File

@ -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') }),

View File

@ -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')) {

View File

@ -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;

View File

@ -93,7 +93,6 @@ $template->param(
borrowernumber => $borrowernumber,
branch => $branch,
categoryname => $borrower->{description},
RoutingSerials => C4::Context->preference('RoutingSerials'),
);
if (C4::Context->preference('ExtendedPatronAttributes')) {

View File

@ -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;

View File

@ -91,7 +91,6 @@ if ( $src eq 'circ' ) {
menu => 1,
borrowernumber => $borrowernumber,
categoryname => $data->{'description'},
RoutingSerials => C4::Context->preference('RoutingSerials'),
);
}