- display star/mark as read icon next to the message title instead on the far right - display unstar all message in channel starred - enable/disable the 'unstar all' and 'mark read' buttons depending on the number of messages in the corresponding channels - display star on the left sidebar in 'squashed messages' - tweaks to padding in client action - display hash in channel name in lighter tone - light opacity in sidebar - star icon in message sidebar is clickable + small less refactoring - message sidebar is aligned with the message now - messages are not squashed in inbox/starred
155 lines
7.7 KiB
XML
155 lines
7.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<templates xml:space="preserve">
|
|
|
|
<t t-name="mail.ChatThread">
|
|
<t t-if="messages.length">
|
|
<t t-if="options.display_load_more && options.display_order == ORDER.ASC"
|
|
t-call="mail.ChatThread.LoadMore"/>
|
|
<t t-call="mail.ChatThread.Content"/>
|
|
<t t-if="options.display_load_more && options.display_order == ORDER.DESC"
|
|
t-call="mail.ChatThread.LoadMore"/>
|
|
</t>
|
|
<t t-if="!messages.length && options.no_content_helper">
|
|
<div class="o_chat_help_message">
|
|
<t t-raw="options.no_content_helper"/>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
|
|
<t t-name="mail.ChatThread.Content">
|
|
<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">
|
|
<span class="o_thread_date">
|
|
<t t-esc="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('LL')"/>
|
|
</span>
|
|
<t t-set="current_day" t-value="message.date.split(' ')[0]"/>
|
|
</div>
|
|
|
|
<t t-call="mail.ChatThread.Message"/>
|
|
</t>
|
|
</t>
|
|
|
|
<t t-name="mail.ChatThread.Message">
|
|
<div class="o_thread_message" t-att-data-message-id="message.id">
|
|
<div t-if="options.display_avatar" class="o_thread_message_sidebar">
|
|
<t t-if="!message.mailto && message.author_id[0]">
|
|
<img t-if="message.avatar_src && message.display_author"
|
|
t-att-src="message.avatar_src"
|
|
data-oe-model="res.partner"
|
|
t-att-data-oe-id="message.author_id[0]"
|
|
class="o_thread_message_avatar o_mail_redirect"/>
|
|
</t>
|
|
<t t-if="message.mailto || !message.author_id[0]">
|
|
<img t-if="message.avatar_src && message.display_author"
|
|
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>
|
|
<i t-if="!message.display_author && options.display_stars && 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">
|
|
<p t-if="message.display_author" class="o_mail_info">
|
|
<t t-if="message.is_note">
|
|
Note by
|
|
</t>
|
|
|
|
<strong t-if="message.mailto">
|
|
<a class="o_mail_mailto" t-attf-href="mailto:#{message.mailto}?subject=Re: #{message.subject}">
|
|
<t t-esc="message.mailto"/>
|
|
</a>
|
|
</strong>
|
|
<strong t-if="!message.mailto && message.author_id[0]"
|
|
data-oe-model="res.partner" t-att-data-oe-id="message.author_id[0]"
|
|
class="o_mail_redirect">
|
|
<t t-esc="message.displayed_author"/>
|
|
</strong>
|
|
<strong t-if="!message.mailto && !message.author_id[0]">
|
|
<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 t-if="message.model && (message.model != 'mail.channel') && 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>
|
|
</t>
|
|
<t t-if="message.origin_id && (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>
|
|
</t>
|
|
<span>
|
|
<i t-if="options.display_stars && 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 && 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 && message.tracking_value_ids.length > 0">
|
|
<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 && message.tracking_value_ids.length > 0)">
|
|
<t t-raw="message.body"/>
|
|
</t>
|
|
<t t-foreach="message.attachment_ids" t-as="attachment">
|
|
<t t-call="mail.Attachment"/>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="mail.ChatThread.MessageTracking">
|
|
<ul class="o_mail_thread_message_tracking">
|
|
<t t-foreach='message.tracking_value_ids' t-as='value'>
|
|
<li>
|
|
<t t-esc="value.changed_field"/>:
|
|
<t t-if="value.old_value">
|
|
<span> <t t-esc="value.old_value"/> </span>
|
|
<span class="fa fa-long-arrow-right"/>
|
|
</t>
|
|
<span> <t t-esc="value.new_value"/> </span>
|
|
</li>
|
|
</t>
|
|
</ul>
|
|
</t>
|
|
|
|
<t t-name="mail.ChatComposer.Attachments">
|
|
<div class="o_attachments">
|
|
<t t-foreach="attachments" t-as='attachment'>
|
|
<t t-call="mail.Attachment">
|
|
<t t-set="editable" t-value="true"/>
|
|
</t>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="mail.Attachment">
|
|
<div t-attf-class="o_attachment #{attachment.upload ? 'o_attachment_uploading' : ''}" t-att-title="attachment.name">
|
|
<a class="o_image" t-att-href='attachment.url' target="_blank" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/100x80">
|
|
<span class='o_attachment_name'><t t-esc='attachment.name'/></span>
|
|
</a>
|
|
<t t-if="editable">
|
|
<div class="o_attachment_delete">
|
|
<i class='fa fa-times-circle' title="Delete this attachment" t-att-data-id="attachment.id"/>
|
|
</div>
|
|
<div class="o_attachment_progress_bar">
|
|
Uploading
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="mail.ChatThread.LoadMore">
|
|
<div t-if="!all_messages_loaded" class="o_thread_show_more">
|
|
<button class="btn btn-sm btn-link">-------- Show older messages --------</button>
|
|
</div>
|
|
</t>
|
|
|
|
</templates>
|