clean up package list UI: put actions in a dropdown
[freeside.git] / httemplate / view / cust_main / packages / section.html
index fe9f283..1601662 100755 (executable)
@@ -34,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>