summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/src/xml')
-rw-r--r--addons/mail/static/src/xml/chat_window.xml56
-rw-r--r--addons/mail/static/src/xml/client_action.xml21
-rw-r--r--addons/mail/static/src/xml/composer.xml6
-rw-r--r--addons/mail/static/src/xml/systray.xml57
-rw-r--r--addons/mail/static/src/xml/thread.xml8
5 files changed, 114 insertions, 34 deletions
diff --git a/addons/mail/static/src/xml/chat_window.xml b/addons/mail/static/src/xml/chat_window.xml
index 01e475a6eb8..eb003cd59cd 100644
--- a/addons/mail/static/src/xml/chat_window.xml
+++ b/addons/mail/static/src/xml/chat_window.xml
@@ -1,23 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
-
<t t-name="mail.ChatWindow">
<div class="o_chat_window">
<div class="o_chat_header">
- <span class="o_chat_title">
- <t t-esc="widget.title"/>
- </span>
- <span>
- <a href="#" class="o_chat_window_close fa fa-close"></a>
- </span>
+ <t t-call="mail.ChatWindowHeaderContent">
+ <t t-set="title" t-value="widget.title"/>
+ <t t-set="unread_counter" t-value="widget.unread_msgs"/>
+ </t>
</div>
<div class="o_chat_content">
</div>
<div class="o_chat_input">
- <input t-att-placeholder="widget.placeholder"/>
+ <input t-att-placeholder="widget.options.placeholder"/>
+ </div>
+ </div>
+ </t>
+
+ <!-- FIXME: move this to its own file in master -->
+ <t t-name="mail.ExtendedChatWindow" t-extend="mail.ChatWindow">
+ <t t-jquery=".o_chat_header" t-operation="after">
+ <div t-if="widget.options.thread_less" class="o_chat_search_input">
+ <span> To: </span>
+ <input type="text"/>
</div>
+ </t>
+ </t>
+
+ <t t-name="mail.ChatWindowsDropdown">
+ <div t-attf-class="o_chat_window o_chat_window_dropdown dropup #{open ? 'open' : ''}">
+ <span class="o_chat_window_dropdown_toggler dropdown-toggle" data-toggle="dropdown">
+ <i class="fa fa-comments-o"/> <t t-esc="sessions.length"/>
+ <span class="o_total_unread_counter">
+ <t t-if="unread_counter"><t t-esc="unread_counter"/></t>
+ </span>
+ </span>
+ <ul class="dropdown-menu">
+ <t t-foreach="sessions" t-as="session">
+ <li class="o_chat_header" t-att-data-session-id="session.id">
+ <t t-call="mail.ChatWindowHeaderContent">
+ <t t-set="title" t-value="session.window.title"/>
+ <t t-set="unread_counter" t-value="session.window.unread_msgs"/>
+ </t>
+ </li>
+ </t>
+ </ul>
</div>
</t>
+ <t t-name="mail.ChatWindowHeaderContent">
+ <span class="o_chat_title">
+ <t t-esc="title"/>
+ <span class="o_unread_counter">
+ <t t-if="unread_counter">(<t t-esc="unread_counter"/>)</t>
+ </span>
+ </span>
+ <span>
+ <a href="#" class="o_chat_window_close fa fa-close"/>
+ </span>
+ </t>
+
</templates>
diff --git a/addons/mail/static/src/xml/client_action.xml b/addons/mail/static/src/xml/client_action.xml
index c8db64a7d56..e76e56a7810 100644
--- a/addons/mail/static/src/xml/client_action.xml
+++ b/addons/mail/static/src/xml/client_action.xml
@@ -75,13 +75,13 @@
<t t-if="!disable_add_channel || !empty">
<div class="o_mail_sidebar_title">
<h4 t-att-class="channel_type == 'public' ? 'o_mail_open_channels' : ''"><t t-esc="channel_title"/></h4>
- <span t-if="!disable_add_channel" class="fa fa-plus o_add" t-att-title="_t('Add')" t-attf-data-type="#{channel_type}"/>
+ <span t-if="!disable_add_channel" class="fa fa-plus o_add" title="Add" t-attf-data-type="#{channel_type}"/>
</div>
</t>
</t>
<t t-name="mail.chat.SidebarItems">
<t t-foreach="channels" t-as="channel">
- <t t-set="counter" t-value="channel.needaction_counter"/>
+ <t t-set="counter" t-value="channel.is_chat ? channel.unread_counter : channel.needaction_counter"/>
<div t-if="channel.type === channel_type" t-att-data-channel-id="channel.id"
t-attf-class="o_mail_chat_channel_item #{channel.unread_counter ? ' o_unread_message' : ''} #{(active_channel_id == channel.id) ? 'o_active': ''}">
<span t-if="display_status">
@@ -94,7 +94,7 @@
<i t-if="channel.mass_mailing" class="fa fa-envelope-o" title="Sends messages by email"/>
<t t-call="mail.chat.SidebarNeedaction"/>
<span t-attf-class="fa fa-times pull-right o_mail_partner_unpin #{counter ? 'hide' : ''}"
- t-att-title="_t('Leave this channel')" t-att-data-channel-id="channel.id"/>
+ title="Leave this channel" t-att-data-channel-id="channel.id"/>
</div>
</t>
<div t-if="!disable_add_channel" class="o_mail_add_channel" t-attf-data-type="#{channel_type}">
@@ -119,13 +119,14 @@
<!-- Buttons of the Control Panel -->
<t t-name="mail.chat.ControlButtons">
<div>
- <button type="button" class="btn btn-primary btn-sm o_mail_toggle_channels visible-xs-inline" t-att-title='_t("Toggle Channels")'>Channels</button>
- <button type="button" class="btn btn-primary btn-sm o_mail_chat_button_invite" t-att-title='_t("Invite people")'>Invite</button>
- <button type="button" class="btn btn-primary btn-sm o_mail_chat_button_detach hidden-xs" t-att-title='_t("Detach the conversation")'>Detach</button>
- <button type="button" class="btn btn-primary btn-sm o_mail_chat_button_mark_read" t-att-title='_t("Mark all as read")'>Mark all read</button>
- <button type="button" class="btn btn-primary btn-sm o_mail_chat_button_unstar_all" t-att-title='_t("Unstar all messages")'>Unstar all</button>
- <button type="button" class="btn btn-default btn-sm o_mail_chat_button_unsubscribe" t-att-title='_t("Unsubscribe from channel")'>Unsubscribe</button>
- <button type="button" class="btn btn-default btn-sm o_mail_chat_button_settings" t-att-title='_t("Open channel settings")'>Settings</button>
+ <button type="button" class="btn btn-primary btn-sm o_mail_toggle_channels visible-xs-inline" title="Toggle Channels">Channels</button>
+ <button type="button" class="btn btn-primary btn-sm o_mail_chat_button_invite" title="Invite people">Invite</button>
+ <button type="button" class="btn btn-primary btn-sm o_mail_chat_button_detach hidden-xs" title="Detach the conversation">Detach</button>
+ <button type="button" class="btn btn-primary btn-sm o_mail_chat_button_mark_read" title="Mark all as read">Mark all read</button>
+ <button type="button" class="btn btn-primary btn-sm o_mail_chat_button_unstar_all" title="Unstar all messages">Unstar all</button>
+ <button type="button" class="btn btn-default btn-sm o_mail_chat_button_new_message" title="Compose a new message">Send mail</button>
+ <button type="button" class="btn btn-default btn-sm o_mail_chat_button_unsubscribe" title="Unsubscribe from channel">Unsubscribe</button>
+ <button type="button" class="btn btn-default btn-sm o_mail_chat_button_settings" title="Open channel settings">Settings</button>
</div>
</t>
diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml
index 9af882c4062..25f9ba6bfda 100644
--- a/addons/mail/static/src/xml/composer.xml
+++ b/addons/mail/static/src/xml/composer.xml
@@ -14,7 +14,9 @@
</div>
</t>
<div t-attf-class="o_composer #{widget.extended ? 'o_extended_composer' : ''}">
- <textarea class="o_composer_input" placeholder="Write something..."/>
+ <div class="o_composer_input">
+ <textarea placeholder="Write something..."/>
+ </div>
<t t-if="!widget.extended">
<div class="btn-group o_composer_buttons">
<button class="btn btn-sm btn-primary o_composer_button_send" type="button"><t t-esc="widget.options.send_text"/></button>
@@ -33,7 +35,7 @@
<input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
</t>
</span>
- <span class="o_composer_emoji"></span>
+ <span t-att-class="widget.emoji_container_classname"></span>
</div>
<t t-name="mail.ChatComposer.emojis">
diff --git a/addons/mail/static/src/xml/systray.xml b/addons/mail/static/src/xml/systray.xml
index 58a735e80c5..247096b3b6e 100644
--- a/addons/mail/static/src/xml/systray.xml
+++ b/addons/mail/static/src/xml/systray.xml
@@ -1,19 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
- <t t-name="mail.ComposeMessageTopButton">
- <li title='Compose new Message' class="oe_topbar_item oe_topbar_compose_full_email">
- <a href="#">
- <i class="fa fa-envelope-o fa-fw"></i>
+
+ <t t-name="mail.chat.MessagingMenu">
+ <li class="o_mail_navbar_item">
+ <a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="Messages" href="#">
+ <i class="fa fa-comments"/> <span class="o_notification_counter"/>
</a>
+ <ul class="o_mail_navbar_dropdown dropdown-menu" role="menu">
+ <li class="o_mail_navbar_dropdown_top">
+ <div>
+ <button type="button" class="btn btn-sm o_filter_button o_selected"> All </button>
+ <button type="button" class="btn btn-sm o_filter_button" data-filter='chat'> Chat </button>
+ <button type="button" class="btn btn-sm o_filter_button" data-filter='channels'> Channels </button>
+ </div>
+ <button type="button" class="btn btn-sm o_new_message"> New message </button>
+ </li>
+ <li class="o_mail_navbar_dropdown_channels"/>
+ <li class="o_mail_navbar_dropdown_bottom">
+ <button type="button" class="btn o_redirect_to_discuss">
+ @Inbox <span class="o_inbox_counter"/>
+ </button>
+ </li>
+ </ul>
</li>
</t>
- <t t-name="mail.chat.NotificationTopButton">
- <li t-att-title='_t("Notifications")'>
- <a href="#">
- <i class="fa fa-comment"/> <span class="o_notification_counter"/>
- </a>
- </li>
+ <t t-name="mail.chat.ChannelsPreview">
+ <t t-foreach="channels" t-as="channel">
+ <div t-attf-class="o_mail_channel_preview #{channel.unread_counter ? 'o_channel_unread' : ''}"
+ t-att-data-channel_id="channel.id">
+ <img class="o_channel_image" t-att-src="channel.image_src"/>
+ <div class="o_channel_info">
+ <div class="o_channel_title">
+ <span class="o_channel_name">
+ <t t-if="channel.status" t-call="mail.chat.UserStatus">
+ <t t-set="status" t-value="channel.status"/>
+ </t>
+ <t t-esc="channel.name"/>
+ <t t-if="channel.unread_counter">(<t t-esc="channel.unread_counter"/>)</t>
+ </span>
+ <span class="o_last_message_date"> <t t-esc="channel.last_message_date"/> </span>
+ </div>
+ <div class="o_last_message_preview">
+ <t t-raw="channel.last_message_preview"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </t>
+
+ <t t-name="mail.chat.Spinner">
+ <div class="o_spinner"> <i class="fa fa-spinner fa-spin"/> </div>
</t>
</templates>
diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml
index 0952fcf0e7f..970c8ff6a6f 100644
--- a/addons/mail/static/src/xml/thread.xml
+++ b/addons/mail/static/src/xml/thread.xml
@@ -65,7 +65,7 @@
</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')"/>
+ 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">
@@ -99,10 +99,10 @@
<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')"/>
+ t-att-data-message-id="message.id" title="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 Read')"/>
+ t-att-data-message-id="message.id" title="Mark as Read"/>
</span>
</p>
<t t-if="message.tracking_value_ids &amp;&amp; message.tracking_value_ids.length &gt; 0">
@@ -122,7 +122,7 @@
</div>
</t>
<t t-if="!options.shorten_messages || !message.body_short">
- <t t-raw="message.body"/>
+ <div><t t-raw="message.body"/></div>
</t>
</t>
<t t-foreach="message.attachment_ids" t-as="attachment">