diff options
Diffstat (limited to 'addons/mail/static/src/xml/thread.xml')
| -rw-r--r-- | addons/mail/static/src/xml/thread.xml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml index 6bd704fd784..2d877068694 100644 --- a/addons/mail/static/src/xml/thread.xml +++ b/addons/mail/static/src/xml/thread.xml @@ -3,10 +3,6 @@ <!-- @param {mail.model.AbstractThread} thread - @param {Object[]} hideAuthorMessages dict where key is message ID and - value is boolean. It tells whether the message with this ID should - hide the author visually or not. - @param {Object} options @param {boolean} [options.displayEmptyThread] @param {boolean} [options.displayLoadMore] @param {boolean} [options.displayNoMatchFound] @@ -159,7 +155,12 @@ </t> <!-- + @param {mail.model.AbstractThread} thread @param {string} dateFormat + @param {Object[]} hideAuthorMessages dict where key is message ID and + value is boolean. It tells whether the message with this ID should + hide the author visually or not. + @param {Object} options @param {mail.model.AbstractMessage} message @param {Object} options @param {boolean} [options.displayAvatars] @@ -172,13 +173,12 @@ @param {string|integer} [options.messagesSeparatorPosition] 'top' or message ID, the separator is placed just after this message. @param {integer} [options.selectedMessageID] - @param {string|integer} [options.threadID] --> <t t-name="mail.widget.Thread.Message"> <div t-att-class="'o_thread_message' + (message.getID() === options.selectedMessageID ? 'o_thread_selected_message ' : ' ') + (message.isDiscussion() or message.isNotification() ? ' o_mail_discussion' : ' o_mail_not_discussion')" t-att-data-message-id="message.getID()"> <div t-if="options.displayAvatars" class="o_thread_message_sidebar"> <t t-if="message.hasAuthor()"> - <img t-if="message.shouldDisplayAuthor()" + <img t-if="displayAuthorMessages[message.getID()]" alt="" t-att-src="message.getAvatarSource()" data-oe-model="res.partner" @@ -186,20 +186,20 @@ t-attf-class="o_thread_message_avatar img-circle #{message.shouldRedirectToAuthor() ? 'o_mail_redirect' : ''}"/> </t> <t t-else=""> - <img t-if="message.shouldDisplayAuthor()" + <img t-if="displayAuthorMessages[message.getID()]" alt="" t-att-src="message.getAvatarSource()" class="o_thread_message_avatar img-circle"/> </t> - <span t-if="!message.shouldDisplayAuthor()" t-att-title="message.getDate().format(dateFormat)" class="o_thread_message_side_date"> + <span t-if="!displayAuthorMessages[message.getID()]" t-att-title="message.getDate().format(dateFormat)" class="o_thread_message_side_date"> <t t-esc="message.getDate().format('hh:mm')"/> </span> - <i t-if="!message.shouldDisplayAuthor() and options.displayStars and message.getType() !== 'notification'" + <i t-if="!displayAuthorMessages[message.getID()] and options.displayStars and message.getType() !== 'notification'" t-att-class="'fa o_thread_message_star o_thread_icon ' + (message.isStarred() ? 'fa-star' : 'fa-star-o')" t-att-data-message-id="message.getID()" title="Mark as Todo" role="img" aria-label="Mark as todo"/> </div> <div class="o_thread_message_core"> - <p t-if="message.shouldDisplayAuthor()" class="o_mail_info text-muted"> + <p t-if="displayAuthorMessages[message.getID()]" class="o_mail_info text-muted"> <input t-if="message.needsModeration() and message.needsModerationByUser()" type="checkbox" class="moderation_checkbox" t-att-data-message-id="message.getID()"/> <t t-if="message.isNote()"> Note by @@ -223,7 +223,7 @@ <t t-if="message.isLinkedToDocumentThread() and options.displayDocumentLinks"> on <a t-att-href="message.getURL()" t-att-data-oe-model="message.getDocumentModel()" t-att-data-oe-id="message.getDocumentID()" class="o_document_link"><t t-esc="message.getDocumentName()"/></a> </t> - <t t-if="message.originatesFromChannel() and (message.getOriginChannelID() !== options.threadID)"> + <t t-if="message.originatesFromChannel() and (message.getOriginChannelID() !== thread.getID())"> (from <a t-att-data-oe-id="message.getOriginChannelID()" href="#">#<t t-esc="message.getOriginChannelName()"/></a>) </t> <span t-if="options.displayEmailIcons and message.hasCustomerEmailData()" class="o_thread_tooltip_container"> |
