summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-12-21 17:34:59 +0100
committerThibault Delavallée <tde@openerp.com>2012-12-21 17:34:59 +0100
commitf6894591a3e1a5bcd38ad58c8d522e7aefea798a (patch)
tree7e2b4ce59e6c80ff088b6c303225832ecf2f3f17 /addons/mail/static/src/xml
parent912533f1f3e3ef69792d7b373a9584eaadd987d7 (diff)
parentdcd9f1d35e2e898cf7835b88d7adbbb7646cbc66 (diff)
[MERGE] mail: varioux fixes and improvements.
Mail: - Chatter widget now checks email address in a given thread that are not linked to any partner; it proposes to create a partner that will be added as follower to the document for each found email address - fixed reload of a posted message - invite wizard now uses the many2many_tags_email widget, to avoid sending invitations to partners not having an email address defined Misc : - note: fixed padding of note leading to ugly display of notes bzr revid: tde@openerp.com-20121221163459-wv0jiss4wplla1yl
Diffstat (limited to 'addons/mail/static/src/xml')
-rw-r--r--addons/mail/static/src/xml/mail.xml27
-rw-r--r--addons/mail/static/src/xml/mail_followers.xml7
2 files changed, 24 insertions, 10 deletions
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index 3c510813029..4b3c31525d4 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -79,7 +79,7 @@
<img t-att-src="'/mail/static/src/img/mimetypes/' + attachment.filetype + '.png'"></img>
<div class='oe_name'><t t-raw='attachment.name' /></div>
</a>
- <div class='oe_delete oe_e' title="Delete this attachment" t-attf-data-id="{attachment.id}">[</div>
+ <div class='oe_delete oe_e' title="Delete this attachment" t-att-data-id="attachment.id">[</div>
<div class='oe_progress_bar'>
uploading
</div>
@@ -91,7 +91,7 @@
<img t-att-src="widget.attachments_resize_image(attachment.id, [100,80])"></img>
<div class='oe_name'><t t-raw='attachment.name' /></div>
</a>
- <div class='oe_delete oe_e'>[</div>
+ <div class='oe_delete oe_e' title="Delete this attachment" t-att-data-id="attachment.id">[</div>
<div class='oe_progress_bar'>
uploading
</div>
@@ -113,19 +113,28 @@
<t t-if="!widget.parent_thread.parent_message.record_name">this document</t>
</span>
</t>
- <t t-if="!widget.is_private and widget.partner_ids.length"> and </t>
+ <t t-if="!widget.is_private and (widget.partner_ids.length or (widget.author_id and widget.author_id[0]))"> and </t>
<t t-set="inc" t-value="0"/>
- <t t-if="widget.partner_ids.length" t-foreach="widget.partner_ids" t-as="partner">
+ <t 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-if="widget.options.show_link" t-attf-href="#model=res.partner&amp;id=#{partner[0]}"><t t-raw="partner[1]"/></a>
<t t-if="!widget.options.show_link" t-raw="partner[1]"/>
- </span><t t-set="inc" t-value="inc+1"/>
+ </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>
+ <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>
+ <div class="oe_emails_from">
+ <t t-foreach='widget.emails_from' t-as='email_from'>
+ <label title="Add them into recipients and followers">
+ <input type="checkbox" t-att-checked="email_from[1] ? 'checked' : undefind" t-att-data="email_from[0]"/>
+ <t t-raw="email_from[0]"/>
+ </label>
+ </t>
+ </div>
</t>
<!--
@@ -232,8 +241,8 @@
<t t-if="widget.attachment_ids.length > 0">
<div class="oe_msg_attachment_list"></div>
</t>
- <a t-if="widget.author_id and widget.options.show_link" t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a>
- <span t-if="widget.author_id and !widget.options.show_link"><t t-raw="widget.author_id[1]"/></span>
+ <a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a>
+ <span t-if="widget.author_id and (!widget.options.show_link or !widget.author_id[0])"><t t-raw="widget.author_id[1]"/></span>
<span class='oe_subtle'>•</span>
<span t-att-title="widget.date"><t t-raw="widget.timerelative"/></span>
<span t-if="!widget.options.readonly" class='oe_subtle'>•</span>
diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml
index f0a603e7f98..459f13155a0 100644
--- a/addons/mail/static/src/xml/mail_followers.xml
+++ b/addons/mail/static/src/xml/mail_followers.xml
@@ -20,7 +20,7 @@
<hr size="2"></hr>
<div class='oe_follower_title_box'>
<h4 class='oe_follower_title'>Followers</h4>
- <a href='#' class="oe_invite">Invite others</a>
+ <a t-if="widget.view_is_editable" href='#' class="oe_invite">Add others</a>
</div>
<div class="oe_follower_list"></div>
</div>
@@ -32,6 +32,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 t-raw="record.name"/></a>
+ <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>
<!--
@@ -47,4 +48,8 @@
</table>
</t>
+ <t t-name="mail.followers.show_more">
+ <div class="oe_partner oe_show_more">And <t t-raw="number"/> more.</div>
+ </t>
+
</template>