mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Screened URLs list in admin
This commit is contained in:
@@ -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')
|
||||
});
|
||||
|
||||
|
||||
23
app/assets/javascripts/admin/models/screened_url.js
Normal file
23
app/assets/javascripts/admin/models/screened_url.js
Normal 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);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user