X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fbrowse%2Fagent_type.cgi;h=7711dccf7bdc091711a19e23e75c5d2cffa875b0;hb=a72a10f754f7465121d6137bb3dcee0a21ea6443;hp=eb20c640433d0e684a93971278c5fef31ac8b499;hpb=a4c96748eb6eab29a70f3a944c6520283a635c78;p=freeside.git diff --git a/httemplate/browse/agent_type.cgi b/httemplate/browse/agent_type.cgi index eb20c6404..7711dccf7 100755 --- a/httemplate/browse/agent_type.cgi +++ b/httemplate/browse/agent_type.cgi @@ -1,56 +1,63 @@ - -<% - -print header("Agent Type Listing", menubar( - 'Main Menu' => $p, -)), "Agent types define groups of packages that you can then assign to". - " particular agents.", &table(), < - Agent Type - Packages - -END - -foreach my $agent_type ( sort { - $a->getfield('typenum') <=> $b->getfield('typenum') -} qsearch('agent_type',{}) ) { - my($hashref)=$agent_type->hashref; - my(@type_pkgs)=qsearch('type_pkgs',{'typenum'=> $hashref->{typenum} }); - my($rowspan)=scalar(@type_pkgs); - $rowspan = int($rowspan/2+0.5) ; - print < - - $hashref->{typenum} - - $hashref->{atype} -END - - my($type_pkgs); - my($tdcount) = -1 ; - foreach $type_pkgs ( @type_pkgs ) { - my($pkgpart)=$type_pkgs->getfield('pkgpart'); - my($part_pkg) = qsearchs('part_pkg',{'pkgpart'=> $pkgpart }); - print qq!! if ($tdcount == 0) ; - $tdcount = 0 if ($tdcount == -1) ; - print qq!!, - $part_pkg->getfield('pkg'),""; - $tdcount ++ ; - if ($tdcount == 2) - { - print qq!\n! ; - $tdcount = 0 ; - } - } - - print ""; -} - -print <Add a new agent type - -