summaryrefslogtreecommitdiff
path: root/httemplate
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
parent39fbd35d58ba6bedd6c8af1f4b0c25a166acf3c3 (diff)
customer view UI
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/header.html7
-rwxr-xr-xhttemplate/view/cust_main.cgi25
-rw-r--r--httemplate/view/cust_main/misc.html20
3 files changed, 24 insertions, 28 deletions
diff --git a/httemplate/elements/header.html b/httemplate/elements/header.html
index 30a6189f6..858be71da 100644
--- a/httemplate/elements/header.html
+++ b/httemplate/elements/header.html
@@ -23,7 +23,7 @@ Example:
<HTML>
<HEAD>
<TITLE>
- <% $title |h %>
+ <% $title %>
</TITLE>
<!-- per RT, to prevent IE compatibility mode -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
@@ -162,7 +162,7 @@ Example:
<TD CLASS="background" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
<FONT SIZE=6>
- <% $title |h %>
+ <% $title_noescape || encode_entities($title) %>
</FONT>
% unless ( $nobr ) {
@@ -172,7 +172,7 @@ Example:
<% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
<%init>
-my( $title, $menubar, $etc, $head ) = ( '', '', '', '' );
+my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
my( $nobr, $nocss ) = ( 0, 0 );
my $mobile;
@@ -180,6 +180,7 @@ my $mobile;
if ( ref($_[0]) ) {
my $opt = shift;
$title = $opt->{title};
+ $title_noescape = $opt->{title_noescape};
$menubar = $opt->{menubar};
$etc = $opt->{etc};
$head = $opt->{head};
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') ) {