summaryrefslogtreecommitdiff
path: root/httemplate/search/inventory_class.html
diff options
context:
space:
mode:
authorivan <ivan>2006-03-08 10:05:01 +0000
committerivan <ivan>2006-03-08 10:05:01 +0000
commit600a0939e7e7e589dae4f4f5bfef3650728940b7 (patch)
tree4e96278b41fc621fa15d03cf2e48a5a3b5a8b72d /httemplate/search/inventory_class.html
parent5809a99d862a6bd0da6742479f18728aae8216a2 (diff)
Add a new table for inventory with for DIDs/serials/etc., and an additional
new table for inventory category (i.e. to distinguish DIDs, serials, MACs, etc.)
Diffstat (limited to 'httemplate/search/inventory_class.html')
-rw-r--r--httemplate/search/inventory_class.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/httemplate/search/inventory_class.html b/httemplate/search/inventory_class.html
new file mode 100644
index 000000000..1bf1bcbce
--- /dev/null
+++ b/httemplate/search/inventory_class.html
@@ -0,0 +1,58 @@
+<%
+
+tie my %labels, 'Tie::IxHash',
+ 'num_avail' => 'Available', # <FONT SIZE="-1"><A HREF="eventually">(upload batch)</A></FONT>',
+ 'num_used' => 'In use', #'Used', #'Allocated',
+ 'num_total' => 'Total',
+;
+my %inv_action_link = (
+ 'num_avail' => 'eventually'
+);
+my %inv_action_label = (
+ 'num_avail' => 'upload_batch'
+);
+
+my $link = [ "${p}edit/inventory_class.html?", 'classnum' ];
+
+%><%= include( 'elements/search.html',
+ 'title' => 'Inventory Classes',
+ 'name' => 'inventory classes',
+ 'menubar' => [ 'Add a new inventory class' =>
+ $p.'edit/inventory_class.html',
+ ],
+ 'query' => { 'table' => 'inventory_class', },
+ 'count_query' => 'SELECT COUNT(*) FROM inventory_class',
+ 'header' => [ '#', 'Inventory class', 'Inventory' ],
+ 'fields' => [ 'classnum',
+ 'classname',
+ sub {
+ #my $inventory_class = shift;
+ my $i_c = shift;
+
+ [ map {
+ [
+ {
+ 'data' => '<B>'. $i_c->$_(). '</B>',
+ 'align' => 'right',
+ },
+ {
+ 'data' => $labels{$_},
+ 'align' => 'left',
+ },
+ { 'data' => ( exists($inv_action_link{$_})
+ ? '<FONT SIZE="-1">(<A HREF="'. $inv_action_link{$_}. '">'. $inv_action_label{$_}. '</A>)</FONT>'
+ : ''
+ ),
+ 'align' => 'left',
+ },
+ ]
+ } keys %labels
+ ];
+ },
+ ],
+ 'links' => [ $link,
+ $link,
+ '',
+ ],
+ )
+%>