[IMP] crm_iap_lead: merge name and title in enrichment template
Right now, for the fetched contacts through enrichment, we display name and title in separate columns (in the chatter), that leaves lesser space for email and phone. With this commit, we merge name and title columns, and provide a bit extra space to email and phone so that chances for them being wrapped in a new line are less. Also, if phone number is not available in any contacts, the 'Phone' column is hidden, giving even more space for the Name/Title and Email columns. Task ID-2393253 COM PR odoo/odoo#64075
This commit is contained in:
committed by
Thibault Delavallée
parent
da523d2042
commit
6832d7f3f8
@@ -4,6 +4,7 @@
|
||||
<template id="enrich_company" inherit_id="iap_mail.enrich_company">
|
||||
<xpath expr="//div[hasclass('o_partner_autocomplete_enrich_info')]" position="inside">
|
||||
<t t-if="people_data">
|
||||
<t t-set="hasPhoneNumbers" t-value="any([people['phone'] for people in people_data])"/>
|
||||
<div style="font-size:16px; margin: 9px 0;">
|
||||
<b>Contacts</b>
|
||||
</div>
|
||||
@@ -14,17 +15,15 @@
|
||||
border-right-style: solid;border-right-color: #eeeeee;border-right-width: 1px;" t-if="people_data">
|
||||
<thead>
|
||||
<tr style="background-color: #eeeeee">
|
||||
<th style="padding: 5px; width: 20%;">
|
||||
<th t-attf-style="padding: 5px; width: {{hasPhoneNumbers and '30%;' or '50%;'}}">
|
||||
<img style="vertical-align: text-top;" src="web_editor/font_to_img/61447/rgb(102,102,102)/13"/>
|
||||
Name
|
||||
</th>
|
||||
<th style="padding: 5px; width: 20%;">
|
||||
Title
|
||||
</th>
|
||||
<th style="padding: 5px; width: 30%;">
|
||||
<th t-attf-style="padding: 5px; width: {{hasPhoneNumbers and '40%;' or '50%;'}}">
|
||||
<img style="vertical-align: text-top;" src="web_editor/font_to_img/61664/rgb(102,102,102)/13"/>
|
||||
Email
|
||||
</th>
|
||||
<th style="padding: 5px; width: 30%;">
|
||||
<th style="padding: 5px; width: 30%;" t-if="hasPhoneNumbers">
|
||||
<img style="vertical-align: text-top;" src="web_editor/font_to_img/61589/rgb(102,102,102)/13"/>
|
||||
Phone
|
||||
</th>
|
||||
@@ -34,17 +33,19 @@
|
||||
<t t-foreach="people_data" t-as="people">
|
||||
<tr t-att-style="people_odd and 'background-color:#eeeeee' or None">
|
||||
<td style="padding: 5px">
|
||||
<t t-esc="people['full_name'] or ''"/>
|
||||
</td>
|
||||
<td style="padding: 5px">
|
||||
<t t-esc="people['title'] or ''"/>
|
||||
<t t-set="fullName" t-value="people['full_name'] or ''"/>
|
||||
<t t-set="title" t-value="people['title'] or ''"/>
|
||||
<t t-if="fullName">
|
||||
<h5 style="margin: 0;"><t t-esc="fullName"/><t t-if="title">,</t></h5>
|
||||
</t>
|
||||
<small t-esc="title" t-if="title"/>
|
||||
</td>
|
||||
<td style="padding: 5px">
|
||||
<a t-if="people['email']" t-attf-href="mailto:{{people['email']}}" target="_top">
|
||||
<t t-esc="people['email']"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding: 5px">
|
||||
<td style="padding: 5px" t-if="hasPhoneNumbers">
|
||||
<a t-if="people['phone']" t-attf-href="tel:{{people['phone']}}">
|
||||
<t t-esc="people['phone']"/>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user