summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-06-12 14:12:58 +0200
committerThibault Delavallée <tde@openerp.com>2013-06-12 14:12:58 +0200
commit43d08b898fc3a5c5d5eaec140e7acd3b7e7faf43 (patch)
tree63506a148af90b389f29b0de689b01eff5bbeb74 /addons/mail/static/src/xml
parent70f16ce73b0dab305b9e7d63a74416cbcb0448da (diff)
parent99dd06cfd0f87e0bdd6be402f85328f1006667aa (diff)
[MERGE] [IMP] 'Social Aspects' Task
Purpose: - mail is now focused on messaging; partner document is now a classic document, without specific behavior; removed the concept of 'my followers' from mail; - hr adds social features to mail: employee profile is used to display internal messages; employees can follow other employees, comment and react on their profile messages; - display suggestion of Groups and Employees to follow in the Inbox, using a new widget. The purpose is to promote social interactions between employees and to improve the visibility of groups; mail: - add suggestions.Group widget that allows to display a list of suggested groups to follow; this widget is displayed in the Inbox; - display 'Partner profile of' or 'News from' when reading messages from a partner profile / employee profile in the Inbox; - 'Compose a new message or Write to my followers' is not present anymore when hr is not installed, because this social aspect comes with HR; - mail_thread: add a search function on message_is_follower; - mail_group: implement suggested groups behavior; - res_partner: removed specific code changing message_post with type='email' to a private discussion between author and destination partner; partner document behaves like a classic document; - res_users: add 'display_groups_suggestions' field that controls the display of suggested groups to follow; - res_users: writing on a res.users object is considered as a private discussion; when Hr is not installed, only aliases should be able to post on a user; hr_employee: - when creating an employee, post a message on its profile and push it to every employees of the same company; - add follow/unfollow and message and follower count on employee kanban view; - implement suggested employee behavior; - HR improves the basic Inbox by adding the 'Compose a new message or Write to my followers'; - allow to post on an employee profile when having read access right if the user that posts is an employee; HR: - add suggestions.Employee widget that allows to display a list of suggested employees to follow; this widget is displayed in the Inbox; - res_users: add 'display_employees_suggestions' field that controls the display of suggested employees to follow; - res_users: do not welcome new users anymore, welcome new employees instead - res_users: incoming emails are still considered as private messages (using aliases); however messages posted on user profile are redirected to the related employee profiles (used for 'Write to my followers') bzr revid: tde@openerp.com-20130612121258-j38do5opsot2ur7c
Diffstat (limited to 'addons/mail/static/src/xml')
-rw-r--r--addons/mail/static/src/xml/mail.xml19
-rw-r--r--addons/mail/static/src/xml/suggestions.xml38
2 files changed, 51 insertions, 6 deletions
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index f5004941a8d..5062491ecbb 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">
@@ -339,7 +349,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/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>