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', {
|
c.view('tools/tools_logs', {
|
||||||
"data": data,
|
"data": data,
|
||||||
formatDate: function() {
|
"locale": y18n.locale
|
||||||
return this.started_at.getDate();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -148,7 +146,8 @@
|
||||||
}
|
}
|
||||||
c.view('tools/tools_log', {
|
c.view('tools/tools_log', {
|
||||||
"log": 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>
|
<div class="separator"></div>
|
||||||
|
|
||||||
|
{{#intl locales=locale}}
|
||||||
{{#if log.metadata}}
|
{{#if log.metadata}}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
@ -60,3 +61,4 @@
|
||||||
{{/log.logs}}</pre>
|
{{/log.logs}}</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/intl}}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
<div class="separator"></div>
|
<div class="separator"></div>
|
||||||
|
|
||||||
|
{{#intl locales=locale}}
|
||||||
{{#if data}}
|
{{#if data}}
|
||||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||||
{{#data}}
|
{{#data}}
|
||||||
|
@ -21,7 +22,7 @@
|
||||||
<div id="collapse-{{key}}" class="panel-collapse{{#if @first}}{{else}} collapse{{/if}}" role="tabpanel" aria-labelledby="heading-{{key}}">
|
<div id="collapse-{{key}}" class="panel-collapse{{#if @first}}{{else}} collapse{{/if}}" role="tabpanel" aria-labelledby="heading-{{key}}">
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{{#value}}
|
{{#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}}
|
{{/value}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,3 +31,4 @@
|
||||||
{{/data}}
|
{{/data}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/intl}}
|
||||||
|
|
Loading…
Reference in a new issue