i18n and improvements
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
<thead>
|
||||
<th width="30"> </th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Roles</th>
|
||||
<th> </th>
|
||||
<th width="30"> </th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Roles</th>
|
||||
<th> </th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- items -->
|
||||
<!-- items -->
|
||||
</tbody>
|
||||
|
@ -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">
|
||||
|
@ -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();
|
||||
}
|
||||
}));
|
||||
|
||||
|
Reference in New Issue
Block a user