summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml/thread.xml
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-11-25 16:18:10 +0100
committerChristophe Simonis <chs@odoo.com>2015-11-25 16:18:10 +0100
commitd4906307459f3c67270d6461a7db2367cc24cd20 (patch)
treee0bfd33e7afe2634de8228ed68027bdf2fcc10b6 /addons/mail/static/src/xml/thread.xml
parent0ff9a1c34a8019081c1fb2d5f97c984b9c6a1b99 (diff)
parentb2939537d97624122bddfecaadb2490d2f4c477c (diff)
[MERGE] forward port of branch 9.0 up to b293953
Diffstat (limited to 'addons/mail/static/src/xml/thread.xml')
-rw-r--r--addons/mail/static/src/xml/thread.xml65
1 files changed, 51 insertions, 14 deletions
diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml
index d10318c5a17..394627940cb 100644
--- a/addons/mail/static/src/xml/thread.xml
+++ b/addons/mail/static/src/xml/thread.xml
@@ -9,14 +9,25 @@
<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.no_content_helper">
- <div class="o_chat_help_message">
- <t t-raw="options.no_content_helper"/>
- </div>
+ <t t-if="!messages.length &amp;&amp; options.display_help">
+ <t t-call="mail.EmptyChannel" />
</t>
</t>
+ <!-- When a channel is empty-->
+ <div t-name="mail.EmptyChannel">
+ <t t-if="options.channel_id==='channel_inbox'">
+ <div class="o_thread_title">Congratulation, your inbox is empty</div>
+ <div>New messages will appear here.</div>
+ </t>
+ <t t-if="options.channel_id==='channel_starred'">
+ <div class="o_thread_title">No message starred</div>
+ <div> You can mark any message as 'starred', and it will show up in this channel.</div>
+ </t>
+ </div>
+
<t t-name="mail.ChatThread.Content">
+ <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">
@@ -48,16 +59,11 @@
<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>
+ <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')"
+ t-att-data-message-id="message.id" t-att-title="_t('Mark as Todo')"/>
</div>
<div class="o_thread_message_core">
- <span class="pull-right">
- <i t-if="message.is_needaction &amp;&amp; options.display_needactions"
- class="fa fa-check o_thread_message_needaction"
- t-att-data-message-id="message.id" t-att-title="_t('Mark as Done')"/>
- <i t-if="options.display_stars &amp;&amp; message.message_type != 'notification'"
- t-att-class="'fa fa-lg o_thread_message_star ' + (message.is_starred ? 'fa-star' : 'fa-star-o')"
- t-att-data-message-id="message.id" t-att-title="_t('Mark as Todo')"/>
- </span>
<p t-if="message.display_author" class="o_mail_info">
<t t-if="message.is_note">
Note by
@@ -84,21 +90,52 @@
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>
</t>
<t t-if="message.origin_id &amp;&amp; (message.origin_id !== options.channel_id)">
- (from <a class="o_channel_redirect" t-att-data-oe-id="message.origin_id" href="#"><t t-esc="message.origin_name"/>)</a>
+ (from <a class="o_channel_redirect" t-att-data-oe-id="message.origin_id" href="#">#<t t-esc="message.origin_name"/></a>)
</t>
+ <span>
+ <i t-if="options.display_stars &amp;&amp; message.message_type != 'notification'"
+ t-att-class="'fa fa-lg o_thread_message_star ' + (message.is_starred ? 'fa-star' : 'fa-star-o')"
+ t-att-data-message-id="message.id" t-att-title="_t('Mark as Todo')"/>
+ <i t-if="message.is_needaction &amp;&amp; options.display_needactions"
+ class="fa fa-check o_thread_message_needaction"
+ t-att-data-message-id="message.id" t-att-title="_t('Mark as Done')"/>
+ </span>
</p>
<t t-if="message.tracking_value_ids &amp;&amp; message.tracking_value_ids.length &gt; 0">
+ <t t-if="message.subtype_description">
+ <p t-esc="message.subtype_description"/>
+ </t>
<t t-call="mail.ChatThread.MessageTracking"/>
</t>
<p t-if="message.subject" 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-raw="message.body"/>
+ <t t-if="message.body_short">
+ <div class="o_mail_body_short">
+ <t t-raw="message.body_short"/>
+ </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">
+ <t t-raw="message.body"/>
+ </t>
</t>
<t t-foreach="message.attachment_ids" t-as="attachment">
<t t-call="mail.Attachment"/>
</t>
</div>
</div>
+ <t t-if="options.messages_separator_position == message.id">
+ <t t-call="mail.MessagesSeparator"/>
+ </t>
+ </t>
+
+ <t t-name="mail.MessagesSeparator">
+ <div class="o_thread_new_messages_separator">
+ <span class="o_thread_separator_label">New messages</span>
+ </div>
</t>
<t t-name="mail.ChatThread.MessageTracking">