1
0
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:
lian
2017-03-09 17:42:59 +08:00
parent 893f3db8c0
commit dd88c4e043
23 changed files with 699 additions and 17 deletions

View 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;
});