From d2e0e83c3cb0caf1d1a958eee1717934e8b5176f Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 15 Jun 2015 14:38:02 -0700 Subject: [PATCH] UI spring cleaning: prospect view --- httemplate/view/prospect_main.html | 50 ++++++++++++-------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html index b5ef64f48..8c93d6c02 100644 --- a/httemplate/view/prospect_main.html +++ b/httemplate/view/prospect_main.html @@ -1,40 +1,22 @@ -<& /elements/header.html, 'Prospect View: '. $prospect_main->company &> +<& /elements/header.html, $title &> % if ( $curuser->access_right('Edit prospect') ) { Edit this prospect % } -<% ntable("#cccccc",2) %> - - - Prospect # - <% $prospectnum %> -% if ( $prospect_main->disabled ) { - (DISABLED) -% } - - - -%unless ( scalar(@agentnums) == 1 -% && !$curuser->access_right('View customers of all agents') ) { -% my $agent = qsearchs('agent',{ 'agentnum' => $prospect_main->agentnum } ); - - Agent - <% $agent->agentnum %>: <% $agent->agent |h %> - -%} + %unless ( ! $prospect_main->refnum ) { # || scalar(@part_referral) == 1 ) { % my $part_referral = qsearchs('part_referral',{ 'refnum' => $prospect_main->refnum } ); - + %} % if ( $prospect_main->company ) { - + % } @@ -42,7 +24,7 @@ % foreach my $prospect_contact ( $prospect_main->prospect_contact ) { % my $contact = $prospect_contact->contact; - + %} @@ -52,7 +34,7 @@ % #but only one, for now % foreach my $cust_location (@cust_location) { - + - + @@ -100,15 +82,7 @@

% } - +%# XXX display prospect tickets <%init> @@ -134,6 +108,14 @@ my $prospect_main = qsearchs( { }); die "Prospect not found!" unless $prospect_main; +my $title = encode_entities($prospect_main->name); +$title = mt("Prospect"). ": $title"; +$title .= ' ('.mt('DISABLED').')' + if $prospect_main->disabled; + my @agentnums = $curuser->agentnums; +if (scalar(@agentnums) > 1 ) { + $title = encode_entities($prospect_main->agent->agent). " $title"; +} -- 2.11.0
Advertising sourceAdvertising source <% $part_referral->referral |h %>
CompanyCompany <% $prospect_main->company |h %>
<% $prospect_contact->contact_classname %> Contact<% $prospect_contact->contact_classname %> Contact <% $contact->line %>
AddressAddress <% $cust_location->location_label( 'join_string' => '
', @@ -71,7 +53,7 @@ % } % if ( my $tax_status = $prospect_main->tax_status ) {
Tax statusTax status <% $tax_status->taxstatus %>: <% $tax_status->description %>