diff options
Diffstat (limited to 'addons/mail/static/src/xml')
| -rw-r--r-- | addons/mail/static/src/xml/client_action.xml | 32 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/composer.xml | 23 |
2 files changed, 36 insertions, 19 deletions
diff --git a/addons/mail/static/src/xml/client_action.xml b/addons/mail/static/src/xml/client_action.xml index bb29d8cca27..18fef4a4ed6 100644 --- a/addons/mail/static/src/xml/client_action.xml +++ b/addons/mail/static/src/xml/client_action.xml @@ -4,6 +4,12 @@ <!-- Client Action --> <t t-name="mail.client_action"> <div class="o_mail_chat"> + <t t-if="widget.notification_bar"> + <div class="o_mail_annoying_notification_bar"> + <span class="o_mail_request_permission">Odoo needs your permission to <a href="#"> enable desktop notifications</a>.</span> + <span class="fa fa-close"></span> + </div> + </t> <div class="o_mail_chat_sidebar"/> <div class="o_mail_chat_content"/> </div> @@ -21,31 +27,31 @@ <span class="fa fa-star-o"/> Starred </div> - <t t-set="channel_type">public</t> + <t t-set="channel_type" t-value="'public'"/> <t t-call="mail.chat.SidebarTitle"> <t t-set="channel_title">Channels</t> </t> <t t-call="mail.chat.SidebarItems"> - <t t-set="display_hash">true</t> + <t t-set="display_hash" t-value="true"/> <t t-set="input_placeholder">Add a channel</t> </t> - <t t-set="channel_type">dm</t> + <t t-set="channel_type" t-value="'dm'"/> <t t-call="mail.chat.SidebarTitle"> <t t-set="channel_title">Direct Messages</t> </t> <t t-call="mail.chat.SidebarItems"> - <t t-set="display_status">true</t> + <t t-set="display_status" t-value="true"/> <t t-set="input_placeholder">Open chat</t> </t> - <t t-set="channel_type">private</t> + <t t-set="channel_type" t-value="'private'"/> <t t-call="mail.chat.SidebarTitle"> <t t-set="channel_title">Private Channels</t> </t> <t t-call="mail.chat.SidebarItems"> <t t-set="input_placeholder">Add a channel</t> - <t t-set="display_hash">true</t> + <t t-set="display_hash" t-value="true"/> </t> </div> </t> @@ -77,10 +83,14 @@ <t t-set="counter" t-value="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><i t-if="display_status" t-att-class="'o_user_status fa ' + (channel.status == 'online' ? 'fa-circle' : (channel.status == 'away' ? 'fa-clock-o' : 'fa-circle-o'))" t-attf-title="#{channel.status}"/></span> + <span t-if="display_status"> + <t t-call="mail.chat.UserStatus"> + <t t-set="status" t-value="channel.status"/> + </t> + </span> <span t-if="display_hash" class="o_mail_hash">#</span> <t t-esc="channel.name"/> - <i t-if="channel.mass_mailing" class="fa fa-envelope-o"/> + <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"/> @@ -92,6 +102,12 @@ </div> </t> + <t t-name="mail.chat.UserStatus"> + <i t-if="status == 'online'" class="o_mail_user_status o_user_online fa fa-circle" title="Online"/> + <i t-if="status == 'away'" class="o_mail_user_status o_user_idle fa fa-circle" title="Idle"/> + <i t-if="status == 'offline'" class="o_mail_user_status fa fa-circle-o" title="Offline"/> + </t> + <t t-name="mail.chat.UndoSnackbar"> <div class="alert o_mail_snackbar" data-dismiss="alert" role="alert"> <t t-esc="nb_needactions"/> mention(s) marked as read. diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml index 4e1a9295e3b..9af882c4062 100644 --- a/addons/mail/static/src/xml/composer.xml +++ b/addons/mail/static/src/xml/composer.xml @@ -5,14 +5,22 @@ <div class="o_composer_attachments_list"/> <t t-if="widget.extended"> <div class="o_composer_subject"> - <input placeholder="Subject"></input> - <t t-call="mail.ChatComposer.Buttons"></t> + <input type="text" placeholder="Subject"></input> + <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> + <button class="btn btn-sm btn-icon fa fa-smile-o o_composer_button_emoji" type="button" data-toggle="popover"/> + <button class="btn btn-sm btn-icon fa fa-paperclip o_composer_button_add_attachment" type="button"/> + </div> </div> </t> - <div class="o_composer"> + <div t-attf-class="o_composer #{widget.extended ? 'o_extended_composer' : ''}"> <textarea class="o_composer_input" placeholder="Write something..."/> <t t-if="!widget.extended"> - <t t-call="mail.ChatComposer.Buttons"></t> + <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> + <button class="btn btn-sm btn-icon fa fa-smile-o o_composer_button_emoji" type="button" data-toggle="popover"/> + <button class="btn btn-sm btn-icon fa fa-paperclip o_composer_button_add_attachment" type="button"/> + </div> </t> </div> @@ -28,13 +36,6 @@ <span class="o_composer_emoji"></span> </div> - <t t-name="mail.ChatComposer.Buttons"> - <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> - <button class="btn btn-sm btn-icon fa fa-smile-o o_composer_button_emoji" type="button" data-toggle="popover"/> - <button class="btn btn-sm btn-icon fa fa-paperclip o_composer_button_add_attachment" type="button"/> - </div> - </t> <t t-name="mail.ChatComposer.emojis"> <t t-foreach="emojis" t-as="emoji"> <span t-att-data-emoji="emoji.source" class="o_mail_emoji" t-att-title="emoji.description"> |
