summaryrefslogtreecommitdiff
path: root/addons/sms/static/src/xml/thread.xml
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-04-17 09:53:05 +0000
committerSébastien Theys <seb@odoo.com>2020-04-17 12:17:57 +0000
commitdea52493b819939ae16391d8b19c2f404c7ec143 (patch)
treeda5729bab3ff9bc36825480f54c838b17fced580 /addons/sms/static/src/xml/thread.xml
parent69b51ce05e855b2b95e75919ac97996a1ff5e136 (diff)
[IMP] mail, sms, snailmail, test_mail_full: adapt mail.notification
The purpose is to have more common code for failure and notifications, with less override in `sms` and `snailmail`. task-2176017 closes odoo/odoo#44170 Related: odoo/enterprise#9140 Related: odoo/upgrade#918 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/sms/static/src/xml/thread.xml')
-rw-r--r--addons/sms/static/src/xml/thread.xml31
1 files changed, 5 insertions, 26 deletions
diff --git a/addons/sms/static/src/xml/thread.xml b/addons/sms/static/src/xml/thread.xml
index 6fb9530a8f4..56133864767 100644
--- a/addons/sms/static/src/xml/thread.xml
+++ b/addons/sms/static/src/xml/thread.xml
@@ -1,29 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<template id="template" xml:space="preserve">
-
- <t t-extend="mail.widget.Thread.Message">
- <t t-jquery=".o_thread_tooltip_container" t-operation="after">
- <span t-if="message.getType() === 'sms' and message.hasSmsData() and options.displaySmsIcons" class="o_thread_sms_tooltip_container ml-1">
- <t t-set="thread_icon_class" t-value="'o_thread_sms_tooltip o_thread_message_sms o_thread_message_sms_' + message.getSmsStatus()" />
- <span t-attf-class="d-inline-flex align-items-center o_thread_sms_tooltip o_thread_message_sms o_thread_message_sms_#{message.getSmsStatus()} #{message.isError() ? 'o_thread_message_sms_error' : ''}"
- t-att-data-message-id="message.getID()">
- <i class="fa fa-mobile"/>
- <small class="font-weight-bold ml-1">SMS</small>
- </span>
- </span>
- </t>
+ <t t-inherit="mail.widget.Thread.Message.MailTooltip" t-inherit-mode="extension">
+ <xpath expr="//span[@name='notification_status']" position="inside">
+ <i t-if="notification.notification_status === 'outgoing'" class='fa fa-clock-o' title="Awaiting Dispatch" role="img" aria-label="Awaiting Dispatch"/>
+ </xpath>
</t>
-
- <t t-name="sms.widget.Thread.Message.SmsTooltip">
- <div t-foreach="data" t-as="customerSMSData">
- <span class="d-inline-block text-center o_thread_tooltip_icon">
- <i t-if="customerSMSData[2] === 'sent'" class='fa fa-check' title="Sent" role="img" aria-label="Sent"/>
- <i t-if="customerSMSData[2] === 'canceled'" class='fa fa-trash-o' title="Canceled" role="img" aria-label="Canceled"/>
- <i t-if="customerSMSData[2] === 'outgoing'" class='fa fa-clock-o' title="Awaiting Dispatch" role="img" aria-label="Awaiting Dispatch"/>
- <i t-if="customerSMSData[2] === 'exception'" class='fa fa-exclamation text-danger' title="Error" role="img" aria-label="Error"/>
- </span>
- <span t-esc="customerSMSData[1]"/>
- </div>
- </t>
-
- </template>
+</template>