[IMP] Chatter: better display of date
bzr revid: tde@openerp.com-20130605101300-t1lwykg3d6lp7au2
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user