mirror of
https://github.com/discourse/discourse.git
synced 2025-06-16 13:34:35 +08:00
More documentation to Admin Controllers
This commit is contained in:
@ -10,6 +10,12 @@
|
||||
**/
|
||||
window.Discourse.AdminFlagsController = Ember.Controller.extend({
|
||||
|
||||
/**
|
||||
Clear all flags on a post
|
||||
|
||||
@method clearFlags
|
||||
@param {Discourse.FlaggedPost} item The post whose flags we want to clear
|
||||
**/
|
||||
clearFlags: function(item) {
|
||||
var _this = this;
|
||||
item.clearFlags().then((function() {
|
||||
@ -19,6 +25,12 @@
|
||||
}));
|
||||
},
|
||||
|
||||
/**
|
||||
Deletes a post
|
||||
|
||||
@method deletePost
|
||||
@param {Discourse.FlaggedPost} item The post to delete
|
||||
**/
|
||||
deletePost: function(item) {
|
||||
var _this = this;
|
||||
item.deletePost().then((function() {
|
||||
@ -28,10 +40,20 @@
|
||||
}));
|
||||
},
|
||||
|
||||
/**
|
||||
Are we viewing the 'old' view?
|
||||
|
||||
@property adminOldFlagsView
|
||||
**/
|
||||
adminOldFlagsView: (function() {
|
||||
return this.query === 'old';
|
||||
}).property('query'),
|
||||
|
||||
/**
|
||||
Are we viewing the 'active' view?
|
||||
|
||||
@property adminActiveFlagsView
|
||||
**/
|
||||
adminActiveFlagsView: (function() {
|
||||
return this.query === 'active';
|
||||
}).property('query')
|
||||
|
Reference in New Issue
Block a user