summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml/mail.xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-09-19 13:10:00 +0200
committerThibault Delavallée <tde@openerp.com>2012-09-19 13:10:00 +0200
commitfa27dde6c97add97226a27610845cef183353c26 (patch)
tree27698e9e87b5b3fbe3ff8b898a25140fbf16d774 /addons/mail/static/src/xml/mail.xml
parent9ec025be0ed4a896b37b0323fe427e39f6abb13c (diff)
parent819455b73cbc336142579c788445b4d4734bd83f (diff)
[MERGE] Merged with addons/trunk.
bzr revid: tde@openerp.com-20120919111000-w3xmyatd6new8ghm
Diffstat (limited to 'addons/mail/static/src/xml/mail.xml')
-rw-r--r--addons/mail/static/src/xml/mail.xml17
1 files changed, 14 insertions, 3 deletions
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index bf339f21f1c..e3586e723e4 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -142,11 +142,9 @@
</li>
<li><a t-attf-href="#model=res.partner&amp;id=#{record.author_id[0]}"><t t-raw="record.author_id[1]"/></a></li>
<li><span t-att-title="record.date"><t t-raw="record.timerelative"/></span></li>
+ <t t-call="mail.thread.message.vote"/>
<li t-if="options.show_reply"><a class="oe_mail_msg_reply">Reply</a></li>
<li t-if="options.show_reply_by_email"><a class="oe_mail_msg_reply_by_email" t-attf-data-msg_id="{record.id}">Reply</a></li>
- <!-- uncomment when merging vote
- <li><a href="#">Like</a></li>
- -->
<li t-if="record.attachment_ids.length > 0">
<a class="oe_mail_msg_view_attachments">
<t t-if="record.attachment_ids.length == 1">1 Attachment</t>
@@ -180,4 +178,17 @@
</ul>
</t>
+ <!-- mail.thread.message.vote
+ Template used to display Like/Unlike in a mail.message
+ -->
+ <li t-name="mail.thread.message.vote">
+ <t t-if='record.vote_user_ids.length > 0'>
+ <span class="oe_left oe_mail_vote_count"><t t-esc="record.vote_user_ids.length"/> votes</span>
+ </t>
+ <button t-attf-class="oe_mail_msg_vote oe_mail_msg_vote_#{record.has_voted}" t-attf-data-msg_id="{record.id}">
+ <t t-if="! record.has_voted"><span>+1</span></t>
+ <t t-if="record.has_voted"><span>-1</span></t>
+ </button>
+ </li>
+
</template>