Screened URLs list in admin

This commit is contained in:
Neil Lalonde
2013-08-15 10:48:30 -04:00
parent def134605d
commit 293361dcd3
16 changed files with 183 additions and 37 deletions

View File

@@ -9,7 +9,7 @@
**/
Discourse.ScreenedEmail = Discourse.Model.extend({
actionName: function() {
return I18n.t("admin.logs.screened_emails.actions." + this.get('action'));
return I18n.t("admin.logs.screened_actions." + this.get('action'));
}.property('action')
});

View File

@@ -0,0 +1,23 @@
/**
Represents a URL that is watched for, and an action may be taken.
@class ScreenedUrl
@extends Discourse.Model
@namespace Discourse
@module Discourse
**/
Discourse.ScreenedUrl = Discourse.Model.extend({
actionName: function() {
return I18n.t("admin.logs.screened_actions." + this.get('action'));
}.property('action')
});
Discourse.ScreenedUrl.reopenClass({
findAll: function(filter) {
return Discourse.ajax("/admin/logs/screened_urls.json").then(function(screened_urls) {
return screened_urls.map(function(b) {
return Discourse.ScreenedUrl.create(b);
});
});
}
});