summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-05-15 14:45:54 -0700
committerIvan Kohler <ivan@freeside.biz>2015-05-15 14:45:54 -0700
commitd647e72f22abc6715b6597d17a68851409b53d0b (patch)
tree3deb966f5affa69ed860aaf2a04df9d135fc2e36 /httemplate/view
parent39fbd35d58ba6bedd6c8af1f4b0c25a166acf3c3 (diff)
customer view UI
Diffstat (limited to 'httemplate/view')
-rwxr-xr-xhttemplate/view/cust_main.cgi25
-rw-r--r--httemplate/view/cust_main/misc.html20
2 files changed, 20 insertions, 25 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 081b96bed..637c015ca 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -1,5 +1,6 @@
<& /elements/header.html, {
'title' => $title,
+ 'title_noescape' => $title_noescape,
'head' => $head,
'nobr' => 1,
}
@@ -169,12 +170,14 @@ function areyousure(href, message) {
<TABLE BORDER=0>
<TR>
<TD VALIGN="top">
+ <& cust_main/contacts.html, $cust_main &>
+ <BR>
<& cust_main/misc.html, $cust_main &>
- <BR><& cust_main/contacts.html, $cust_main &>
</TD>
<TD VALIGN="top" STYLE="padding-left: 54px">
<& cust_main/billing.html, $cust_main &>
- <BR><& cust_main/cust_payby.html, $cust_main &>
+ <BR>
+ <& cust_main/cust_payby.html, $cust_main &>
</TD>
</TR>
<TR>
@@ -331,10 +334,20 @@ my $cust_main = qsearchs( {
});
die "Customer not found!" unless $cust_main;
-my $title = $cust_main->name;
-$title = '('. $cust_main->display_custnum. ") $title"
- if $conf->exists('cust_main-title-display_custnum');
-$title = mt("Customer:")." ".$title;
+my $title = encode_entities($cust_main->name);
+$title = '#'. $cust_main->display_custnum. " $title";
+# if $conf->exists('cust_main-title-display_custnum');
+$title = mt("Customer")." ".$title;
+
+my @agentnums = $curuser->agentnums;
+if (scalar(@agentnums) > 1 ) {
+ $title = encode_entities($cust_main->agent->agent). " $title";
+}
+
+my $status = $cust_main->status_label;
+$status .= ' (Cancelled)' if $cust_main->is_status_delay_cancel;
+my $title_noescape = $title. ' (<B><FONT COLOR="#'. $cust_main->statuscolor. '">'. $status. '</FONT></B>)';
+$title .= " ($status)";
#false laziness w/pref/pref.html and Conf.pm (cust_main-default_view)
tie my %views, 'Tie::IxHash',
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index fe0e329c3..f0ecf8f70 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -1,15 +1,6 @@
+<FONT CLASS="fsinnerbox-title"><% mt('Miscellaneous information') |h %></FONT>
<TABLE CLASS="fsinnerbox">
-<TR>
- <TD ALIGN="right"><% mt('Customer number') |h %></TD>
- <TD BGCOLOR="#ffffff"><% $cust_main->display_custnum %></TD>
-</TR>
-
-<TR>
- <TD ALIGN="right"><% mt('Status') |h %></TD>
- <TD BGCOLOR="#ffffff"><FONT COLOR="#<% $cust_main->statuscolor %>"><B><% $status_label %></B></FONT></TD>
-</TR>
-
% my @part_tag = $cust_main->part_tag;
% if ( $conf->config('cust_tag-location') =~ /^(cust_misc|)$/ && @part_tag ) {
<TR>
@@ -26,15 +17,6 @@
</TR>
% }
-%unless ( scalar(@agentnums) == 1
-% && !$curuser->access_right('View customers of all agents') ) {
-% my $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } );
- <TR>
- <TD ALIGN="right"><% mt('Agent') |h %></TD>
- <TD BGCOLOR="#ffffff"><% $agent->agentnum %>: <% $agent->agent %></TD>
- </TR>
-% }
-
% if ( $cust_main->agent_custid
% && ! $conf->exists('cust_main-default_agent_custid') ) {