summaryrefslogtreecommitdiff
path: root/httemplate/search/inventory_item.html
diff options
context:
space:
mode:
authorivan <ivan>2010-05-20 22:48:42 +0000
committerivan <ivan>2010-05-20 22:48:42 +0000
commitf1cd7f98b487e74aa60b6c41d3377cc60f7ac25a (patch)
tree9cb67dd062685eaad04db1cb78ac00516c866718 /httemplate/search/inventory_item.html
parent85c3933c8b7508ab2aeb0f9e6b96dd1b6432fb9f (diff)
agent virt inventory, RT#7010
Diffstat (limited to 'httemplate/search/inventory_item.html')
-rw-r--r--httemplate/search/inventory_item.html17
1 files changed, 14 insertions, 3 deletions
diff --git a/httemplate/search/inventory_item.html b/httemplate/search/inventory_item.html
index 55fef9432..80810caf9 100644
--- a/httemplate/search/inventory_item.html
+++ b/httemplate/search/inventory_item.html
@@ -1,8 +1,11 @@
<% include( 'elements/search.html',
'title' => $title,
- #less lame to use Lingua:: something to pluralize
- 'name' => $inventory_class->classname. 's',
+ 'menubar' => [ 'View inventory classes' =>
+ $p.'browse/inventory_class.html',
+ ],
+
+ 'name' => PL($inventory_class->classname),
'query' => {
'table' => 'inventory_item',
@@ -19,6 +22,10 @@
'count_query' => $count_query,
+ 'agent_virt' => 1,
+ 'agent_null' => 1,
+ 'agent_pos' => 2,
+
'header' => [
'#',
$inventory_class->classname,
@@ -74,8 +81,12 @@
%>
<%init>
+my $curuser = $FS::CurrentUser::CurrentUser;
+
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $curuser->access_right('Edit inventory')
+ || $curuser->access_right('Edit global inventory')
+ || $curuser->access_right('Configuration');
my $classnum = $cgi->param('classnum');
$classnum =~ /^(\d+)$/ or errorpage("illegal classnum $classnum");