We add the o_touch_device css class to the body (it was done in enterprise only), and various other small changes to make sure that the action buttons (in discuss, next to the message title) are always visible (not only on hover) when we are on a touch device. (pr (#15459, closes task 31208)
200 lines
11 KiB
XML
200 lines
11 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="options.display_empty_channel">
|
|
<t t-call="mail.EmptyChannel" />
|
|
</t>
|
|
<div t-if="options.display_no_match" class="o_mail_no_content">
|
|
<div class="o_thread_title">No matches found</div>
|
|
<div>No message matches your search. Try to change your search filters.</div>
|
|
</div>
|
|
</t>
|
|
|
|
<!-- When a channel is empty-->
|
|
<div t-name="mail.EmptyChannel" class="o_mail_no_content">
|
|
<t t-if="options.channel_id==='channel_inbox'">
|
|
<div class="o_thread_title">Congratulations, your inbox is empty</div>
|
|
<div>New messages appear here.</div>
|
|
</t>
|
|
<t t-if="options.channel_id==='channel_starred'">
|
|
<div class="o_thread_title">No starred message</div>
|
|
<div> You can mark any message as 'starred', and it shows 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.day" class="o_thread_date_separator">
|
|
<span class="o_thread_date">
|
|
<t t-esc="message.day"/>
|
|
</span>
|
|
<t t-set="current_day" t-value="message.day"/>
|
|
</div>
|
|
|
|
<t t-call="mail.ChatThread.Message"/>
|
|
</t>
|
|
</t>
|
|
|
|
<t t-name="mail.ChatThread.Message">
|
|
<div t-att-class="'o_thread_message' + (message.expanded ? ' o_message_expanded ' : ' ') + (message.is_selected ? 'o_thread_selected_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_redirect ? message.author_id[0] : ''"
|
|
t-attf-class="o_thread_message_avatar #{message.author_redirect ? '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="message.date" class="o_thread_message_side_date">
|
|
<t t-esc="message.date.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" title="Mark as Todo"/>
|
|
</div>
|
|
<div t-att-class="'o_thread_message_core' + (message.is_note ? ' o_mail_note' : '')">
|
|
<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_redirect ? message.author_id[0] : ''"
|
|
t-attf-class="#{message.author_redirect ? '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 class="o_mail_timestamp" t-att-title="message.date"><t t-esc="message.hour"/></small>
|
|
<t t-if="message.model && (message.model != 'mail.channel') && options.display_document_link">
|
|
on <a t-att-href="message.url" 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 t-att-data-oe-id="message.origin_id" href="#">#<t t-esc="message.origin_name"/></a>)
|
|
</t>
|
|
<span t-if="options.display_email_icon && message.customer_email_data && message.customer_email_data.length" class="o_thread_tooltip_container">
|
|
<i t-att-class="'o_thread_tooltip o_thread_message_email o_thread_message_email_' + message.customer_email_status + ' fa fa-envelope-o'"/>
|
|
<span class="o_thread_tooltip_content">
|
|
<t t-foreach="message.customer_email_data" t-as="customer">
|
|
<span>
|
|
<t t-if="customer[2] == 'sent'"><i class='fa fa-check'/></t>
|
|
<t t-if="customer[2] == 'bounce'"><i class='fa fa-exclamation'/></t>
|
|
<t t-if="customer[2] == 'exception'"><i class='fa fa-exclamation'/></t>
|
|
<t t-if="customer[2] == 'ready'"><i class='fa fa-send-o'/></t>
|
|
<t t-esc="customer[1]"/>
|
|
</span>
|
|
<br />
|
|
</t>
|
|
</span>
|
|
</span>
|
|
<span t-attf-class="o_thread_icons">
|
|
<i t-if="options.display_stars && !message.is_system_notification"
|
|
t-att-class="'fa fa-lg o_thread_icon o_thread_message_star ' + (message.is_starred ? 'fa-star' : 'fa-star-o')"
|
|
t-att-data-message-id="message.id" title="Mark as Todo"/>
|
|
<i t-if="message.record_name && message.model != 'mail.channel' && options.display_reply_icon"
|
|
class="fa fa-reply o_thread_icon o_thread_message_reply"
|
|
t-att-data-message-id="message.id" title="Reply"/>
|
|
<i t-if="message.is_needaction && options.display_needactions"
|
|
class="fa fa-check o_thread_icon o_thread_message_needaction"
|
|
t-att-data-message-id="message.id" title="Mark as Read"/>
|
|
</span>
|
|
</p>
|
|
<t t-if="message.tracking_value_ids && message.tracking_value_ids.length > 0">
|
|
<t t-if="message.subtype_description">
|
|
<p t-esc="message.subtype_description"/>
|
|
</t>
|
|
<t t-call="mail.ChatThread.MessageTracking"/>
|
|
</t>
|
|
<p t-if="options.display_subject && message.display_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-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">
|
|
<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 || ((value.field_type !== 'boolean') and '')"/> </span>
|
|
<span t-if="value.old_value != value.new_value" class="fa fa-long-arrow-right"/>
|
|
</t>
|
|
<span t-if="value.old_value != value.new_value">
|
|
<t t-esc="value.new_value || ((value.field_type !== 'boolean') and '')"/>
|
|
</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>
|