diff options
| author | Jérome Maes <jem@openerp.com> | 2015-08-11 10:17:10 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2015-09-01 20:16:09 +0200 |
| commit | 449f25463843767ba41a9a8c2adfdd4ceb2f2e5c (patch) | |
| tree | 5a45357150f4b6f1d7977badc9c84843f64d8d11 /addons/mail/static/src/xml/mail_chat_backend.xml | |
| parent | a9a78ee9b6a499c29b284e1612951cc20249502f (diff) | |
[REF] mail : include real time, and replace Timeline features
This commit add instant messaging features in mail module to make it a real team collaboration tool. Lots of these new features will replace Timeleine view (which is not removed in this commit). Many files have been moved, split or created for a better structure.
- My Channels : A user can be member of channel (mail.channel). These are discussion group, but also an aggregate of notification. Setting a channel as document follower, it will receive all the message (of the chatter) in real time, as information stream.
- A new Inbox : this aims to replace the timeline view. The user will see its channels grouped by 'slot', and receive the message in real time. Jump to the form view, invite people, create private discussion group, talk directly to another employee, ... are the main features. Your message can still be starred. The 'Inbox' will only contain your needaction.
- Needaction concept : a needaction is a message calling you to do something. If you follow a document as a person, the posted message will be 'needaction' for you. It can also be a message where you are mention with a '@my_name' (this feature is not added in this commit).
- The chatter doesn't change so much. It still allow you to see the discussion about the document, to star some message, and treat your needaction.
- Chat : the only way to have a minified conversation is from the Inbox Client Action. It allow you to keep an eye on a channel when working on document.
- Compose Message : it is now common to the Inbox, and the chatter. It offers shortcode substitution, attachments management, and optional subtype.
- UI : the chat window has been clean, they have a new look now.
To do so,
- Chatter code have been completely rewrite, independently of timeline view
- Add 'bus' as mail dependency, to insure real time
- A mail.message is broadcasted on the bus channel (db, mail.channel, channel_id), and a channel header on (db, res.partner, partner_id)
- Extracting mail_thread mixin used for Chatter and ChatMailThread (Inbox client action). This uniformize the programming structure with the server side
- Clean CSS style and use LESS instead of CSS
- Define a new messafe format (message_format method in mail_message.py), compatible with fetching and broadcasting
- Apply guideline coding conventions
This commit also break the module im_livechat, since im_chat models don't exists anymore and will be fixed in the next commit.
Thanks to Thibault Delavallee (tde) for the long debates and precious advices, Richard Mathot (rim) for the support, Simon Lejeune (sle) for the client action layout, and the Usability Team (apr, lle, bst yti) for the long testing.
Conflicts:
addons/mail/models/mail_thread.py
Diffstat (limited to 'addons/mail/static/src/xml/mail_chat_backend.xml')
| -rw-r--r-- | addons/mail/static/src/xml/mail_chat_backend.xml | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/addons/mail/static/src/xml/mail_chat_backend.xml b/addons/mail/static/src/xml/mail_chat_backend.xml new file mode 100644 index 00000000000..9dc42749767 --- /dev/null +++ b/addons/mail/static/src/xml/mail_chat_backend.xml @@ -0,0 +1,155 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates xml:space="preserve"> + + <!-- Notification Counter of the Systray Menu --> + <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') || ''"/></i> + </a> + </li> + </t> + + <!-- Add More / Search Box --> + <t t-name="mail.chat.AbstractAddMoreSearch"> + <div class="o_mail_chat_add_more_search"> + <a href="#" class="o_mail_chat_add_more_text"><t t-esc="widget.label"/></a> + <div class="o_mail_chat_add_more_search_bar" style="display: none;"> + <input type="text" class="o_mail_chat_search_input"/> + </div> + </div> + </t> + + <!-- PartnerInviteDialog : content of the dialog --> + <t t-name="mail.chat.PartnerInviteDialog"> + <div class="o_mail_chat_partner_invite"> + <input type="text" class="o_mail_chat_partner_invite_input" id="mail_search_partners"/> + </div> + </t> + + + <!-- + ChatMailThread + Layout of the client action + param: widget : the widget (ChatMailThread) + --> + <t t-name="mail.chat.ChatMailThread"> + <div class="o_mail_chat o_mail_thread"> + <!-- Sidebar --> + <div class="o_mail_chat_sidebar"> + <!-- Static channel list --> + <ul class="nav nav-pills nav-stacked"> + <li class="o_mail_chat_channel_item" data-channel-id="channel_inbox"> + <a href="#">@ Inbox + <span class="badge pull-right o_mail_chat_needaction" data-channel-id="channel_inbox" t-att-style="((widget.get('needaction_inbox_counter') > 0) ? 'display:block;' : 'display:none;')"> + <t t-esc="widget.get('needaction_inbox_counter')"/> + </span> + </a> + </li> + <li class="o_mail_chat_channel_item" data-channel-id="channel_starred"> + <a href="#"><i class="fa fa-star-o"> Starred</i></a> + </li> + </ul> + <!-- Channel list --> + <h4 class="o_mail_chat_sidebar_title"><t t-esc="_t('Channels')"/></h4> + <t t-call="mail.chat.ChatMailThread.channels"> + <t t-set="channel_slot" t-value="'channel_channel'"/> + </t> + <!-- Direct Message list (res.users)--> + <h4 class="o_mail_chat_sidebar_title"><t t-esc="_t('Direct Message')"/></h4> + <t t-call="mail.chat.ChatMailThread.partners"/> + <!-- Private Group list --> + <h4 class="o_mail_chat_sidebar_title"><t t-esc="_t('Private Group')"/></h4> + <t t-call="mail.chat.ChatMailThread.channels"> + <t t-set="channel_slot" t-value="'channel_private_group'"/> + </t> + </div> + <!-- Content --> + <div class="o_mail_chat_content"> + <div class="o_mail_chat_messages"> + <div class="container-fluid o_mail_chat_messages_content"> + <t t-call="mail.chat.ChatMailThread.content"/> + </div> + </div> + <div class="o_mail_chat_composer_wrapper"> + + </div> + </div> + </div> + </t> + + <!-- + List of channel in the sidebar + param: channel_slot : the name of the channel slot + param: widget : the widget (ChatMailThread) + --> + <t t-name="mail.chat.ChatMailThread.channels"> + <ul t-att-class="'nav nav-pills nav-stacked o_mail_chat_channel_slot_' + channel_slot" data-toggle="pill"> + <t t-foreach="widget.get(channel_slot)" t-as="channel"> + <li t-att-class="'o_mail_chat_channel_item ' + (channel.message_needaction_counter > 0 ? 'o_mail_chat_channel_unread' : ' ')" t-att-data-channel-id="channel.id" role="presentation"> + <a t-att-href="_.str.sprintf('#active_id=%s&action=%s', channel.id, widget.action.id)"> + <t t-esc="channel.name"/> + <span class="badge pull-right o_mail_chat_needaction" t-att-data-channel-id="channel.id" t-att-style="((channel.message_needaction_counter > 0) ? 'display:block;' : 'display:none;')"> + <t t-esc="channel.message_needaction_counter"/> + </span> + </a> + </li> + </t> + </ul> + </t> + + <!-- + List of Partners of Direct Message channel + param: widget : the widget (ChatMailThread) + --> + <t t-name="mail.chat.ChatMailThread.partners"> + <ul class="nav nav-pills nav-stacked o_mail_chat_channel_slot_partners"> + <t t-foreach="widget.get('partners')" t-as="partner"> + <li class="o_mail_chat_partner_item" t-att-data-partner-id="partner.id" role="presentation"> + <a href="#"> + <i t-att-class="'fa ' + (partner.im_status == 'online' ? 'fa-circle' : 'fa-circle-o')"/> + <t t-esc="partner.name"/> + <span class="fa fa-times pull-right o_mail_chat_partner_unpin" t-att-title="_t('Untoggle')" t-att-data-partner-id="partner.id"/> + </a> + </li> + </t> + </ul> + </t> + + <!-- + Channel content (messages) or 'Help Message' of the client action + param: widget : the widget (ChatMailThread) + --> + <t t-name="mail.chat.ChatMailThread.content"> + <t t-if="widget.get('messages').length"> + <t t-call="mail.Thread.messages"/> + </t> + <t t-if="!widget.get('messages').length"> + <div class="o_mail_chat_help_message"> + <t t-raw="widget.help_message"/> + </div> + </t> + </t> + + <!-- + Buttons of the Control Panel + --> + <t t-name="mail.chat.ControlButtons"> + <div class="o_mail_chat_cp_buttons"> + <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_minimize" t-att-title='_t("Minimize the conversation")'>Minimize</button> + <div class="btn-group"> + <button type="button" class="btn btn-default btn-sm dropdown-toggle o_mail_chat_button_more" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + More <span class="caret"></span> + </button> + <ul class="dropdown-menu"> + <li class="o_mail_chat_button_unsubscribe"><a href="#">Unsubscribe</a></li> + <li class="o_mail_chat_button_settings"><a href="#">Settings</a></li> + </ul> + </div> + + </div> + </t> + + +</templates> |
