clean up package list UI: put actions in a dropdown
[freeside.git] / httemplate / view / cust_main / packages / section.html
index ce965c5..1601662 100755 (executable)
@@ -1,4 +1,5 @@
 % if ( @$packages ) { 
+<THEAD>
 <TR>
 % #my $width = $show_location ? 'WIDTH="25%"' : 'WIDTH="33%"';
   <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Package') |h %></TH>
@@ -8,6 +9,7 @@
   <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Services') |h %></TH>
 % }
 </TR>
+</THEAD>
 
 % #$FS::cust_pkg::DEBUG = 2;
 %   foreach my $cust_pkg (@$packages) {
@@ -32,6 +34,7 @@
 % my ($cust_pkg, %iopt) = @_;
 % $iopt{'cust_pkg'} = $cust_pkg;
 % $iopt{'part_pkg'} = $cust_pkg->part_pkg;
+% $iopt{'row'} = $row;
   <!--pkgnum: <% $cust_pkg->pkgnum %>-->
   <TR CLASS="row<%$row % 2%>">
     <& package.html, %iopt &>
     <& .packagerow, $cust_pkg->change_to_pkg, %iopt, 'change_from' => 1 &>
 % }
 % # include supplemental packages if any
-% $iopt{'supplemental'} = ($iopt{'supplemental'} || 0) + 1;
-% foreach my $supp_pkg ($cust_pkg->supplemental_pkgs) {
-    <& .packagerow, $supp_pkg, %iopt &>
+% if ( $cust_pkg->_supplemental ) {
+%   $iopt{'supplemental'} = ($iopt{'supplemental'} || 0) + 1;
+%   foreach my $supp_pkg (@{ $cust_pkg->_supplemental }) {
+      <& .packagerow, $supp_pkg, %iopt &>
+%   }
 % }
 </%def>
 <%shared>
@@ -116,6 +121,7 @@ my %conf_opt = (
   #for status.html
   'cust_pkg-show_autosuspend' => $conf->exists('cust_pkg-show_autosuspend'),
   'pkg_attached'              => $pkg_attached,
+  'part_pkg-delay_cancel-days' => $conf->config('part_pkg-delay_cancel-days') || 1,
   #for status.html pkg-balances
   'pkg-balances'              => $conf->exists('pkg-balances'),
   'money_char'                => ( $conf->config('money_char') || '$' ),