summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/src/xml')
-rw-r--r--addons/mail/static/src/xml/mail.xml38
-rw-r--r--addons/mail/static/src/xml/mail_followers.xml1
-rw-r--r--addons/mail/static/src/xml/suggestions.xml38
3 files changed, 66 insertions, 11 deletions
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index f5004941a8d..1be9754e1c7 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -121,9 +121,11 @@
To:
<t t-if="!widget.is_private">
<span class="oe_all_follower">
- Followers of
- <t t-if="widget.parent_thread.parent_message.record_name" t-raw="'&quot;' + widget.parent_thread.parent_message.record_name + '&quot;'"/>
- <t t-if="!widget.parent_thread.parent_message.record_name">this document</t>
+ <t t-if="widget.parent_thread.parent_message.record_name" t-raw="'&quot;' + widget.parent_thread.parent_message.record_name + '&quot;'">
+ Followers of <t t-raw="'&quot;' + widget.parent_thread.parent_message.record_name + '&quot;'"/>
+ </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>
@@ -197,9 +199,17 @@
</tbody>
</table>
<div class="oe_mail-placeholder"></div>
+ <aside class="oe_mail_wall_aside"></aside>
</div>
<!--
+ Empty template that holds the sidebar of the Wall
+ -->
+ <t t-name="mail.wall.sidebar">
+ <div class="oe_mail_wall_sidebar"></div>
+ </t>
+
+ <!--
display message on the wall when there are no message
-->
<t t-name="mail.wall_no_message">
@@ -256,7 +266,13 @@
<t t-if="widget.subject" t-raw="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">
@@ -271,16 +287,16 @@
<span class='oe_subtle'>•</span>
</t>
</t>
- <t t-if="widget.type == 'comment' and ! widget.subtype">
+ <t t-if="widget.type == 'comment' and ! widget.subtype and widget.partner_ids.length == 0">
logged a note
</t>
- <t t-if="(widget.type == 'comment' or widget.type == 'email') and widget.subtype">
+ <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
</t>
</t>
- <t t-if="widget.type == 'notification' or ( (widget.type == 'email' or widget.type == 'comment') and widget.subtype)"
+ <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&amp;id=#{partner[0]}"><t t-raw="partner[1]"/></a>
@@ -295,7 +311,10 @@
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-raw="widget.date"/></span>
+ <span t-att-title="widget.date">
+ <t t-if="widget.timerelative" t-raw="widget.timerelative"/>
+ <t t-if="!widget.timerelative" t-raw="widget.display_date"/>
+ </span>
<span t-if="!widget.options.readonly" class='oe_subtle'>•</span>
<t t-if="!widget.options.readonly" t-call="mail.thread.message.vote"/>
</div>
@@ -339,7 +358,4 @@
</a>
</span>
- <!-- mail.thread.message.star
- Template used to display stared/unstared message in a mail.message
- -->
</template>
diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml
index 5ad3ff09bb3..a936b8237d6 100644
--- a/addons/mail/static/src/xml/mail_followers.xml
+++ b/addons/mail/static/src/xml/mail_followers.xml
@@ -31,6 +31,7 @@
<div t-name="mail.followers.partner" class='oe_partner'>
<img class="oe_mail_thumbnail oe_mail_frame" t-attf-src="{record.avatar_url}"/>
<a t-attf-href="#model=res.partner&amp;id=#{record.id}" t-att-title="record.name"><t t-esc="record.name"/></a>
+ <span t-if="record.is_editable and (widget.records_length &gt; 1)" class="oe_edit_subtype oe_e oe_hidden" title="Edit subscription" t-att-data-id="record.id">&amp;</span>
<span t-if="widget.view_is_editable" class="oe_remove_follower oe_e" title="Remove this follower" t-att-data-id="record.id">X</span>
</div>
diff --git a/addons/mail/static/src/xml/suggestions.xml b/addons/mail/static/src/xml/suggestions.xml
new file mode 100644
index 00000000000..9157dcbe32e
--- /dev/null
+++ b/addons/mail/static/src/xml/suggestions.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template>
+
+ <!-- Groups placeholder in sidebar -->
+ <t t-extend="mail.wall.sidebar">
+ <t t-jquery=".oe_mail_wall_sidebar" t-operation="append">
+ <div class="oe_suggestions_groups"></div>
+ </t>
+ </t>
+
+
+ <!-- Suggested groups -->
+ <div t-name="mail.suggestions.groups" class="oe_sidebar_suggestion oe_suggestion_group">
+ <div class="oe_suggest_title">
+ <a class="oe_suggestion_remove oe_suggestion_group oe_e">X</a>
+ <h2>Suggested Groups</h2>
+ </div>
+ <div class="oe_suggest_items">
+ <t t-foreach="widget.groups" t-as="result">
+ <div class="oe_suggested_item">
+ <div class="oe_suggested_item_image">
+ <a t-attf-href="#model=mail.group&amp;id=#{result.id}">
+ <img t-attf-src="{result.image}" t-attf-alt="{result.name}"/>
+ </a>
+ </div>
+ <div class="oe_suggested_item_content">
+ <a class="oe_suggestion_item_name" t-attf-href="#model=mail.group&amp;id=#{result.id}"><t t-esc="result.name"/></a>
+ <a class="oe_suggestion_remove_item oe_suggestion_group oe_e" t-attf-id="{result.id}">X</a>
+ <br/>
+ <button t-att-id="result.id" class="oe_suggestion_join">Join Group</button>
+ </div>
+ </div>
+ </t>
+ </div>
+ </div>
+
+
+</template>