mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Show relative time in log list + fix locale for handlebar formatTime/formatRelative
This commit is contained in:
parent
92c97487a8
commit
eee196e090
3 changed files with 8 additions and 5 deletions
|
@ -121,9 +121,7 @@
|
|||
|
||||
c.view('tools/tools_logs', {
|
||||
"data": data,
|
||||
formatDate: function() {
|
||||
return this.started_at.getDate();
|
||||
}
|
||||
"locale": y18n.locale
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -148,7 +146,8 @@
|
|||
}
|
||||
c.view('tools/tools_log', {
|
||||
"log": log,
|
||||
"next_number": log.logs.length == number ? number * 10:false
|
||||
"next_number": log.logs.length == number ? number * 10:false,
|
||||
"locale": y18n.locale
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
<div class="separator"></div>
|
||||
|
||||
{{#intl locales=locale}}
|
||||
{{#if log.metadata}}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
|
@ -60,3 +61,4 @@
|
|||
{{/log.logs}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
{{/intl}}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<div class="separator"></div>
|
||||
|
||||
{{#intl locales=locale}}
|
||||
{{#if data}}
|
||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
{{#data}}
|
||||
|
@ -21,7 +22,7 @@
|
|||
<div id="collapse-{{key}}" class="panel-collapse{{#if @first}}{{else}} collapse{{/if}}" role="tabpanel" aria-labelledby="heading-{{key}}">
|
||||
<div class="list-group">
|
||||
{{#value}}
|
||||
<a href="#/tools/logs/{{ name }}" class="list-group-item"><small>{{ started_at }}</small> {{ description }}</a>
|
||||
<a href="#/tools/logs/{{ name }}" class="list-group-item" title='{{formatTime started_at day="numeric" month="long" year="numeric" hour="numeric" minute="numeric"}}'><small style="margin-right:20px;" >{{formatRelative started_at}}</small> {{ description }}</a>
|
||||
{{/value}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,3 +31,4 @@
|
|||
{{/data}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/intl}}
|
||||
|
|
Loading…
Reference in a new issue