From 18bd60a8548229ca252863b60f0e9d27da46350b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 20 Sep 2016 10:03:42 +0100 Subject: [PATCH] Bug 17316: Do not display the list's name if the user does not have permission - Staff MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Same as previous patch but for the staff interface Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall (cherry picked from commit d26cda6f9e7e52bb899717ffe5f84c31b46feefc) Signed-off-by: Frédéric Demians (cherry picked from commit 4e06090d8b0594d99da04824d239bcfa343f5e9c) Signed-off-by: Julian Maurice --- .../intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc | 2 +- .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 2 +- virtualshelves/shelves.pl | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc index be58db0878..8d7a482531 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc @@ -29,7 +29,7 @@
- [% IF op == 'view' %] + [% IF shelf AND op == 'view' %] [% IF can_manage_shelf %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index cd6d213caf..6d9b70c6f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -108,7 +108,7 @@ $(document).ready(function(){ }); [% END %] -[% IF op == 'view' %] +[% IF shelf AND op == 'view' %] $(document).ready(function(){ [% IF ( itemsloop ) %]$('#searchheader').fixFloat();[% END %] $("span.clearall").html(""+_(" Clear all")+"<\/a>"); diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index c2bd6ada61..4b9adbbed5 100755 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -291,6 +291,7 @@ if ( $op eq 'view' ) { } } else { push @messages, { type => 'error', code => 'unauthorized_on_view' }; + undef $shelf; } } else { push @messages, { type => 'error', code => 'does_not_exist' }; -- 2.39.5