1 %if ( @cust_contacts ) {
3 <FONT CLASS="fsinnerbox-title">Contacts</FONT>
5 <& /elements/table-grid.html &>
7 % my $th = '<TH CLASS="grid" ALIGN="left">';
12 <%$th%>Self-service</TH>
13 % foreach my $phone_type (@phone_type) {
14 <%$th%><% $phone_type->typename |h %></TH>
20 % my $bgcolor1 = '#ffffff';
21 % my $bgcolor2 = '#eeeeee';
22 % my $bgcolor = $bgcolor2;
23 % foreach my $cust_contact ( @cust_contacts ) {
24 % my $contact = $cust_contact->contact;
25 % my $td = qq(<TD CLASS="grid" BGCOLOR="$bgcolor">);
28 <%$td%><% $cust_contact->contact_classname |h %></TD>
29 <%$td%><% $contact->line |h %></TD>
31 % my @contact_email = $contact->contact_email;
32 <%$td%><% join(', ', map $_->emailaddress, @contact_email) %></TD>
35 % if ( $cust_contact->selfservice_access ) {
37 %# <FONT SIZE="-1"><A HREF="XXX">disable</A>
38 %# <A HREF="XXX">re-email</A></FONT>
41 %# <FONT SIZE="-1"><A HREF="XXX">enable</A></FONT>
45 % foreach my $phone_type (@phone_type) {
47 % qsearchs('contact_phone', {
48 % 'contactnum' => $contact->contactnum,
49 % 'phonetypenum' => $phone_type->phonetypenum,
51 <%$td%><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %></TD>
54 <%$td%><% $cust_contact->comment |h %></TD>
58 % if ( $bgcolor eq $bgcolor1 ) {
59 % $bgcolor = $bgcolor2;
61 % $bgcolor = $bgcolor1;
68 my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
73 my( $cust_main ) = @_;
74 #my $conf = new FS::Conf;
76 my @cust_contacts = $cust_main->cust_contact;