move "add" links to the top
[freeside.git] / httemplate / browse / part_pkg.cgi
index 22d139c..58422c6 100755 (executable)
@@ -1,4 +1,4 @@
-<!-- $Id: part_pkg.cgi,v 1.10 2002-01-30 14:18:08 ivan Exp $ -->
+<!-- mason kludge -->
 <%
 
 my %search;
@@ -11,13 +11,16 @@ if ( $cgi->param('showdisabled') ) {
 my @part_pkg = qsearch('part_pkg', \%search );
 my $total = scalar(@part_pkg);
 
-print header("Package Definition Listing",menubar(
-  'Main Menu' => $p,
-)). "One or more services are grouped together into a package and given".
-  " pricing information. Customers purchase packages".
-  " rather than purchase services directly.<BR><BR>".
-  "$total packages ";
+%>
+<%= header("Package Definition Listing",menubar( 'Main Menu' => $p )) %>
+One or more services are grouped together into a package and given pricing
+information. Customers purchase packages rather than purchase services
+directly.<BR><BR>
+<A HREF="<%= $p %>edit/part_pkg.cgi"><I>Add a new package definition</I></A>
+<BR><BR>
 
+<%= $total %> packages
+<%
 if ( $cgi->param('showdisabled') ) {
   $cgi->param('showdisabled', 0);
   print qq!( <a href="!. $cgi->self_url. qq!">hide disabled packages</a> )!;
@@ -29,7 +32,7 @@ if ( $cgi->param('showdisabled') ) {
 my $colspan = $cgi->param('showdisabled') ? 2 : 3;
 print &table(), <<END;
       <TR>
-        <TH COLSPAN=2>Package</TH>
+        <TH COLSPAN=$colspan>Package</TH>
         <TH>Comment</TH>
         <TH><FONT SIZE=-1>Freq.</FONT></TH>
         <TH><FONT SIZE=-1>Plan</FONT></TH>
@@ -89,8 +92,9 @@ END
   print "</TR>";
 }
 
+$colspan = $cgi->param('showdisabled') ? 8 : 9;
 print <<END;
-   <TR><TD COLSPAN=8><I><A HREF="${p}edit/part_pkg.cgi">Add a new package definition</A></I></TD></TR>
+
     </TABLE>
   </BODY>
 </HTML>