3 %tie my %labels, 'Tie::IxHash',
4 % 'num_avail' => 'Available', # <FONT SIZE="-1"><A HREF="eventually">(upload batch)</A></FONT>',
5 % 'num_used' => 'In use', #'Used', #'Allocated',
6 % 'num_total' => 'Total',
10 % 'num_avail' => ';avail=1',
11 % 'num_used' => ';used=1',
15 %my %inv_action_link = (
16 % 'num_avail' => [ 'upload batch',
17 % $p.'misc/inventory_item-import.html?classnum=',
22 %my $link = [ "${p}edit/inventory_class.html?", 'classnum' ];
25 <% include( 'elements/browse.html',
26 'title' => 'Inventory Classes',
27 'name' => 'inventory classes',
28 'menubar' => [ 'Add a new inventory class' =>
29 $p.'edit/inventory_class.html',
31 'query' => { 'table' => 'inventory_class', },
32 'count_query' => 'SELECT COUNT(*) FROM inventory_class',
33 'header' => [ '#', 'Inventory class', 'Inventory' ],
34 'fields' => [ 'classnum',
37 #my $inventory_class = shift;
41 $p. 'search/inventory_item.html?'.
42 'classnum='. $i_c->classnum;
45 foreach ( keys %inv_action_link ) {
46 my($label, $baseurl, $method) =
47 @{ $inv_action_link{$_} };
48 my $url = $baseurl. $i_c->$method();
52 '<A HREF="'.$url.'">'.
66 'data' => '<B>'. $num{$_}. '</B>',
70 'data' => $labels{$_},
77 { 'data' => $actioncol{$_},