Same as previous patch but for the staff interface
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
<div id="toolbar" class="btn-toolbar">
<div class="btn-group"><a id="newshelf" class="btn btn-small" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=add_form&referer=[% op %]"><i class="fa fa-plus"></i> New list</a></div>
- [% IF op == 'view' %]
+ [% IF shelf AND op == 'view' %]
[% IF can_manage_shelf %]
<div class="btn-group">
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-pencil"></i> Edit <span class="caret"></span></button>
});
[% END %]
-[% IF op == 'view' %]
+[% IF shelf AND op == 'view' %]
$(document).ready(function(){
[% IF ( itemsloop ) %]$('#searchheader').fixFloat();[% END %]
$("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\"><i class=\"fa fa-remove\"></i>"+_(" Clear all")+"<\/a>");
}
} else {
push @messages, { type => 'error', code => 'unauthorized_on_view' };
+ undef $shelf;
}
} else {
push @messages, { type => 'error', code => 'does_not_exist' };