projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
customer view UI
[freeside.git]
/
httemplate
/
view
/
cust_main
/
contacts_new.html
diff --git
a/httemplate/view/cust_main/contacts_new.html
b/httemplate/view/cust_main/contacts_new.html
index
f73483a
..
590409d
100644
(file)
--- a/
httemplate/view/cust_main/contacts_new.html
+++ b/
httemplate/view/cust_main/contacts_new.html
@@
-1,31
+1,38
@@
+%if ( @cust_contacts ) {
<BR>
<FONT CLASS="fsinnerbox-title">Contacts</FONT>
<BR>
<FONT CLASS="fsinnerbox-title">Contacts</FONT>
-<A HREF="<%$p%>edit/cust_main-contacts.html?<% $cust_main->custnum %>">Edit contacts</A>
<& /elements/table-grid.html &>
<& /elements/table-grid.html &>
-% my $bgcolor1 = '#eeeeee';
-% my $bgcolor2 = '#ffffff';
-% my $bgcolor = $bgcolor2;
+<THEAD>
+% my $th = '<TH CLASS="grid" ALIGN="left">';
<TR>
<TR>
- <
TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc"
>Type</TH>
- <
TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc"
>Contact</TH>
- <
TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc"
>Email</TH>
- <
TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc"
>Self-service</TH>
+ <
%$th%
>Type</TH>
+ <
%$th%
>Contact</TH>
+ <
%$th%
>Email</TH>
+ <
%$th%
>Self-service</TH>
% foreach my $phone_type (@phone_type) {
% foreach my $phone_type (@phone_type) {
- <
TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc"><% $phone_type->typename |h %> phone</TD
>
+ <
%$th%><% $phone_type->typename |h %></TH
>
% }
% }
+ <%$th%>Comment</TH>
</TR>
</TR>
+</THEAD>
+
+% my $bgcolor1 = '#ffffff';
+% my $bgcolor2 = '#eeeeee';
+% my $bgcolor = $bgcolor2;
+% foreach my $cust_contact ( @cust_contacts ) {
+% my $contact = $cust_contact->contact;
+% my $td = qq(<TD CLASS="grid" BGCOLOR="$bgcolor">);
-% foreach my $contact ( @contacts ) {
<TR>
<TR>
- <
TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $
contact->contact_classname |h %></TD>
- <
TD CLASS="grid" BGCOLOR="<% $bgcolor %>"
><% $contact->line |h %></TD>
+ <
%$td%><% $cust_
contact->contact_classname |h %></TD>
+ <
%$td%
><% $contact->line |h %></TD>
% my @contact_email = $contact->contact_email;
% my @contact_email = $contact->contact_email;
- <
TD CLASS="grid" BGCOLOR="<% $bgcolor %>"
><% join(', ', map $_->emailaddress, @contact_email) %></TD>
+ <
%$td%
><% join(', ', map $_->emailaddress, @contact_email) %></TD>
- <
TD CLASS="grid" BGCOLOR="<% $bgcolor %>"
>
-% if ( $contact->selfservice_access ) {
+ <
%$td%
>
+% if ( $c
ust_c
ontact->selfservice_access ) {
Enabled
%# <FONT SIZE="-1"><A HREF="XXX">disable</A>
%# <A HREF="XXX">re-email</A></FONT>
Enabled
%# <FONT SIZE="-1"><A HREF="XXX">disable</A>
%# <A HREF="XXX">re-email</A></FONT>
@@
-41,9
+48,11
@@
% 'contactnum' => $contact->contactnum,
% 'phonetypenum' => $phone_type->phonetypenum,
% });
% 'contactnum' => $contact->contactnum,
% 'phonetypenum' => $phone_type->phonetypenum,
% });
- <
TD CLASS="grid" BGCOLOR="<% $bgcolor %>"
><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %></TD>
+ <
%$td%
><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %></TD>
% }
% }
+ <%$td%><% $cust_contact->comment |h %></TD>
+
</TR>
% if ( $bgcolor eq $bgcolor1 ) {
</TR>
% if ( $bgcolor eq $bgcolor1 ) {
@@
-53,6
+62,7
@@
% }
% }
</TABLE>
% }
% }
</TABLE>
+%}
<%once>
my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
<%once>
my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
@@
-63,6
+73,6
@@
my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
my( $cust_main ) = @_;
#my $conf = new FS::Conf;
my( $cust_main ) = @_;
#my $conf = new FS::Conf;
-my @contacts = $cust_main->cust_contact;
+my @c
ust_c
ontacts = $cust_main->cust_contact;
</%init>
</%init>