X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fcontacts_new.html;h=683841c33a89073fc1204b69d588faaaa8d1051b;hb=1cde870268b03197da75f089669d60a7ba3c5617;hp=bd812c7e7f14e4f3bab08612b21c9833dfd371f0;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html index bd812c7e7..683841c33 100644 --- a/httemplate/view/cust_main/contacts_new.html +++ b/httemplate/view/cust_main/contacts_new.html @@ -1,22 +1,74 @@ -% if ( @contacts ) {
-Contacts -<% ntable("#cccccc",2) %> -% foreach my $contact ( @contacts ) { +Contacts + +<& /elements/table-grid.html &> +% my $bgcolor1 = '#eeeeee'; +% my $bgcolor2 = '#ffffff'; +% my $bgcolor = $bgcolor2; +% my $th = ''; + + <%$th%>Type + <%$th%>Contact + <%$th%>Email + <%$th%>Self-service +% foreach my $phone_type (@phone_type) { + <%$th%><% $phone_type->typename |h %> +% } + <%$th%>Comment + + +% foreach my $cust_contact ( @cust_contacts ) { +% my $contact = $cust_contact->contact; +% my $td = qq(); + - Contact - <% $contact->line %> + <%$td%><% $cust_contact->contact_classname |h %> + <%$td%><% $contact->line |h %> + +% my @contact_email = $contact->contact_email; + <%$td%><% join(', ', map $_->emailaddress, @contact_email) %> + + <%$td%> +% if ( $cust_contact->selfservice_access ) { + Enabled +%# disable +%# re-email +% } else { + Disabled +%# enable +% } + + +% foreach my $phone_type (@phone_type) { +% my $contact_phone = +% qsearchs('contact_phone', { +% 'contactnum' => $contact->contactnum, +% 'phonetypenum' => $phone_type->phonetypenum, +% }); + <%$td%><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %> +% } + + <%$td%><% $cust_contact->comment |h %> + + +% if ( $bgcolor eq $bgcolor1 ) { +% $bgcolor = $bgcolor2; +% } else { +% $bgcolor = $bgcolor1; +% } % } +<%once> -% } +my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'}); + <%init> my( $cust_main ) = @_; #my $conf = new FS::Conf; -my @contacts = $cust_main->cust_contact; +my @cust_contacts = $cust_main->cust_contact;