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

183 lines
8.3 KiB
XML

<?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">
<!-- <h4>History and Comments</h4> -->
<div class="oe_mail_recthread_main">
<!-- contains the document thread -->
</div>
</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..." onfocus="this.value = '';"/>
</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.
-->
<ul 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>
<div class="oe_mail_thread_display">
<!-- contains the threads -->
</div>
<div class="oe_mail_thread_more">
<button class="oe_mail_button_more" type="button">Load more messages</button>
</div>
</ul>
<!-- default layout -->
<li t-name="mail.thread.message" class="oe_mail oe_mail_thread_msg">
<div t-attf-class="oe_mail_msg_#{record.type} oe_semantic_html_override">
<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="oe_dropdown_toggle oe_dropdown_arrow">
<ul class="oe_dropdown_menu">
<t t-if="record.is_author">
<li t-if="display['show_delete']"><a class="oe_mail_msg_delete" t-attf-data-id='{record.id}'>Delete</a></li>
</t>
<li t-if="display['show_hide']"><a class="oe_mail_msg_hide" t-attf-data-id='{record.id}'>Remove notification</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><a t-attf-data-msg_id="{record.id}" class="oe_mail_msg_reply_by_email">Quote and reply</a></li>
<li t-if="record.type == 'email'"><a t-attf-href="#model=mail.message&amp;id=#{record.id}" class="oe_mail_msg_details">Details</a></li>
</ul>
</span>
<!-- 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="display.show_record_name">
<a t-attf-href="#model=#{record.model}&amp;id=#{record.res_id}" t-if="(params.thread_level > 0) &amp; (!record.subject)"><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="record.subject &amp; params.thread_level > 0"><a t-attf-href="#model=#{record.model}&amp;id=#{record.res_id}"><t t-raw="record.record_name"/></a></li>
<li><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>
<li t-if="display['show_reply']"><a class="oe_mail_msg_reply">Reply</a></li>
<!-- uncomment when merging vote
<li><a href="#">Like</a></li>
-->
<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>
<!--
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>
</template>