mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 09:51:26 +00:00
add admin operation logs page
This commit is contained in:
38
static/scripts/sysadmin-app/views/admin-log.js
Normal file
38
static/scripts/sysadmin-app/views/admin-log.js
Normal file
@@ -0,0 +1,38 @@
|
||||
define([
|
||||
'jquery',
|
||||
'underscore',
|
||||
'backbone',
|
||||
'common',
|
||||
'moment',
|
||||
'app/views/widgets/hl-item-view'
|
||||
], function($, _, Backbone, Common, Moment, HLItemView) {
|
||||
'use strict';
|
||||
|
||||
var AdminLogView = HLItemView.extend({
|
||||
tagName: 'tr',
|
||||
|
||||
template: _.template($('#admin-log-item-tmpl').html()),
|
||||
|
||||
events: {
|
||||
},
|
||||
|
||||
initialize: function() {
|
||||
HLItemView.prototype.initialize.call(this);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var data = this.model.toJSON(),
|
||||
created_at = Moment(data['datetime']);
|
||||
|
||||
data['time'] = created_at.format('LLLL');
|
||||
data['time_from_now'] = Common.getRelativeTimeStr(created_at);
|
||||
|
||||
this.$el.html(this.template(data));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return AdminLogView;
|
||||
});
|
Reference in New Issue
Block a user