[freeside-commits] freeside/httemplate/browse inventory_class.html, 1.5, 1.6

Ivan,,, ivan at wavetail.420.am
Fri May 21 16:35:26 PDT 2010


Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv4351/httemplate/browse

Modified Files:
	inventory_class.html 
Log Message:
reporting on agent inventory, RT#7010

Index: inventory_class.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/inventory_class.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- inventory_class.html	20 May 2010 22:48:42 -0000	1.5
+++ inventory_class.html	21 May 2010 23:35:24 -0000	1.6
@@ -7,54 +7,9 @@
                  'header'      => [ '#', 'Inventory class', 'Inventory' ],
                  'fields'      => [ 'classnum',
                                     'classname',
-                                    sub {
-                                          #my $inventory_class = shift;
-                                          my $i_c = shift;
-
-                                          my $link =
-                                            $p. 'search/inventory_item.html?'.
-                                            'classnum='. $i_c->classnum;
-
-                                          my %actioncol = ();
-                                          foreach ( keys %inv_action_link ) {
-                                            my($label, $baseurl, $method) =
-                                              @{ $inv_action_link{$_} };
-                                            my $url = $baseurl. $i_c->$method();
-                                            $actioncol{$_} =
-                                              '<FONT SIZE="-1">'.
-                                              '('.
-                                              '<A HREF="'.$url.'">'.
-                                              $label.
-                                              '</A>'.
-                                              ')'.
-                                              '</FONT>';
-                                          }
-
-                                          my %num = map { 
-                                            $_ => $i_c->$_();
-                                          } keys %labels;
-
-                                          [ map {
-                                                  [
-                                                    {
-                                                      'data'  => '<B>'. $num{$_}. '</B>',
-                                                      'align' => 'right',
-                                                    },
-                                                    {
-                                                      'data'  => $labels{$_},
-                                                      'align' => 'left',
-                                                      'link'  => ( $num{$_}
-                                                                     ? $link.$link{$_}
-                                                                     : ''
+                                    FS::inventory_class->countcell_factory(
+                                      'p'=>$p,
                                                                  ),
-                                                    },
-                                                    { 'data'  => $actioncol{$_},
-                                                      'align'  => 'left',
-                                                    },
-                                                  ]
-                                                } keys %labels
-                                          ];
-                                        },
                                   ],
                  'links'       => [ $link,
                                     $link,
@@ -71,25 +26,6 @@
       || $curuser->access_right('Edit global inventory')
       || $curuser->access_right('Configuration');
 
-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 %link = (
-  'num_avail' => ';avail=1',
-  'num_used'  => ';used=1',
-  'num_total' => '',
-);
-
-my %inv_action_link = (
-  'num_avail' => [ 'upload batch',
-                   $p.'misc/inventory_item-import.html?classnum=',
-                   'classnum'
-                 ],
-);
-
 my $menubar = $curuser->access_right('Configuration')
                 ? [ 'Add a new inventory class' =>
                       $p.'edit/inventory_class.html',



More information about the freeside-commits mailing list