i18n and improvements

This commit is contained in:
Jamie Curnow
2018-07-18 16:55:09 +10:00
parent d49c3ba3af
commit b6cff5a7d8
34 changed files with 314 additions and 412 deletions

View File

@ -1,10 +1,10 @@
<thead>
<th width="30">&nbsp;</th>
<th>Name</th>
<th>Email</th>
<th>Roles</th>
<th>&nbsp;</th>
<th width="30">&nbsp;</th>
<th>Name</th>
<th>Email</th>
<th>Roles</th>
<th>&nbsp;</th>
</thead>
<tbody>
<!-- items -->
<!-- items -->
</tbody>

View File

@ -1,6 +1,6 @@
<div class="card">
<div class="card-header">
<h3 class="card-title">Audit Log</h3>
<h3 class="card-title"><%- i18n('audit-log', 'title') %></h3>
</div>
<div class="card-body no-padding min-100">
<div class="dimmer active">

View File

@ -1,9 +1,8 @@
'use strict';
const Mn = require('backbone.marionette');
const App = require('../main');
const AuditLogModel = require('../../models/audit-log');
const Api = require('../api');
const Controller = require('../controller');
const ListView = require('./list/main');
const template = require('./main.ejs');
const ErrorView = require('../error/main');
@ -25,7 +24,7 @@ module.exports = Mn.View.extend({
onRender: function () {
let view = this;
Api.AuditLog.getAll()
App.Api.AuditLog.getAll()
.then(response => {
if (!view.isDestroyed() && response && response.length) {
view.showChildView('list_region', new ListView({
@ -33,8 +32,8 @@ module.exports = Mn.View.extend({
}));
} else {
view.showChildView('list_region', new EmptyView({
title: 'There are no logs.',
subtitle: 'As soon as you or another user changes something, history of those events will show up here.'
title: App.i18n('audit-log', 'empty'),
subtitle: App.i18n('audit-log', 'empty-subtitle')
}));
}
})
@ -43,7 +42,7 @@ module.exports = Mn.View.extend({
code: err.code,
message: err.message,
retry: function () {
Controller.showAuditLog();
App.Controller.showAuditLog();
}
}));