[freeside-commits] branch master updated. ac0ecc2daa4e132d6a1fb3fb759cb757d376f84e

Ivan ivan at 420.am
Fri May 15 14:48:11 PDT 2015


The branch, master has been updated
       via  ac0ecc2daa4e132d6a1fb3fb759cb757d376f84e (commit)
       via  d647e72f22abc6715b6597d17a68851409b53d0b (commit)
      from  8ce8183b840488b4c9cf138115a28d08fbce3d67 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ac0ecc2daa4e132d6a1fb3fb759cb757d376f84e
Merge: d647e72 8ce8183
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri May 15 14:46:13 2015 -0700

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit d647e72f22abc6715b6597d17a68851409b53d0b
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri May 15 14:45:54 2015 -0700

    customer view UI

diff --git a/httemplate/elements/header.html b/httemplate/elements/header.html
index 30a6189..858be71 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 081b96b..637c015 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 fe0e329..f0ecf8f 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') ) {
 

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/header.html     |    7 ++++---
 httemplate/view/cust_main.cgi       |   25 +++++++++++++++++++------
 httemplate/view/cust_main/misc.html |   20 +-------------------
 3 files changed, 24 insertions(+), 28 deletions(-)




More information about the freeside-commits mailing list