<div class="oe_msg_attachment_list"></div>
<button class="oe_post">
<t t-if="!widget.is_log">Send</t>
- <t t-if="widget.is_log">Log a note</t>
+ <t t-if="widget.is_log">Log an internal note</t>
</button>
<t t-call="mail.compose_message.add_attachment"/>
</div>
<t t-if="!widget.options.view_mailbox">
<div class="field_text oe_compact oe_compact_record">
<a class="oe_compose_post" t-if="widget.options.compose_placeholder"><t t-raw="widget.options.compose_placeholder"/></a>
- <a class="oe_compose_post" t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox">Send a message</a>
- <span class="oe_grey oe_sep_word">or</span>
- <a class="oe_compose_log">Log a note</a>
+ <a class="oe_compose_post" t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox"
+ title="Send a message. Followers will be notified.">Send a message</a>
+ <t t-if="widget.options.display_log_button">
+ <span class="oe_grey oe_sep_word">or</span>
+ <a class="oe_compose_log" title="Log a note. Followers will not be notified.">Log an internal note</a>
+ </t>
</div>
</t>
</div>
-->
<t t-name="mail.thread.message.attachments">
<t t-foreach='widget.attachment_ids' t-as='attachment'>
- <t t-if="attachment.filetype !== 'webimage'">
+ <t t-if="attachment.file_type_icon !== 'webimage'">
<div t-attf-class="oe_attachment #{attachment.upload ? 'oe_uploading' : ''}">
<a t-att-href='attachment.url' target="_blank">
- <img t-att-src="'/mail/static/src/img/mimetypes/' + attachment.filetype + '.png'"></img>
+ <img t-att-src="'/mail/static/src/img/mimetypes/' + attachment.file_type_icon + '.png'"></img>
<div class='oe_name'><t t-raw='attachment.name' /></div>
</a>
<div class='oe_delete oe_e' title="Delete this attachment" t-att-data-id="attachment.id">[</div>
</div>
</div>
</t>
- <t t-if="attachment.filetype === 'webimage'">
+ <t t-if="attachment.file_type_icon === 'webimage'">
<div t-attf-class="oe_attachment oe_preview #{attachment.upload ? 'oe_uploading' : ''}">
<a t-att-href='attachment.url' target="_blank">
<img t-att-src="widget.attachments_resize_image(attachment.id, [100,80])"></img>
To:
<t t-if="!widget.is_private">
<span class="oe_all_follower">
- <t t-if="widget.parent_thread.parent_message.record_name" t-raw="'"' + widget.parent_thread.parent_message.record_name + '"'">
+ <t t-if="widget.parent_thread.parent_message.record_name">
Followers of <t t-raw="'"' + widget.parent_thread.parent_message.record_name + '"'"/>
</t>
<t t-if="!widget.parent_thread.parent_message.record_name and widget.options.view_inbox">My Followers</t>
<t t-if="!widget.parent_thread.parent_message.record_name and !widget.options.view_inbox">Followers of this document</t>
</span>
</t>
- <t t-if="!widget.is_private and (widget.partner_ids.length or (widget.author_id and widget.author_id[0]))"> and </t>
<t t-set="inc" t-value="0"/>
<t t-foreach="widget.partner_ids" t-as="partner">
- <span t-attf-class="oe_partner_follower #{inc>=3?'oe_hidden':''}"><t t-if="inc" t-raw="', '"/>
- <a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{partner[0]}"><t t-raw="partner[1]"/></a>
- <t t-if="!widget.options.show_link" t-raw="partner[1]"/>
- </span>
- <t t-set="inc" t-value="inc+1"/>
+ <t t-if="widget.is_private or (widget.user_pid != partner[0])">
+ <t t-if="!widget.is_private and inc==0"> and </t>
+ <span t-attf-class="oe_partner_follower #{inc>=3?'oe_hidden':''}"><t t-if="inc" t-raw="', '"/>
+ <a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{partner[0]}"><t t-esc="partner[1]"/></a>
+ <t t-if="!widget.options.show_link" t-esc="partner[1]"/>
+ </span>
+ <t t-set="inc" t-value="inc+1"/>
+ </t>
</t>
<t t-if="widget.partner_ids.length > 3">
- <span class="oe_more">, <a><t t-raw="widget.partner_ids.length - 3"/> others...</a></span>
+ <span class="oe_more">, <a><t t-esc="widget.partner_ids.length - 3"/> others...</a></span>
<a class="oe_more_hidden"><<<</a>
</t>
</div>
<t t-foreach='widget.recipients' t-as='recipient'>
<label t-attf-title="Add as recipient and follower (reason: #{recipient.reason})">
<input type="checkbox" t-att-checked="recipient.checked ? 'checked' : undefined" t-att-data="recipient.full_name"/>
- <t t-raw="recipient.name"/>
- <t t-if="recipient.email_address">(<t t-raw="recipient.email_address"/>)</t>
+ <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>
</label>
</t>
</div>
<div t-if="widget.is_log">
- <span>Attach a note that will not be sent to the followers</span>
+ <span>Log an internal note which will not be sent to followers. Note that users reading the document can read internal notes.</span>
</div>
</t>
<td colspan="2">
<h2 class="oe_view_title">
<span class="oe_view_title_text">
- <t t-raw="widget.action.name"/>
+ <t t-esc="widget.action.name"/>
</span>
</h2>
<t t-if="widget.action.params.header_description">
</span>
</t>
</td>
- <td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
- </tr>
- <tr class="oe_header_row" t-if="widget.action.params.view_inbox and widget.action.params.show_compose_message" >
- <td colspan="2">
- <button type="button" class="oe_write_full oe_highlight">
- Compose a new message
- </button>
- <span class='oe_alternative'>
- or
- <a href='#' class='oe_write_onwall oe_bold' help='Your followers can read this message'>Write to my followers</a>
- </span>
- </td>
+ <td><div class="oe_view_manager_view_search"/></td>
</tr>
</tbody>
</table>
- <div class="oe_mail-placeholder"></div>
- <aside class="oe_mail_wall_aside"></aside>
+ <div class="oe_view_manager_wrapper">
+ <div>
+ <div class="oe_view_manager_body">
+ <div class="oe_searchview_drawer_container"/>
+ <div class="oe_mail-placeholder"></div>
+ <aside class="oe_mail_wall_aside"></aside>
+ </div>
+ </div>
+ </div>
</div>
<!--
<!-- message itself -->
<div class="oe_msg_content">
<h1 t-if="(widget.show_record_name or widget.subject) and !widget.thread_level" class="oe_msg_title">
- <a t-if="widget.options.show_link and widget.show_record_name" class="oe_mail_action_model" t-attf-href="#model=#{widget.model}&id=#{widget.res_id}">
- <t t-raw="widget.record_name"/>
+ <a t-if="widget.options.show_link and widget.show_record_name" class="oe_mail_action_model"
+ t-attf-href="#action=mail.action_mail_redirect&model=#{widget.model}&res_id=#{widget.res_id}">
+ <t t-esc="widget.record_name"/>
</a>
- <span t-if="!widget.options.show_link and widget.show_record_name"><t t-raw="widget.record_name"/></span>
+ <span t-if="!widget.options.show_link and widget.show_record_name"><t t-esc="widget.record_name"/></span>
<t t-if="widget.show_record_name and widget.subject">: </t>
- <t t-if="widget.subject" t-raw="widget.subject"/>
+ <t t-if="widget.subject" t-esc="widget.subject"/>
</h1>
<div class="oe_msg_body">
- <t t-raw="widget.body"/>
+ <t t-if="widget.body_short">
+ <div class="oe_msg_body_short"><t t-raw="widget.body_short"/></div>
+ <div class="oe_msg_body_long" style="display: none;"><t t-raw="widget.body"/><span class="oe_mail_reduce"><a href="#">read less</a></span></div>
+ </t>
+ <t t-if="! widget.body_short">
+ <t t-raw="widget.body"/>
+ </t>
</div>
</div>
<div class="oe_msg_footer">
<t t-if="widget.attachment_ids.length > 0">
<div class="oe_msg_attachment_list"></div>
</t>
- <a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}"><t t-raw="widget.author_id[2]"/></a>
- <span t-if="widget.author_id and (!widget.options.show_link or !widget.author_id[0])"><t t-raw="widget.author_id[2]"/></span>
+ <a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}" t-att-data-partner="widget.author_id[0]" class="oe_mail_action_author"><t t-esc="widget.author_id[2]"/></a>
+ <span t-if="widget.author_id and (!widget.options.show_link or !widget.author_id[0])"><t t-esc="widget.author_id[2]"/></span>
<t t-if="widget.type == 'notification'">
updated document
<t t-if="widget.partner_ids.length > 0">
logged a note
</t>
<t t-if="(widget.type == 'comment' or widget.type == 'email') and (widget.subtype or widget.partner_ids.length > 0)">
- to
- <t t-if="widget.partner_ids.length == 0">
- nobody
+ <!-- Remove nobody if user have no rights on partner that will display 'portal to nobody 5 minutes ago' that will confuse to end user, now it display 'portal 5 minutes ago' if no rights.-->
+ <t t-if="widget.partner_ids.length > 0">
+ to
</t>
</t>
<t t-if="widget.type == 'notification' or ( (widget.type == 'email' or widget.type == 'comment') and (widget.subtype or widget.partner_ids.length > 0))"
t-foreach="widget.partner_ids.slice(0, 3)" t-as="partner">
<span t-attf-class="oe_partner_follower">
- <a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{partner[0]}"><t t-raw="partner[1]"/></a>
- <t t-if="!widget.options.show_link" t-raw="partner[1]"/>
+ <a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{partner[0]}" t-att-data-partner="partner[0]" class="oe_mail_action_author"><t t-esc="partner[1]"/></a>
+ <t t-if="!widget.options.show_link" t-esc="partner[1]"/>
</span>
<t t-if="!partner_last">,</t>
</t>
<t t-if="widget.partner_ids.length > 3">
- <span t-att-title="widget.extra_partners_str">and <t t-raw="widget.extra_partners_nbr"/> more</span>
+ <span t-att-title="widget.extra_partners_str">and <t t-esc="widget.extra_partners_nbr"/> more</span>
</t>
<t t-if="widget.type == 'notification' and widget.partner_ids.length > 0">
notified
</t>
<span class='oe_subtle'>•</span>
<span t-att-title="widget.date">
- <t t-if="widget.timerelative" t-raw="widget.timerelative"/>
+ <t t-if="widget.timerelative" t-esc="widget.timerelative"/>
<t t-if="!widget.timerelative" t-raw="widget.display_date"/>
</span>
<span t-if="!widget.options.readonly" class='oe_subtle'>•</span>
<div class='oe_separator'></div>
<a t-if="widget.nb_messages <= 0" class="oe_msg_fetch_more">show more message</a>
<a t-if="widget.nb_messages === 1" class="oe_msg_fetch_more">show one more message</a>
- <a t-if="widget.nb_messages > 1" class="oe_msg_fetch_more">show <t t-raw="widget.nb_messages" /> more messages</a>
+ <a t-if="widget.nb_messages > 1" class="oe_msg_fetch_more">show <t t-esc="widget.nb_messages" /> more messages</a>
</div>
</div>
</t>
- <!--
- mail.compose_message.button_top_bar
- render of the button on the user bar for open wizard compose message
- -->
- <t t-name="mail.ComposeMessageTopButton">
- <div title='Compose new Message' class="oe_topbar_item oe_topbar_compose_full_email">
- <button class="oe_e">%</button>
- </div>
- </t>
-
<!-- mail.thread.message.vote
Template used to display Like/Unlike in a mail.message
-->
<span t-name="mail.thread.message.vote">
<span class="oe_mail_vote_count" t-if='widget.vote_nb > 0'>
- <t t-raw='widget.vote_nb' />
- <span class='oe_e'>8</span>
+ <t t-esc='widget.vote_nb' />
+ <i class="fa fa-thumbs-o-up"></i>
</span>
<a href='#' class="oe_msg_vote">
<t t-if="!widget.has_voted">like</t>