summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2015-12-01 10:30:44 +0100
committerMartin Trigaux <mat@odoo.com>2015-12-01 10:30:44 +0100
commit90254beedbb6a9bdf055ae582af866073eab4f2c (patch)
tree8477905dd0a6586dedab562274247604ecc479a3 /addons/mail/static/src/xml
parent2f6feef3a3dcd39ce2ca1fbcfa21616e02d1ab6d (diff)
parent00ee6e7ba4e68cfef0b26f9d02f9584b8c972291 (diff)
[MERGE] forward port of branch 9.0 up to 00ee6e7b
Diffstat (limited to 'addons/mail/static/src/xml')
-rw-r--r--addons/mail/static/src/xml/chatter.xml4
-rw-r--r--addons/mail/static/src/xml/composer.xml37
-rw-r--r--addons/mail/static/src/xml/thread.xml23
3 files changed, 22 insertions, 42 deletions
diff --git a/addons/mail/static/src/xml/chatter.xml b/addons/mail/static/src/xml/chatter.xml
index 6cc8b86b19e..6207cdb3980 100644
--- a/addons/mail/static/src/xml/chatter.xml
+++ b/addons/mail/static/src/xml/chatter.xml
@@ -6,7 +6,7 @@
-->
<t t-name="mail.chatter.ChatComposer" t-extend="mail.ChatComposer">
<!-- Insert information before the composer -->
- <t t-jquery=".o_composer_mentioned_partners" t-operation="before">
+ <t t-jquery=".o_composer_attachments_list" t-operation="before">
<!-- Internal note composer -->
<t t-if="widget.options.is_log">
<span class="o_chatter_composer_info">
@@ -53,7 +53,7 @@
</t>
<!-- Add a button to open the full composer dialog -->
- <t t-jquery=".o_composer_buttons" t-operation="append">
+ <t t-jquery=".o_composer_button_add_attachment" t-operation="after">
<button class="btn btn-sm btn-icon fa fa-pencil-square-o o_composer_button_full_composer" type="button"/>
</t>
</t>
diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml
index e47363c07bf..d199c0d5fdf 100644
--- a/addons/mail/static/src/xml/composer.xml
+++ b/addons/mail/static/src/xml/composer.xml
@@ -2,14 +2,13 @@
<templates xml:space="preserve">
<div t-name="mail.ChatComposer" class="o_chat_composer">
- <div class="o_composer_mentioned_partners"/>
<div class="o_composer_attachments_list"/>
<div class="o_composer">
- <textarea class="o_composer_input" placeholder="Write something"/>
+ <textarea class="o_composer_input" placeholder="Write something..."/>
<div class="btn-group o_composer_buttons">
- <button class="btn btn-sm btn-primary o_composer_button_send" type="button">Send</button>
<button class="btn btn-sm btn-icon fa fa-smile-o o_composer_button_emoji" type="button" data-toggle="popover"/>
<button class="btn btn-sm btn-icon fa fa-paperclip o_composer_button_add_attachment" type="button"/>
+ <button class="btn btn-sm btn-primary o_composer_button_send" type="button">Send</button>
</div>
</div>
@@ -33,16 +32,16 @@
</t>
</t>
- <t t-name="mail.ChatComposer.MentionPartnerSuggestions">
+ <t t-name="mail.ChatComposer.MentionSuggestions">
<ul class="dropdown-menu" aria-labelledby="dropdownMailMentionMenu">
<t t-set="show_divider" t-value="false"/>
<t t-foreach="suggestions" t-as="group">
- <t t-foreach="group" t-as="partner">
- <li t-if="show_divider &amp;&amp; (partner_index === 0)" class="divider"/>
+ <t t-foreach="group" t-as="suggestion">
+ <li t-if="show_divider &amp;&amp; (suggestion_index === 0)" class="divider"/>
<t t-set="show_divider" t-value="true"/>
- <li class="o_mention_proposition" t-att-data-id="partner.id">
+ <li class="o_mention_proposition" t-att-data-id="suggestion.id">
<a href="#">
- <t t-esc="partner.name"/> <t t-if="partner.email">(<t t-esc="partner.email"/>)</t>
+ <t t-esc="suggestion.name"/> <t t-if="suggestion.email">(<t t-esc="suggestion.email"/>)</t>
</a>
</li>
</t>
@@ -50,26 +49,4 @@
</ul>
</t>
- <t t-name="mail.ChatComposer.MentionChannelSuggestions">
- <ul class="dropdown-menu" aria-labelledby="dropdownMailMentionMenu">
- <t t-set="show_divider" t-value="false"/>
- <t t-foreach="suggestions" t-as="group">
- <t t-foreach="group" t-as="channel">
- <li t-if="show_divider &amp;&amp; (channel_index === 0)" class="divider"/>
- <t t-set="show_divider" t-value="true"/>
- <li class="o_mention_proposition" t-att-data-id="channel.id">
- <a href="#"><t t-esc="channel.name"/></a>
- </li>
- </t>
- </t>
- </ul>
- </t>
-
- <t t-name="mail.ChatComposer.MentionTags">
- <t t-if="partners.length">Mention(s): </t>
- <t t-foreach="partners" t-as="partner">
- <span class="badge"><t t-esc="partner.name"/></span>
- </t>
- </t>
-
</templates>
diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml
index 394627940cb..ebf6687c1a3 100644
--- a/addons/mail/static/src/xml/thread.xml
+++ b/addons/mail/static/src/xml/thread.xml
@@ -9,9 +9,13 @@
<t t-if="options.display_load_more &amp;&amp; options.display_order == ORDER.DESC"
t-call="mail.ChatThread.LoadMore"/>
</t>
- <t t-if="!messages.length &amp;&amp; options.display_help">
+ <t t-if="options.display_empty_channel">
<t t-call="mail.EmptyChannel" />
</t>
+ <t t-if="options.display_no_match">
+ <div class="o_thread_title">No matches found</div>
+ <div>No message matches your search. Try to change your search filters.</div>
+ </t>
</t>
<!-- When a channel is empty-->
@@ -30,11 +34,11 @@
<t t-if="options.messages_separator_position == 'top'" t-call="mail.MessagesSeparator"/>
<t t-set="current_day" t-value="0"/>
<t t-foreach="messages" t-as="message">
- <div t-if="current_day != message.date.split(' ')[0]" class="o_thread_date_separator">
+ <div t-if="current_day != message.day" class="o_thread_date_separator">
<span class="o_thread_date">
- <t t-esc="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('LL')"/>
+ <t t-esc="message.day"/>
</span>
- <t t-set="current_day" t-value="message.date.split(' ')[0]"/>
+ <t t-set="current_day" t-value="message.day"/>
</div>
<t t-call="mail.ChatThread.Message"/>
@@ -56,8 +60,8 @@
t-att-src="message.avatar_src"
class="o_thread_message_avatar"/>
</t>
- <span t-if="!message.display_author" t-att-title="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('LLL')" class="o_thread_message_side_date">
- <t t-esc="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('hh:mm')"/>
+ <span t-if="!message.display_author" t-att-title="message.date" class="o_thread_message_side_date">
+ <t t-esc="message.date.format('hh:mm')"/>
</span>
<i t-if="!message.display_author &amp;&amp; options.display_stars &amp;&amp; message.message_type != 'notification'"
t-att-class="'fa o_thread_message_star ' + (message.is_starred ? 'fa-star' : 'fa-star-o')"
@@ -83,8 +87,8 @@
<t t-esc="message.displayed_author"/>
</strong>
- <small t-att-title="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('LLL')">
- - <t t-esc="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('hh:mm A')"/>
+ <small t-att-title="message.date">
+ - <t t-esc="message.hour"/>
</small>
<t t-if="message.model &amp;&amp; (message.model != 'mail.channel') &amp;&amp; options.display_document_link">
on <a class="o_mail_redirect" href="#" t-att-data-oe-model="message.model" t-att-data-oe-id="message.res_id"><t t-esc="message.record_name"/></a>
@@ -107,7 +111,7 @@
</t>
<t t-call="mail.ChatThread.MessageTracking"/>
</t>
- <p t-if="message.subject" class="o_mail_subject">Subject: <t t-esc="message.subject"/></p>
+ <p t-if="options.display_subject &amp;&amp; message.subject &amp;&amp; message.message_type != 'notification'" class="o_mail_subject">Subject: <t t-esc="message.subject"/></p>
<t t-if="!(message.tracking_value_ids &amp;&amp; message.tracking_value_ids.length &gt; 0)">
<t t-if="message.body_short">
<div class="o_mail_body_short">
@@ -115,7 +119,6 @@
</div>
<div class="o_mail_body_long">
<t t-raw="message.body"/>
- <span class="oe_mail_expand"><a href="#">... read less</a></span>
</div>
</t>
<t t-if="! message.body_short">