summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml
diff options
context:
space:
mode:
authorVidhin Mehta (OpenERP) <vme@tinyerp.com>2012-10-15 17:03:32 +0530
committerVidhin Mehta (OpenERP) <vme@tinyerp.com>2012-10-15 17:03:32 +0530
commit287b9d09eb740f6adfafdbbc65265f2aecf515ba (patch)
treed0d686830d71c964f03bc69f85c3ef26dec6f006 /addons/mail/static/src/xml
parent3eb5cfb61b6bbb84043f4fa6b3fdefb0fbb320c7 (diff)
parent7f23ad5de563eacfcae958d0011637800b097d4a (diff)
[MERGE]trunk.
bzr revid: vme@tinyerp.com-20121015113332-i8g3d8na27j08h3l
Diffstat (limited to 'addons/mail/static/src/xml')
-rw-r--r--addons/mail/static/src/xml/mail.xml201
-rw-r--r--addons/mail/static/src/xml/mail_followers.xml6
2 files changed, 134 insertions, 73 deletions
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index 07c9b406cdc..7941925415d 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -1,11 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<template>
+ <!--
+ 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 class="oe_mail_compose_textarea">
+ <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 -->
+ <div class="oe_mail_post_header">
+ <t t-call="mail.thread.list_recipients"/>
+ <a class="oe_cancel oe_e">X</a>
+ </div>
+ <textarea class="field_text" placeholder="Add your comment here..."/>
+ <div class="oe_mail_post_footer">
+ <div class="oe_mail_compose_attachment_list"/>
+ <button class="oe_full">Full mail message</button>
+ <button class="oe_post">Post message</button>
+ <t t-call="mail.compose_message.add_attachment"/>
+ </div>
+ </div>
+ <div class="oe_clear"/>
+ </div>
+ </t>
+
+ <!--
+ mail.compose_message.add_attachment template
+ Small template to be inserted in the composition for add attachments
+ -->
+ <t t-name="mail.compose_message.add_attachment">
+ <div class="oe_attachment_file">
+ <div class="oe_add">
+ <!-- uploader of file -->
+ <button><span class="oe_e">p</span></button>
+ <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" value=""/>
+ <input type="hidden" name="id" value="0"/>
+ <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
+ </t>
+ </div>
+ </div>
+ </t>
+
+ <!--
+ mail.thread.message.attachments template
+ Template used to display attachments in a mail.message
+ -->
+ <t t-name="mail.thread.message.attachments">
+ <ul t-attf-class="oe_mail_msg_attachments #{widget.attachment_ids[0] and widget.options.thread.show_attachment_link?'':'oe_hidden'}">
+ <t t-foreach="widget.attachment_ids" t-as="attachment">
+ <li>
+ <span t-if="(attachment.upload or 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-attf-style="{attachment.percent_loaded&gt;0?'':'display:none;'}"/>
+ <div t-attf-style="{attachment.percent_loaded&gt;20?'':'display:none;'}"/>
+ <div t-attf-style="{attachment.percent_loaded&gt;40?'':'display:none;'}"/>
+ <div t-attf-style="{attachment.percent_loaded&gt;60?'':'display:none;'}"/>
+ <div t-attf-style="{attachment.percent_loaded&gt;80?'':'display:none;'}"/>
+ </div>
+ <t t-raw="attachment.name || attachment.filename"/>
+ </span>
+ <a t-if="(!attachment.upload or attachment.percent_loaded&gt;=100)" 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-if="widget.options.thread.show_attachment_delete and (!attachment.upload or attachment.percent_loaded&gt;=100)">
+ <a class="oe_right oe_mail_attachment_delete" title="Delete this attachment" t-attf-data-id="{attachment.id}">x</a>
+ </t>
+
+ </li>
+ </t>
+ </ul>
+ </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>
+
+ <!--
+ template to the recipients list
+ -->
+ <t t-name="mail.thread.list_recipients">
+ <div class="oe_mail_list_recipients">
+ Post to:
+ <span t-if="!widget.is_private" class="oe_all_follower">All Followers</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"/>
+ </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>
+ <a class="oe_more_hidden">&lt;&lt;&lt;</a>
+ </t>
+ </div>
+ </t>
+
<!--
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">
+ <div t-name="mail.wall" class="oe_view_manager oe_mail_wall oe_view_manag
+ er_current">
<table class="oe_view_manager_header">
<colgroup>
<col width="33%"/>
@@ -25,21 +132,30 @@
</td>
<td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
</tr>
+ <tr class="oe_header_row">
+ <td colspan="2">
+ <button type="button" class="oe_write_full oe_highlight">
+ Compose a new message
+ </button>
+ <button type="button" class="oe_write_onwall" help="Your followers can read this message">
+ Write to your followers
+ </button>
+ </td>
+ </tr>
</tbody>
</table>
- <ul class="oe_mail_wall_threads">
- <!-- contains threads -->
- </ul>
+ <!-- placeholder for the wall threads -->
+ <div class="oe_mail_wall_threads"/>
<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
+ display message on the wall when there are no message
-->
- <li t-name="mail.wall_thread_container" class="oe_mail_wall_thread">
+ <li t-name="mail.wall_no_message" class="oe_wall_no_message">
+ You have no messages
</li>
<!--
@@ -55,39 +171,6 @@
</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 class="oe_mail_compose_textarea">
- <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 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
@@ -96,7 +179,6 @@
<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 -->
@@ -104,16 +186,15 @@
</div>
<!-- default layout -->
- <li t-name="mail.thread.message" t-attf-class="oe_mail oe_mail_thread_msg #{widget.unread?'oe_mail_unread':'oe_mail_read'}" t-attf-data-msg_id="{widget.id}">
+ <li t-name="mail.thread.message" t-attf-class="oe_mail oe_mail_thread_msg #{widget.unread?'oe_mail_unread':'oe_mail_read'}">
<div t-attf-class="oe_mail_msg_#{widget.type} oe_semantic_html_override">
<!-- message actions (read/unread, reply, delete...) -->
<ul class="oe_header">
<li class="placeholder-mail-vote"><t t-call="mail.thread.message.vote"/></li>
- <li t-if="!widget.options.thread.display_on_flat and widget.unread" title="Read"><a class="oe_read oe_e">W</a></li>
- <li t-if="!widget.options.thread.display_on_flat and !widget.unread" title="Set back to unread"><a class="oe_unread oe_e">h</a></li>
- <li t-if="!widget.options.message.show_reply_by_email" title="Reply"><a class="oe_reply oe_e">)</a></li>
- <li t-if="widget.options.message.show_reply_by_email"><a class="oe_reply_by_email oe_e" title="Reply by mail">)</a></li>
- <t t-if="(widget.options.message.show_reply || widget.options.message.show_reply_by_email || (widget.is_author and widget.options.message.show_dd_delete) || widget.type == 'email')">
+ <li t-if="!widget.options.thread.display_on_flat" title="Read" class="oe_read"><a class="oe_read oe_e">W</a></li>
+ <li t-if="!widget.options.thread.display_on_flat" title="Set back to unread" class="oe_unread"><a class="oe_unread oe_e">h</a></li>
+ <li title="Quick reply"><a class="oe_reply oe_e">)</a></li>
+ <t t-if="(widget.is_author and widget.options.message.show_dd_delete) or widget.type == 'email'">
<li>
<span class="oe_dropdown_toggle">
<a class="oe_e" title="More options">í</a>
@@ -123,8 +204,6 @@
<li t-if="display['show_hide']">
<a href="#" class="oe_mail_msg_hide_type" t-attf-data-subtype='{widget.subtype}'>Hide '<t t-esc="widget.subtype"/>' for this document</a>
</li> -->
- <li t-if="widget.options.message.show_reply" title="Reply"><a class="oe_reply oe_full_reply">Full reply</a></li>
- <li t-if="widget.options.message.show_reply_by_email"><a class="oe_reply_by_email oe_full_reply" title="Reply by mail">Full reply</a></li>
<li t-if="widget.type == 'email'"><a class="oe_mail_msg_details" t-attf-href="#model=mail.message&amp;id=#{widget.id}" >Details</a></li>
</ul>
</span>
@@ -145,7 +224,6 @@
<ul class="oe_mail_msg_footer">
<li t-if="widget.author_id"><a t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a></li>
<li><span t-att-title="widget.date"><t t-raw="widget.timerelative"/></span></li>
-
<li t-if="widget.attachment_ids.length > 0">
<a class="oe_mail_msg_view_attachments">
<t t-if="widget.attachment_ids.length == 1">1 Attachment</t>
@@ -155,7 +233,7 @@
</ul>
<div class="oe_clear"/>
<div class="oe_mail_msg_body">
- <t t-if="widget.options.message.show_record_name and widget.record_name and (!widget.subject) and widget.options.thread._parents.length&lt;=widget.options.thread.thread_level and widget.model!='res.partner'">
+ <t t-if="widget.options.message.show_record_name and widget.record_name and (!widget.subject) and !widget.options.thread.thread_level and !widget.options.thread.display_on_flat and widget.model!='res.partner'">
<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"/>
@@ -171,7 +249,7 @@
</li>
<!-- expandable message layout -->
- <li t-name="mail.thread.expandable" t-attf-class="oe_mail oe_mail_thread_msg oe_mail_unread" t-attf-data-thread_id="{widget.id}">
+ <li t-name="mail.thread.expandable" class="oe_mail oe_mail_thread_msg oe_mail_unread">
<div t-attf-class="oe_mail_msg_#{widget.type} oe_semantic_html_override">
<div class="oe_mail_msg_content oe_mail_msg_more_message">
<a class="oe_mail_fetch_more">Load more messages <span t-if="widget.nb_messages>0">(<t t-raw="widget.nb_messages"/> messages not display)</span>...</a>
@@ -179,23 +257,6 @@
</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
-->
@@ -215,7 +276,7 @@
<button t-attf-class="oe_mail_msg_vote oe_tag">
<span>
<t t-if="!widget.has_voted">Agree</t>
- <t t-if="widget.has_voted">Unagree</t>
+ <t t-if="widget.has_voted">Undo</t>
</span>
</button>
</span>
diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml
index a6df1f0fe8c..f78c91c6305 100644
--- a/addons/mail/static/src/xml/mail_followers.xml
+++ b/addons/mail/static/src/xml/mail_followers.xml
@@ -13,9 +13,9 @@
<span class="oe_unfollow">Unfollow</span>
<span class="oe_following">Following</span>
</button>
- <div class="oe_recthread_subtypes">
- <ul class="oe_subtypes"></ul>
- </div>
+ </div>
+ <div class="oe_recthread_subtypes">
+ <ul class="oe_subtypes"></ul>
</div>
</div>
<div class="oe_grey">