odoo/addons/mail/static/src/xml/mail.xml

221 lines
10 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<template>
<!--
wall main template
Template used to display the communication history in the wall.
-->
<div t-name="mail.wall" class="oe_view_manager oe_mail_wall oe_view_manager_current">
<table class="oe_view_manager_header">
<colgroup>
<col width="33%"/>
<col width="33%"/>
<col width="34%"/>
</colgroup>
<tbody>
<tr class="oe_header_row oe_header_row_top">
<td colspan="2">
<h2 class="oe_view_title">
<span class="oe_view_title_text">
News Feed
<t t-if="widget.options.res_model"> / </t>
<t t-if="widget.options.res_model" t-esc="widget.options.res_model"/>
</span>
</h2>
</td>
<td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
</tr>
</tbody>
</table>
<ul class="oe_mail_wall_threads">
<!-- contains threads -->
</ul>
<div class="oe_mail_wall_aside">
<!-- contains currently nothing -->
</div>
</div>
<!--
wall_thread_container template for the wall
Each discussion thread is contained inside this template
-->
<li t-name="mail.wall_thread_container" class="oe_mail_wall_thread">
</li>
<!--
record_thread main template
Template used to display the communication history in documents
form view.
-->
<div t-name="mail.record_thread" class="oe_mail_record_wall">
<!-- <h4>History and Comments</h4> -->
<ul class="oe_mail_wall_threads">
<!-- contains the document thread -->
</ul>
</div>
<!--
mail.compose_message template
This template holds the composition form to write a note or send
an e-mail. It contains by default a textarea, that will be replaced
by another composition form in the main wall composition form, or
for main thread composition form in document form view.
-->
<t t-name="mail.compose_message">
<div>
<img class="oe_mail_icon oe_mail_frame oe_left" alt="User img"/>
<div class="oe_mail_msg_content">
<!-- contains the composition form -->
<!-- default content: old basic textarea -->
<textarea class="oe_mail_compose_textarea" placeholder="Add your comment here..."/>
</div>
<div class="oe_clear"/>
</div>
</t>
<!--
mail.compose_message.add_attachment template
Small template to be inserted in the composition form to add attachments
-->
<t t-name="mail.compose_message.add_attachment">
<t t-call="HiddenInputFile">
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
<t t-set="fileupload_action">/web/binary/upload_attachment</t>
<input type="hidden" name="model" t-att-value="widget.form_view.model"/>
<input type="hidden" name="id" t-att-value="widget.form_view.datarecord.id || 0"/>
<input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
</t>
</t>
<!--
thread template
This template holds a thread of comments. It begins with an actions
container, holding the composition form. Then come the various
messages. Then comes the 'more' button.
-->
<div t-name="mail.thread" class="oe_mail oe_mail_thread oe_semantic_html_override">
<div class="oe_mail_thread_action">
<!-- contains the composition box (form + image) -->
<t t-call="mail.compose_message"/>
</div>
<ul class="oe_mail_thread_display">
<!-- contains the threads -->
</ul>
<div class="oe_mail_thread_more">
<button class="oe_mail_button_more" type="button">Load more messages</button>
</div>
</div>
<!-- default layout -->
<li t-name="mail.thread.message" t-attf-class="oe_mail oe_mail_thread_msg #{record.unread?'oe_mail_unread':'oe_mail_read'}" t-attf-data-msg_model="{record.model}" t-attf-data-msg_id="{record.id}" t-attf-data-msg_timestamp="{record.timestamp}">
<div t-attf-class="oe_mail_msg_#{record.type} oe_semantic_html_override">
<!-- message actions (read/unread, reply, delete...) -->
<ul class="oe_header">
<li t-if="options.thread_level>0"><a class="oe_read oe_e">W<!-- Read/Unread --></a></li>
<li t-if="options.show_reply"><a class="oe_mail_msg_reply oe_e">)</a></li>
<li t-if="options.show_reply_by_email"><a class="oe_mail_msg_reply_by_email oe_e">)</a></li>
<li>
<span class="oe_dropdown_toggle">
<a class="oe_e">é</a>
<ul class="oe_dropdown_menu">
<li t-if="record.is_author and options.show_dd_delete"><a class="oe_mail_msg_delete">Delete</a></li>
<!-- Uncomment when adding subtype hiding
<li t-if="display['show_hide']">
<a href="#" class="oe_mail_msg_hide_type" t-attf-data-subtype='{record.subtype}'>Hide '<t t-esc="record.subtype"/>' for this document</a>
</li> -->
<li t-if="options.show_dd_reply_by_email"><a class="oe_mail_msg_reply_by_email">Quote and reply</a></li>
<li t-if="record.type == 'email'"><a class="oe_mail_msg_details" t-attf-href="#model=mail.message&amp;id=#{record.id}" >Details</a></li>
</ul>
</span>
</li>
</ul>
<img class="oe_mail_icon oe_mail_frame oe_left" t-att-src="record.avatar"/>
<div class="oe_mail_msg_content">
<!-- dropdown menu with message options and actions -->
<span class="placeholder-mail-thread-message-vote"/>
<!-- message itself -->
<div class="oe_mail_msg">
<h1 t-if="record.subject" class="oe_mail_msg_title">
<t t-raw="record.subject"/>
</h1>
<div class="oe_mail_msg_body">
<t t-if="options.show_record_name and record.record_name and (!record.subject) and (options.thread_level > 0)">
<a t-attf-href="#model=#{record.model}&amp;id=#{record.res_id}"><t t-raw="record.record_name"/></a>
</t>
<t t-raw="record.body"/>
</div>
<div class="oe_clear"/>
<ul class="oe_mail_msg_footer">
<li t-if="options.show_record_name and record.record_name and record.subject and options.thread_level > 0">
<a t-attf-href="#model=#{record.model}&amp;id=#{record.res_id}"><t t-raw="record.record_name"/></a>
</li>
<li t-if="record.author_id"><a t-attf-href="#model=res.partner&amp;id=#{record.author_id[0]}"><t t-raw="record.author_id[1]"/></a></li>
<li><span t-att-title="record.date"><t t-raw="record.timerelative"/></span></li>
<t t-call="mail.thread.message.vote"/>
<li t-if="record.attachment_ids.length > 0">
<a class="oe_mail_msg_view_attachments">
<t t-if="record.attachment_ids.length == 1">1 Attachment</t>
<t t-if="record.attachment_ids.length > 1"><t t-raw="record.attachment_ids.length"/> Attachments</t>
</a>
</li>
</ul>
<t t-if="record.attachment_ids.length > 0">
<div class="oe_clear"></div>
<t t-call="mail.thread.message.attachments"/>
</t>
</div>
</div>
</div>
</li>
<!-- expandable message layout -->
<li t-name="mail.thread.message.expandable" class="oe_mail oe_mail_thread_msg" t-attf-data-msg_id="{record.id}">
<div t-attf-class="oe_mail_msg_expandable oe_semantic_html_override">
<div class="oe_mail_msg_content">
<!-- message itself -->
<div class="oe_mail_msg">
<div class="oe_mail_msg_body">
<a class="oe_mail_fetch_more">Load more messages ...</a>
</div>
<div class="oe_clear"/>
</div>
</div>
</div>
</li>
<!--
mail.thread.message.attachments template
Template used to display attachments in a mail.message
-->
<t t-name="mail.thread.message.attachments">
<ul class="oe_mail_msg_attachments">
<t t-foreach="record.attachment_ids" t-as="attachment">
<li>
<a t-att-href="attachment.url"><t t-raw="attachment.name || attachment.filename"/></a>
<t t-if="record.show_attachment_delete">
<a class="oe_right oe_mail_attachment_delete" title="Delete this attachmentt" t-attf-data-id="{attachment.id}">x</a>
</t>
</li>
</t>
</ul>
</t>
<!-- mail.thread.message.vote
Template used to display Like/Unlike in a mail.message
-->
<li t-name="mail.thread.message.vote">
<t t-if='record.vote_user_ids.length > 0'>
<span class="oe_left oe_mail_vote_count"><t t-esc="record.vote_user_ids.length"/> people agree</span>
</t>
<button t-attf-class="oe_mail_msg_vote oe_tag" t-attf-data-msg_id="{record.id}">
<t t-if="! record.has_voted"><span>Agree</span></t>
<t t-if="record.has_voted"><span>Unagree</span></t>
</button>
</li>
</template>