summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml/mail.xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/src/xml/mail.xml')
-rw-r--r--addons/mail/static/src/xml/mail.xml109
1 files changed, 50 insertions, 59 deletions
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index bfd0e4cd10f..89fbe45dc36 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<template>
- <!-- this template contains the mail widget and is used to namespace the css -->
- <t t-name="mail.Widget">
+ <!--
+ mail.Widget template used to namespace the css -->
+ <t t-name="mail.Root">
<div class="oe_mail">
</div>
</t>
@@ -38,7 +39,8 @@
</div>
</div>
<div t-if="widget.show_compact_message and !widget.show_composer" t-attf-class="oe_msg oe_msg_composer_compact #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''}">
- <textarea class="field_text oe_compact" placeholder="Write a reply..."/>
+ <textarea t-if="!widget.options.view_mailbox" class="field_text oe_compact" placeholder="Write to the followers of this docmuent..."/>
+ <textarea t-if="widget.options.view_mailbox" class="field_text oe_compact" placeholder="Write to my followers..."/>
</div>
<span t-if="!(widget.show_compact_message and !widget.show_composer) and !widget.show_composer" class="oe_placeholder_compose"></span>
</t>
@@ -69,41 +71,28 @@
Template used to display attachments in a mail.message
-->
<t t-name="mail.thread.message.attachments">
- <span class="oe_msg_attachments">
- <t t-foreach="widget.attachment_ids" t-as="attachment" t-if="!attachment.is_image">
- <div class="oe_attachment">
- <span t-if="(attachment.upload and attachment.percent_loaded&lt;100)" t-attf-title="{(attachment.name || attachment.filename) + (attachment.date?' \n('+attachment.date+')':'' )}" t-attf-name="{attachment.name || attachment.filename}">
- <div class="oe_upload_in_process">
- <span>...Upload in progress...</span>
- </div>
- <t t-raw="attachment.name || attachment.filename"/>
- </span>
- <t t-if="(!attachment.upload or attachment.percent_loaded&gt;=100)">
- <a t-att-href="attachment.url" t-attf-title="{(attachment.name || attachment.filename) + (attachment.date?' \n('+attachment.date+')':'' )}">
- <t t-raw="attachment.name || attachment.filename"/>
- </a>
- </t>
- <t t-if="(widget.show_delete_attachment and (!attachment.upload or attachment.percent_loaded&gt;=100))">
- <a class="oe_right oe_mail_attachment_delete oe_e" title="Delete this attachment" t-attf-data-id="{attachment.id}">[</a>
- </t>
+ <t t-foreach='widget.attachment_ids' t-as='attachment'>
+ <t t-if="attachment.filetype !== 'webimage'">
+ <div t-attf-class="oe_attachment #{attachment.upload ? 'oe_uploading' : ''}">
+ <a t-att-href='attachment.url'><img t-att-src="'/mail/static/src/img/mimetypes/' + attachment.filetype + '.png'"></img></a>
+ <div class='oe_delete oe_e' title="Delete this attachment" t-attf-data-id="{attachment.id}">[</div>
+ <div class='oe_name'><t t-raw='attachment.name' /></div>
+ <div class='oe_progress_bar'>
+ uploading
+ </div>
</div>
</t>
- </span>
- <span class="oe_msg_images">
- <t t-foreach="widget.attachment_ids" t-as="attachment" t-if="attachment.is_image">
- <a t-att-href="attachment.url" t-attf-title="{(attachment.name || attachment.filename) + (attachment.date?' \n('+attachment.date+')':'' )}">
- <img t-if="attachment.is_image" t-attf-title="{(attachment.name || attachment.filename) + (attachment.date?' \n('+attachment.date+')':'' )}" t-att-src="attachment.url"/>
- </a>
+ <t t-if="attachment.filetype === 'webimage'">
+ <div t-attf-class="oe_attachment oe_preview #{attachment.upload ? 'oe_uploading' : ''}">
+ <a t-att-href='attachment.url'><img t-att-src="widget.attachments_resize_image(attachment.id, [100,100])"></img></a>
+ <div class='oe_delete oe_e'>[</div>
+ <div class='oe_name'><t t-raw='attachment.name' /></div>
+ <div class='oe_progress_bar'>
+ uploading
+ </div>
+ </div>
</t>
- </span>
- </t>
-
- <t t-name="mail.thread.message.private">
- <div>
- <span class="oe_placeholder_checkbox_private"/>
- <span class="oe_send_private">This email is private.</span>
- <span class="oe_send_public">I wrote for contacts and all my followers.</span>
- </div>
+ </t>
</t>
<!--
@@ -112,7 +101,7 @@
<t t-name="mail.thread.list_recipients">
<div class="oe_mail_list_recipients">
To:
- <span t-if="!widget.is_private" class="oe_all_follower">Everyone</span>
+ <span t-if="!widget.is_private" class="oe_all_follower">Followers <t t-raw="' of ' + (widget.parent_thread.parent_message.record_name ? '&quot;' + widget.parent_thread.parent_message.record_name + '&quot;' : 'this document')"/></span>
<t t-if="!widget.is_private and widget.partner_ids.length"> and </t>
<t t-set="inc" t-value="0"/>
<t t-if="widget.partner_ids.length" 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-attf-href="#model=res.partner&amp;id=#{partner[0]}"><t t-raw="partner[1]"/></a></span><t t-set="inc" t-value="inc+1"/>
@@ -140,22 +129,20 @@
<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"/>
+ Email box
</span>
</h2>
</td>
<td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
</tr>
- <tr class="oe_header_row">
+ <tr class="oe_header_row" t-if="widget.action.params.view_inbox" >
<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 your followers</a>
+ <a href='#' class='oe_write_onwall oe_bold' help='Your followers can read this message'>Write to my followers</a>
</span>
</td>
</tr>
@@ -168,7 +155,7 @@
display message on the wall when there are no message
-->
<t t-name="mail.wall_no_message">
- <div class="oe_wall_no_message">You have no messages</div>
+ <div class="oe_view_nocontent">No messages.</div>
</t>
<!--
@@ -187,7 +174,7 @@
<!-- default layout -->
<t t-name="mail.thread.message">
- <div t-attf-class="oe_msg #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''} oe_msg_#{widget.type} oe_msg_#{widget.to_read?'unread':'read'}">
+ <div t-attf-class="oe_msg #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''} oe_msg_#{widget.type}">
<div class='oe_msg_left'>
<a t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}" t-att-title="widget.author_id[1]">
@@ -197,10 +184,11 @@
<div class="oe_msg_center">
<div class='oe_msg_icons'>
- <span class='oe_read' t-if="widget.show_read_unread_button"><a title="Mark as read" class="oe_e">X</a></span>
- <span class='oe_unread' t-if="widget.show_read_unread_button"><a title="Mark as unread" class="oe_e">v</a></span>
- <span class='oe_reply' t-if="widget.show_reply_button"><a title="Reply" class="oe_e">(</a></span>
- <span t-attf-class="oe_star #{widget.is_favorite?'oe_starred':''}"><a title="Add To Favorites" class="oe_e">7</a></span>
+ <span class='oe_read' t-if="widget.options.show_read"><a title="Done" class="oe_e">X</a></span>
+ <span class='oe_unread' t-if="widget.is_favorite and widget.options.show_unread"><a title="Set back to Todo" class="oe_e">v</a></span>
+ <span class='oe_unread' t-if="!widget.is_favorite and widget.options.show_unread"><a title="Set back to Inbox" class="oe_e">v</a></span>
+ <span class='oe_reply' t-if="widget.options.show_reply_button"><a title="Reply" class="oe_e">(</a></span>
+ <span t-attf-class="oe_star #{widget.is_favorite?'oe_starred':''}"><a title="Mark as Todo" class="oe_e">7</a></span>
</div>
<!-- message itself -->
<div class="oe_msg_content">
@@ -208,23 +196,26 @@
<t t-raw="widget.subject"/>
</h1>
<div class="oe_msg_body">
- <t t-if="widget.options.show_record_name and widget.record_name and (!widget.subject) and !widget.options.thread_level and !widget.options.display_on_thread[0] and widget.model!='res.partner'">
+ <t t-if="widget.show_record_name">
<a class="oe_mail_action_model" t-attf-href="#model=#{widget.model}&amp;id=#{widget.res_id}"><t t-raw="widget.record_name"/></a>
</t>
<t t-raw="widget.body"/>
</div>
- <t t-if="widget.attachment_ids.length > 0">
- <t t-call="mail.thread.message.attachments"/>
- </t>
</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" t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a>
<span class='oe_subtle'>•</span>
<span t-att-title="widget.date"><t t-raw="widget.timerelative"/></span>
- <a t-if="widget.attachment_ids.length > 0" class="oe_mail_msg_view_attachments">
+ <t t-if='widget.attachment_ids.length > 0'>
+ <span class='oe_subtle'>•</span>
+ <a class="oe_view_attachments">
<t t-if="widget.attachment_ids.length == 1">1 Attachment</t>
<t t-if="widget.attachment_ids.length > 1"><t t-raw="widget.attachment_ids.length"/> Attachments</t>
</a>
+ </t>
<span class='oe_subtle'>•</span>
<t t-call="mail.thread.message.vote"/>
</div>
@@ -234,11 +225,12 @@
<!-- expandable message layout -->
<t t-name="mail.thread.expandable">
- <div t-attf-class="oe_msg oe_msg_#{widget.type} #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''} oe_msg_unread">
+ <div t-attf-class="oe_msg oe_msg_#{widget.type} #{widget.max_limit ? 'oe_max_limit' : ''} #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''}">
<div class="oe_msg_content oe_msg_more_message">
<div class='oe_separator'></div>
+ <a t-if="widget.nb_messages &lt;= 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 &gt; 1" class="oe_msg_fetch_more">show <t t-raw="widget.nb_messages" /> more messages</a>
</div>
</div>
</t>
@@ -247,9 +239,9 @@
mail.compose_message.button_top_bar
render of the button on the user bar for open wizard compose message
-->
- <t t-name="mail.compose_message.button_top_bar">
- <div class="oe_topbar_compose_full_email">
- <!-- <button class="oe_button oe_highlight">Write an email</button> -->
+ <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>
@@ -257,12 +249,11 @@
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>
</span>
- <a href='#' t-attf-class="oe_msg_vote">
+ <a href='#' class="oe_msg_vote">
<t t-if="!widget.has_voted">like</t>
<t t-if="widget.has_voted">unlike</t>
</a>