summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2015-09-30 14:12:19 +0200
committerGéry Debongnie <ged@odoo.com>2015-10-01 14:00:18 +0200
commit62be162877f30a6ca0f61b38f0b070d56f7ab419 (patch)
tree1d2f750c3ce7f29bd0547acdc98afa160a827f04 /addons/mail/static/src/xml
parent512287cac1fb7d4da632a4be0922679b203aff66 (diff)
[REF] mail: second part of the chat refactoring (client side)
Joint work with aab
Diffstat (limited to 'addons/mail/static/src/xml')
-rw-r--r--addons/mail/static/src/xml/chat_window.xml24
-rw-r--r--addons/mail/static/src/xml/client_action.xml97
-rw-r--r--addons/mail/static/src/xml/systray.xml20
3 files changed, 141 insertions, 0 deletions
diff --git a/addons/mail/static/src/xml/chat_window.xml b/addons/mail/static/src/xml/chat_window.xml
new file mode 100644
index 00000000000..e94c51767c2
--- /dev/null
+++ b/addons/mail/static/src/xml/chat_window.xml
@@ -0,0 +1,24 @@
+<?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-raw="widget.title"/>
+ </span>
+ <span>
+ <a href="#" class="o_chat_window_close fa fa-close"></a>
+ </span>
+ </div>
+ <div class="o_chat_content">
+ <!-- <t t-call="mail.chat.im.Conversation.messages"/> -->
+ </div>
+ <div class="o_chat_input">
+ <input t-att-placeholder="widget.placeholder"/>
+ </div>
+ </div>
+ </t>
+
+</templates>
diff --git a/addons/mail/static/src/xml/client_action.xml b/addons/mail/static/src/xml/client_action.xml
new file mode 100644
index 00000000000..8a23b33333e
--- /dev/null
+++ b/addons/mail/static/src/xml/client_action.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates xml:space="preserve">
+
+ <!--
+ ChatMailThread
+ Layout of the client action
+ param: widget: the widget (ChatMailThread)
+ -->
+ <t t-name="mail.client_action">
+ <div class="o_mail_chat">
+ <div class="o_mail_chat_sidebar"/>
+ <div class="o_mail_chat_content"/>
+ </div>
+ </t>
+
+ <div t-name="mail.chat.Sidebar" class="o_mail_chat_sidebar">
+ <div class="o_mail_chat_channel_item" data-channel-id="channel_inbox">
+ @ Inbox
+ <span t-attf-class="badge pull-right #{(!needaction_counter ? 'hide' : '')}">
+ <t t-esc="needaction_counter"/>
+ </span>
+ </div>
+ <div class="o_mail_chat_channel_item" data-channel-id="channel_starred">
+ <span class="fa fa-star-o"/> Starred
+ </div>
+
+ <div class="o_mail_sidebar_title">
+ <h4>Channels</h4>
+ <span class="fa fa-plus o_add" data-type="public"/>
+ </div>
+ <t t-foreach="channels" t-as="channel">
+ <t t-if="channel.type === 'public'">
+ <div class="o_mail_chat_channel_item" t-att-data-channel-id="channel.id">
+ <t t-esc="channel.name"/>
+ </div>
+ </t>
+ </t>
+ <div class="o_mail_add_channel" data-type="public">
+ <input type="text" placeholder="Add a channel"/>
+ </div>
+
+ <div class="o_mail_sidebar_title">
+ <h4>Direct Messages</h4>
+ <span class="fa fa-plus o_add" data-type="dm"/>
+ </div>
+ <t t-foreach="channels" t-as="channel">
+ <t t-if="channel.type === 'dm'">
+ <div class="o_mail_chat_channel_item" t-att-data-channel-id="channel.id">
+ <i t-att-class="'fa ' + (channel.status == 'online' ? 'fa-circle' : 'fa-circle-o')"/>
+ <t t-esc="channel.name"/>
+ <span class="fa fa-times pull-right o_mail_partner_unpin" t-att-title="_t('Close')" t-att-data-channel-id="channel.id"/>
+ </div>
+ </t>
+ </t>
+ <div class="o_mail_add_channel" data-type="dm">
+ <input type="text" placeholder="Open chat"/>
+ </div>
+
+ <div class="o_mail_sidebar_title">
+ <h4>Private Channels</h4>
+ <span class="fa fa-plus o_add" data-type="private"/>
+ </div>
+ <t t-foreach="channels" t-as="channel">
+ <t t-if="channel.type === 'private'">
+ <div class="o_mail_chat_channel_item" t-att-data-channel-id="channel.id">
+ <t t-esc="channel.name"/>
+ </div>
+ </t>
+ </t>
+ <div class="o_mail_add_channel" data-type="private">
+ <input type="text" placeholder="Add a channel"/>
+ </div>
+
+
+ <!-- <a href="#" class="o_mail_chat_add_more_text"><span class="fa fa-plus"/>Add</a>
+ <div class="o_mail_chat_add_more_search_bar" style="display: none;">
+ <input type="text"/>
+ </div> -->
+ <!-- <t t-call="mail.chat.ChatMailThread.channels">
+ <t t-set="channel_slot" t-value="'channel_private_group'"/>
+ </t> -->
+ </div>
+
+ <!--
+ Buttons of the Control Panel
+ -->
+ <t t-name="mail.chat.ControlButtons">
+ <div>
+ <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-default btn-sm o_mail_chat_button_detach" t-att-title='_t("Detach the conversation")'>Detach</button>
+ </div>
+ </t>
+
+ <div t-name="mail.PartnerInviteDialog">
+ <input type="text" class="o_mail_chat_partner_invite_input" id="mail_search_partners"/>
+ </div>
+</templates>
diff --git a/addons/mail/static/src/xml/systray.xml b/addons/mail/static/src/xml/systray.xml
new file mode 100644
index 00000000000..5f355d88969
--- /dev/null
+++ b/addons/mail/static/src/xml/systray.xml
@@ -0,0 +1,20 @@
+<?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>
+ </a>
+ </li>
+ </t>
+
+ <t t-name="mail.chat.NotificationTopButton">
+ <li t-att-title='_t("Notifications")'>
+ <a href="#">
+ <i class="fa fa-comment"/> <t t-esc="widget.get('counter') || ''"/>
+ </a>
+ </li>
+ </t>
+
+</templates>
+