2 <FONT CLASS="fsinnerbox-title">Contacts</FONT>
4 <& /elements/table-grid.html &>
5 % my $bgcolor1 = '#eeeeee';
6 % my $bgcolor2 = '#ffffff';
7 % my $bgcolor = $bgcolor2;
8 % my $th = '<TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">';
13 <%$th%>Self-service</TH>
14 % foreach my $phone_type (@phone_type) {
15 <%$th%><% $phone_type->typename |h %></TH>
20 % foreach my $cust_contact ( @cust_contacts ) {
21 % my $contact = $cust_contact->contact;
22 % my $td = qq(<TD CLASS="grid" BGCOLOR="$bgcolor">);
25 <%$td%><% $cust_contact->contact_classname |h %></TD>
26 <%$td%><% $contact->line |h %></TD>
28 % my @contact_email = $contact->contact_email;
29 <%$td%><% join(', ', map $_->emailaddress, @contact_email) %></TD>
32 % if ( $cust_contact->selfservice_access ) {
34 %# <FONT SIZE="-1"><A HREF="XXX">disable</A>
35 %# <A HREF="XXX">re-email</A></FONT>
38 %# <FONT SIZE="-1"><A HREF="XXX">enable</A></FONT>
42 % foreach my $phone_type (@phone_type) {
44 % qsearchs('contact_phone', {
45 % 'contactnum' => $contact->contactnum,
46 % 'phonetypenum' => $phone_type->phonetypenum,
48 <%$td%><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %></TD>
51 <%$td%><% $cust_contact->comment |h %></TD>
55 % if ( $bgcolor eq $bgcolor1 ) {
56 % $bgcolor = $bgcolor2;
58 % $bgcolor = $bgcolor1;
64 my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
69 my( $cust_main ) = @_;
70 #my $conf = new FS::Conf;
72 my @cust_contacts = $cust_main->cust_contact;