diff options
| author | Géry Debongnie <ged@odoo.com> | 2015-09-30 14:14:30 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2015-10-01 14:00:18 +0200 |
| commit | 2a5f07e0b919d4209c2cb72c6dfdc8b86cd5c7ff (patch) | |
| tree | 54cbc12fb66b72ad21f94857ac24052a3abf3f6a /addons/mail/static/src/xml | |
| parent | 62be162877f30a6ca0f61b38f0b070d56f7ab419 (diff) | |
[REF] mail: last part of the chat refactoring (client side)
Removal of old files and update of assets and imports
Joint work with aab
Diffstat (limited to 'addons/mail/static/src/xml')
| -rw-r--r-- | addons/mail/static/src/xml/mail_chat_backend.xml | 139 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail_chat_common.xml | 93 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail_chatter.xml | 98 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail_followers.xml | 80 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail_thread.xml | 196 |
5 files changed, 0 insertions, 606 deletions
diff --git a/addons/mail/static/src/xml/mail_chat_backend.xml b/addons/mail/static/src/xml/mail_chat_backend.xml deleted file mode 100644 index 253cd1e95aa..00000000000 --- a/addons/mail/static/src/xml/mail_chat_backend.xml +++ /dev/null @@ -1,139 +0,0 @@ -<?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> - <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="o_mail_chat_composer_wrapper"/> - </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('Close')" 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.load_more"/> - <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> - <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> - </t> - -</templates> diff --git a/addons/mail/static/src/xml/mail_chat_common.xml b/addons/mail/static/src/xml/mail_chat_common.xml deleted file mode 100644 index 7bbbc3f94d7..00000000000 --- a/addons/mail/static/src/xml/mail_chat_common.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<templates xml:space="preserve"> - - <t t-name="mail.chat.im.Conversation"> - <div class="o_mail_chat_im_window openerp"> - <div class="o_mail_chat_im_window_header"> - <span class="o_mail_chat_im_window_header_name"> - <t t-raw="widget.get('session').name"/> - </span> - <span class="nbr_messages o_mail_chat_im_window_header_counter"/> - <span class="o_mail_chat_im_window_header_buttons"> - <div class="o_mail_chat_im_window_close">×</div> - </span> - </div> - <div class="o_mail_chat_im_window_content"> - <t t-call="mail.chat.im.Conversation.messages"/> - </div> - <div class="oe_im_chatview_footer o_mail_chat_im_window_footer"> - <input class="o_mail_chat_im_window_input" t-att-placeholder="widget.options.placeholder"/> - </div> - </div> - </t> - - <t t-name="mail.chat.im.Conversation.messages"> - <div class="o_mail_chat_im_messages"> - <t t-set="current_day" t-value="0"/> - <t t-foreach="widget.get('messages')" t-as="message"> - <div t-if="current_day != message.date.split(' ')[0]" class="row o_mail_chat_im_window_date_sperator"> - <t t-raw="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('LL')"/> - <t t-set="current_day" t-value="message.date.split(' ')[0]"/> - </div> - <div class="o_mail_chat_im_message"> - <div class="o_mail_chat_im_message_avatar"> - <img t-if="message.message_type == 'email' && (!message.author_id || !message.author_id[0]) && message.email_from" src="/mail/static/src/img/email_icon.png" alt="avatar" class="img-responsive img-rounded"/> - <img t-if="message.message_type == 'email' && (message.author_id && message.author_id[0]) && !message.email_from" t-att-src="'/web/image/res.partner/'+message.author_id[0]+'/image_small'" class="img-responsive img-rounded"/> - <img t-if="message.message_type !== 'email' && (message.author_id && message.author_id[0])" t-att-src="'/web/image/mail.message/'+message.id+'/author_avatar'" class="img-responsive img-rounded"/> - <img t-if="message.message_type !== 'email' && (!message.author_id || !message.author_id[0])" src="/mail/static/src/img/smiley/avatar.jpg" class="img-responsive img-rounded"/> - </div> - <div class="o_mail_chat_im_message_core"> - <!-- author --> - <span class="text-muted"> - <t t-if="message.author_id && message.author_id[0]"> - <strong><t t-esc="message.author_id[1]"/></strong> - - </t> - <t t-if="!message.author_id || !message.author_id[0]"> - <strong><t t-esc="default_username || widget.options.default_username"/></strong> - - </t> - <t t-if="!message.author_id"> - <strong><t t-esc="message.email_from"/></strong> - - </t> - <span class="small"><t t-esc="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('hh:mm')"/></span> - </span> - <!-- body --> - <p class="o_mail_chat_im_message_body"> - <t t-if="message.body"> - <t t-raw="message.body"/> <!-- TODO JEM : tracking message and attachments ??!! --> - </t> - <t t-if="!message.body"> - <t t-call="mail.chat.im.Conversation.tracking_message"/> - </t> - </p> - <!-- Attachments --> - <div t-attf-class="o_mail_chat_im_message_attachment"> - <t t-foreach="message.attachment_ids" t-as="attachment"> - <a t-att-href='attachment.url' target="_blank"> - <i t-att-class="attachment.fa_class" t-att-title="'Download ' + (attachment.name || attachment.filename)"/> - </a> - </t> - </div> - </div> - </div> - </t> - </div> - </t> - - <t t-name="mail.chat.im.Conversation.tracking_message"> - <div> - <ul class="o_mail_message_tracking"> - <t t-foreach='message.tracking_value_ids' t-as='value'> - <li> - <t t-esc="value.changed_field"/> : - <t t-if="value.old_value"> - <span class="o_mail_message_tracking_value"> <t t-esc="value.old_value"/> </span> - <span> <i class="fa fa-long-arrow-right"></i> </span> - </t> - <span class="o_mail_message_tracking_value"> <t t-esc="value.new_value"/> </span> - </li> - </t> - </ul> - </div> - </t> - -</templates>
\ No newline at end of file diff --git a/addons/mail/static/src/xml/mail_chatter.xml b/addons/mail/static/src/xml/mail_chatter.xml deleted file mode 100644 index 860633d6096..00000000000 --- a/addons/mail/static/src/xml/mail_chatter.xml +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<templates> - - <t t-name="mail.chatter.ComposeMessage"> - <div class="mail_chatter_message_composer"> - <!-- Log a Note (subtypes)--> - <t t-if="widget.options.is_log"> - <span class="text-muted"> - Log an internal note which will not be sent to followers.<br/> - Note that users reading the document can read internal notes. - </span> - <!-- Internal subtypes --> - <div t-att-class="'form-group col-md-8 ' + (widget.options.internal_subtypes.length <= 1 ? ' hide' : '')"> - <label class="col-sm-2 control-label">Activity</label> - <div class="col-sm-4"> - <select class="form-control o_mail_chatter_compose_message_subtype_select"> - <t t-foreach="widget.options.internal_subtypes" t-as="subtype"> - <option t-att-value="subtype['id']"><t t-raw="subtype['name']"/></option> - </t> - </select> - </div> - </div> - </t> - <!-- New Message (list of followers)--> - <t t-if="!widget.options.is_log"> - <!-- Text for followers --> - <span class="text-muted"> - To: Followers of - <t t-if="widget.options.record_name"> - <t t-raw="'"' + widget.options.record_name + '"'"/> - </t> - <t t-if="!widget.options.record_name"> - this document - </t> - </span> - <!-- List of followers --> - <div class="o_mail_chatter_compose_message_suggested_partners"> - <t t-foreach='widget.suggested_partners' t-as='recipient'> - <div t-attf-title="Add as recipient and follower (reason: #{recipient.reason})"> - <input type="checkbox" - t-att-checked="recipient.checked ? 'checked' : undefined" - t-att-data-fullname="recipient.full_name"/> - <t t-esc="recipient.name"/> - <t t-if="recipient.email_address">(<t t-esc="recipient.email_address"/>)</t> - <t t-if="!recipient.email_address">(no email address)</t> - </div> - </t> - </div> - </t> - <!-- Composer Message --> - <t t-call="mail.ComposeMessage"/> - </div> - </t> - - - <t t-name="mail.chatter.ChatterMailThread"> - <div class="o_mail_chatter o_mail_thread"> - <!-- Compose buttons ('new message' and 'log a note') --> - <div class="o_mail_chatter_compose_buttons"> - <button type="button" class="btn btn-sm btn-primary o_mail_chatter_button_new_message" title="Send a message"> - New message - </button> - <button t-if="widget.options.display_log_button" class="btn btn-sm btn-link o_mail_chatter_button_log_note" title="Log a note. Followers will not be notified."> - Log an internal note - </button> - </div> - - <!-- wrap div for ChatterMailComposeMessage --> - <div class="o_mail_chatter_compose_message"/> - <!-- Message list --> - <div class="o_mail_chatter_messages"/> - </div> - </t> - - <t t-name="mail.chatter.ChatterMailThread.messages"> - <t t-if="widget.get('messages').length"> - <t t-call="mail.Thread.messages"/> - <t t-call="mail.Thread.load_more"/> - </t> - <t t-if="!widget.get('messages').length"> - No Messages. - </t> - </t> - - <!-- - ComposeMessage.ButtonTopBar - render of the button on the user bar for open wizard compose message - --> - <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> - - -</templates> diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml deleted file mode 100644 index c25d3954bb1..00000000000 --- a/addons/mail/static/src/xml/mail_followers.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<templates> - -<!-- - Mail Follower (root template) - Template used to display the followers, the actions and the subtypes in a record. ---> -<t t-name="mail.Followers"> - <div class="o_mail_followers"> - <div t-attf-class="o_followers_title_box"> - <button t-attf-class="btn btn-sm btn-default dropdown-toggle" - data-toggle="dropdown" aria-expanded="false"> - <span class="o_followers_count"/> - <span class="caret"/> - </button> - <ul class="dropdown-menu o_followers_list" role="menu"></ul> - </div> - <div class="o_followers_actions"> - <div t-attf-class="btn-group btn-group-sm o_subtypes_list"> - <button class="btn btn-primary o_followers_follow_button o_followers_notfollow"> - <span class="o_follow">Follow</span> - <span class="fa fa-times o_followers_unfollow" aria-hidden="true"> Unfollow</span> - <span class="fa fa-check o_followers_following" aria-hidden="true"> Following</span> - </button><button t-attf-class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> - <span class="caret"/> - </button> - <ul class="dropdown-menu" role="menu"/> - </div> - </div> - </div> -</t> - -<!-- - Mail Followers Partner template - Template used to display a partner following the record ---> -<t t-name="mail.Followers.partner"> - <li class='o_partner'> - <img t-att-src="record.avatar_url"/> - <a t-attf-href="#model=res.partner&id=#{record.res_id}" - t-att-title="record.name" - t-att-data-res-model="record.res_model" - t-att-data-res-id="record.res_id" - t-att-data-id="record.id"><t t-esc="record.name"/></a> - <i t-if="record.is_editable and (widget.records_length > 1)" - class="fa fa-pencil o_edit_subtype hide" title="Edit subscription" - t-att-data-id="record.id" - t-att-data-res-model="record.res_model" - t-att-data-res-id="record.res_id"/> - <i t-if="widget.view_is_editable" class="fa fa-remove o_remove_follower" - title="Remove this follower"/> - </li> -</t> - -<t t-name="mail.Followers.add_more"> - <li t-if="widget.view_is_editable" class="o_add_follower"> - <a href="#"> Add followers </a> - </li> - <li t-if="widget.view_is_editable" class="o_add_follower_channel"> - <a href="#"> Add Channels </a> - </li> - <li t-if="widget.view_is_editable and (widget.followers.length > 0)" class="divider"/> -</t> - -<!-- - Mail Followers Subtype template - Template used to display message subtypes of a follower subscription ---> -<t t-name="mail.Followers.subtype"> - <li class="o_subtype"> - <input type="checkbox" t-att-checked="record.followed" - t-att-id="'input_mail_followers_subtype_'+record.id+(dialog ? '_in_dialog': '')" - t-att-data-id="record.id" t-att-name="record.name" class="o_subtype_checkbox"/> - <span t-att-for="'input_mail_followers_subtype_'+record.id+(dialog ? '_in_dialog': '')"> - <t t-raw="record.name"/> - </span> - </li> -</t> - -</templates>
\ No newline at end of file diff --git a/addons/mail/static/src/xml/mail_thread.xml b/addons/mail/static/src/xml/mail_thread.xml deleted file mode 100644 index 1323cb9c21e..00000000000 --- a/addons/mail/static/src/xml/mail_thread.xml +++ /dev/null @@ -1,196 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<templates> - - <t t-name="mail.ComposeMessage"> - <div class="o_mail_compose_message"> - <div class="dropup o_mail_mention_dropdown"/> - <!-- composer is an input text if display mode is 'chat' and a textarea if it is 'mail' --> - <t t-if="widget.options.display_mode === 'chat'"> - <input type="text" class="o_mail_compose_message_input" placeholder="Write something" name="message" id="send_message"/> - </t> - <t t-if="widget.options.display_mode === 'mail'"> - <textarea class="o_mail_compose_message_input" placeholder="Write something" name="message" id="send_message"/> - </t> - <div class="btn-group o_mail_compose_message_buttons"> - <button t-if="widget.options.display_mode === 'mail'" class="btn btn-primary o_mail_compose_message_button_send" type="button"> - Send - </button> - <button class="btn btn-icon fa fa-smile-o o_mail_compose_message_button_emoji" type="button" data-toggle="popover"/> - <button class="btn btn-icon fa fa-paperclip o_mail_compose_message_button_attachment" type="button" data-toggle="popover"/> - <button t-if="widget.options.display_mode === 'mail'" class="btn btn-icon fa fa-pencil-square-o o_mail_compose_message_button_full_message" type="button" data-toggle="popover"/> - </div> - </div> - <div class="o_mail_mention_partner_tags"/> - <div class="o_mail_attachments_list"/> - - <span class="o_mail_attachment_file hide"> - <t t-call="HiddenInputFile"> - <t t-set="fileupload_id" t-value="widget.fileupload_id"/> - <t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t> - <input type="hidden" name="model" value="mail.compose.message"/> - <input type="hidden" name="id" value="0"/> - <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/> - </t> - </span> - <span class="o_mail_compose_message_emoji"></span> - - </t> - - <t t-name="mail.ComposeMessage.emoji"> - <t t-foreach="widget.options.emoji_list" t-as="emoji"> - <span t-att-data-emoji="emoji.source" class="o_mail_compose_message_emoji_img" t-att-title="emoji.description"> - <t t-raw="emoji.substitution"/> - </span> - </t> - </t> - - <t t-name="mail.ComposeMessage.attachments"> - <div class="o_mail_chat_im_attachment_files"> - <t t-foreach="widget.get('attachment_ids')" t-as='attachment'> - <div t-attf-class="o_mail_attachment #{attachment.upload ? 'o_mail_uploading' : ''}" t-att-title="attachment.name"> - <a class="o_image" t-att-href='attachment.url' target="_blank" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/100x80"> - <div class='o_mail_attachment_name'> - <t t-raw='attachment.name'/> - </div> - </a> - <div class="o_mail_attachment_delete"> - <i class='fa fa-times-circle' title="Delete this attachment" t-att-data-id="attachment.id"/> - </div> - <div class="o_mail_attachment_progress_bar"> - Uploading - </div> - </div> - </t> - </div> - </t> - - <t t-name="mail.ComposeMessage.mention_menu"> - <ul class="dropdown-menu" aria-labelledby="dropdownMailMentionMenu"> - <t t-foreach="widget.get('mention_partners')" t-as="partner"> - <li t-att-data-partner-id="partner.id" t-att-class="'o_mail_mention_proposition ' + (partner_index === 0 ? 'active' : '')"> - <a href="#"> - <t t-esc="partner.name"/> (<t t-esc="partner.email || _t('No email')"/>)</a> - </li> - </t> - </ul> - </t> - - <t t-name="mail.ComposeMessage.mention_tags"> - <t t-if="widget.get('mention_selected_partners').length">Mention(s):</t> - <t t-foreach="widget.get('mention_selected_partners')" t-as="partner"> - <span class="badge"><t t-esc="partner.name"/></span> - </t> - </t> - - - <!-- - Message Thread - --> - <t t-name="mail.Thread.messages"> - <t t-set="current_day" t-value="0"/> - <t t-foreach="widget.get('messages')" t-as="message"> - <div t-if="current_day != message.date.split(' ')[0]" class="o_mail_thread_date_separator"> - <div class="o_mail_thread_date_wrapper"> - <div class="o_mail_thread_date_separator_title"> - <t t-raw="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('LL')"/> - </div> - </div> - <t t-set="current_day" t-value="message.date.split(' ')[0]"/> - </div> - <div class="o_mail_thread_message" t-att-data-message-id="message.id"> - <div class="o_mail_thread_message_avatar"> - <img t-if="message.message_type == 'email' && (!message.author_id || !message.author_id[0]) && message.email_from" src="/mail/static/src/img/email_icon.png" alt="avatar" class="o_mail_thread_avatar img-rounded"/> - <img t-if="message.message_type == 'email' && (message.author_id && message.author_id[0]) && !message.email_from" t-att-src="'/web/image/res.partner/'+message.author_id[0]+'/image_small'" class="o_mail_thread_avatar img-rounded"/> - <img t-if="message.message_type !== 'email' && (message.author_id && message.author_id[0])" t-att-src="'/web/image/res.partner/'+message.author_id[0]+'/image_small'" class="o_mail_thread_avatar img-rounded"/> - <img t-if="message.message_type !== 'email' && (!message.author_id || !message.author_id[0])" src="/mail/static/src/img/smiley/avatar.jpg" class="o_mail_thread_avatar img-rounded"/> - </div> - <div t-att-class="'o_mail_thread_message_core ' + 'o_mail_thread_message_type_' + message.message_type + ' ' + (message.is_note ? 'o_mail_thread_message_subtype_note' : '')"> - <!-- actions --> - <span class="pull-right"> - <i t-if="message.is_needaction && widget.options.display_needaction_button" class="fa fa-check o_mail_thread_message_needaction" t-att-data-message-id="message.id" t-att-title="_t('Mark as Done')"/> - <i t-att-class="'fa fa-lg o_mail_thread_message_star ' + (message.is_starred ? 'o_mail_message_starred fa-star' : 'fa-star-o')" t-att-data-message-id="message.id" t-att-title="_t('Mark as Todo')"/> - </span> - - <p class="text-muted"> - <t t-if="message.is_note"> - Note by - </t> - <!-- author : partner or email_from --> - <t t-if="message.author_id && message.author_id[1]"> - <strong class="o_mail_redirect" data-oe-model="res.partner" t-att-data-oe-id="message.author_id[0]"><t t-esc="message.author_id[1]"/></strong> - </t> - <t t-if="message.author_id && !message.author_id[1] && message.email_from"> - <strong><t t-esc="message.email_from"/></strong> - </t> - <t t-if="message.author_id && !message.author_id[1] && !message.email_from"> - <strong><t t-esc="widget.options.default_username"/></strong> - </t> - - <small t-att-title="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('LLL')"> - - <t t-esc="moment(message.date, 'YYYY-MM-DD hh:mm:ss').format('hh:mm')"/> - </small> - <t t-if="message.model && (message.model != 'mail.channel') && widget.options.display_document_link"> - on <a class="o_mail_redirect" t-att-data-oe-model="message.model" t-att-data-oe-id="message.res_id" href="#"><t t-esc="message.record_name"/></a> - </t> - </p> - <!-- tracking message--> - <t t-if="message.tracking_value_ids && message.tracking_value_ids.length > 0"> - <t t-call="mail.Thread.tracking_message"> - <t t-set="message" t-value="message"/> - </t> - </t> - <!-- normal message --> - <t t-if="!(message.tracking_value_ids && message.tracking_value_ids.length > 0)"> - <t t-if="message.body_short"> - <div class="o_mail_body_short"> - <t t-raw="message.body_short"/> - <span class="o_mail_expand"><a href="#">... read more</a></span> - </div> - <div class="o_mail_body_long"> - <t t-raw="message.body"/> - <span class="o_mail_expand"><a href="#">... read less</a></span> - </div> - </t> - <t t-if="! message.body_short"> - <t t-raw="message.body"/> - </t> - </t> - <!-- Attachments --> - <t t-foreach="message.attachment_ids" t-as="attachment"> - <div t-attf-class="o_mail_attachment" t-att-title="attachment.name"> - <a class="o_image" t-att-href='attachment.url' target="_blank" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/100x80"> - <div class='o_mail_attachment_name'> - <t t-raw='attachment.name'/> - </div> - </a> - </div> - </t> - </div> - </div> - </t> - </t> - - <t t-name="mail.Thread.load_more"> - <div t-if="!widget.all_messages_loaded" class="o_mail_thread_show_more"> - <button class="btn btn-sm btn-link">-------- Show more messages --------</button> - </div> - </t> - - <t t-name="mail.Thread.tracking_message"> - <div> - <ul class="o_mail_thread_message_tracking"> - <t t-foreach='message.tracking_value_ids' t-as='value'> - <li> - <t t-esc="value.changed_field"/> : - <t t-if="value.old_value"> - <span class="o_mail_message_tracking_value"> <t t-esc="value.old_value"/> </span> - <span> <i class="fa fa-long-arrow-right"></i> </span> - </t> - <span class="o_mail_message_tracking_value"> <t t-esc="value.new_value"/> </span> - </li> - </t> - </ul> - </div> - </t> - -</templates> |
