[IMP] Chatter: better display of date

bzr revid: tde@openerp.com-20130605101300-t1lwykg3d6lp7au2
This commit is contained in:
Thibault Delavallée
2013-06-05 12:13:00 +02:00
parent b16935efdc
commit 9fd2e7297f
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -259,6 +259,7 @@ openerp.mail = function (session) {
format_data: function () {
//formating and add some fields for render
this.date = this.date ? session.web.str_to_datetime(this.date) : false;
this.display_date = this.date.toString('ddd MMM dd yyyy HH:mm');
if (this.date && new Date().getTime()-this.date.getTime() < 7*24*60*60*1000) {
this.timerelative = $.timeago(this.date);
}
+4 -1
View File
@@ -295,7 +295,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>