From c6a9bb7c921a4fb83bb7bc738ad49128bd33c97e Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 14 Apr 2020 11:22:50 +0000 Subject: [PATCH] Bug 25033: (follow-up) Fix links and return self as fallback --- Koha/Suggestions.pm | 7 +++---- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Koha/Suggestions.pm b/Koha/Suggestions.pm index a62b047af8..35413777e0 100644 --- a/Koha/Suggestions.pm +++ b/Koha/Suggestions.pm @@ -55,11 +55,11 @@ check users ability to view suggestions =cut sub filter_by_user_branch { - my ($self, $option) = @_; + my ($self, $strict) = @_; # filter on user branch if ( - $option || + $strict || C4::Context->preference('IndependentBranches') && !C4::Context->IsSuperLibrarian() ) @@ -70,9 +70,8 @@ sub filter_by_user_branch { if ($userenv) { return $self->search({ 'me.branchcode' => $userenv->{branch} }); } - } else { - return $self; } + return $self; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index fcd3594d24..d69ee1a1c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -56,12 +56,12 @@ Pending suggestions

Manage suggestions: - + [% LoginBranchname | html %]: [% suggestions_count | html %] [% IF (all_pendingsuggestions > 0) %] / - + All libraries: [% all_pendingsuggestions | html %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt index 67ca4641a8..243f2b3161 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -149,12 +149,12 @@

Suggestions pending approval: - + [% LoginBranchname | html %]: [% pendingsuggestions | html %] [% IF (all_pendingsuggestions > 0) %] / - + All libraries: [% all_pendingsuggestions | html %] [% END %] -- 2.11.0