mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
Finish renaming blocked emails to screen emails
This commit is contained in:
parent
3e7441177a
commit
9170166e93
12 changed files with 63 additions and 63 deletions
|
@ -1,21 +0,0 @@
|
|||
/**
|
||||
This controller supports the interface for listing blocked email addresses in the admin section.
|
||||
|
||||
@class AdminLogsBlockedEmailsController
|
||||
@extends Ember.ArrayController
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminLogsBlockedEmailsController = Ember.ArrayController.extend(Discourse.Presence, {
|
||||
loading: false,
|
||||
content: [],
|
||||
|
||||
show: function() {
|
||||
var self = this;
|
||||
this.set('loading', true);
|
||||
Discourse.BlockedEmail.findAll().then(function(result) {
|
||||
self.set('content', result);
|
||||
self.set('loading', false);
|
||||
});
|
||||
}
|
||||
});
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
This controller supports the interface for listing screened email addresses in the admin section.
|
||||
|
||||
@class AdminLogsScreenedEmailsController
|
||||
@extends Ember.ArrayController
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminLogsScreenedEmailsController = Ember.ArrayController.extend(Discourse.Presence, {
|
||||
loading: false,
|
||||
content: [],
|
||||
|
||||
show: function() {
|
||||
var self = this;
|
||||
this.set('loading', true);
|
||||
Discourse.ScreenedEmail.findAll().then(function(result) {
|
||||
self.set('content', result);
|
||||
self.set('loading', false);
|
||||
});
|
||||
}
|
||||
});
|
|
@ -1,24 +0,0 @@
|
|||
/**
|
||||
Represents an email address that is watched for during account registration,
|
||||
and an action is taken.
|
||||
|
||||
@class BlockedEmail
|
||||
@extends Discourse.Model
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.BlockedEmail = Discourse.Model.extend({
|
||||
actionName: function() {
|
||||
return I18n.t("admin.logs.blocked_emails.actions." + this.get('action'));
|
||||
}.property('action')
|
||||
});
|
||||
|
||||
Discourse.BlockedEmail.reopenClass({
|
||||
findAll: function(filter) {
|
||||
return Discourse.ajax("/admin/logs/blocked_emails.json").then(function(blocked_emails) {
|
||||
return blocked_emails.map(function(b) {
|
||||
return Discourse.BlockedEmail.create(b);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
24
app/assets/javascripts/admin/models/screened_email.js
Normal file
24
app/assets/javascripts/admin/models/screened_email.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
Represents an email address that is watched for during account registration,
|
||||
and an action is taken.
|
||||
|
||||
@class ScreenedEmail
|
||||
@extends Discourse.Model
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.ScreenedEmail = Discourse.Model.extend({
|
||||
actionName: function() {
|
||||
return I18n.t("admin.logs.screened_emails.actions." + this.get('action'));
|
||||
}.property('action')
|
||||
});
|
||||
|
||||
Discourse.ScreenedEmail.reopenClass({
|
||||
findAll: function(filter) {
|
||||
return Discourse.ajax("/admin/logs/screened_emails.json").then(function(screened_emails) {
|
||||
return screened_emails.map(function(b) {
|
||||
return Discourse.ScreenedEmail.create(b);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
|
@ -15,18 +15,18 @@ Discourse.AdminLogsIndexRoute = Discourse.Route.extend({
|
|||
/**
|
||||
The route that lists blocked email addresses.
|
||||
|
||||
@class AdminLogsBlockedEmailsRoute
|
||||
@class AdminLogsScreenedEmailsRoute
|
||||
@extends Discourse.Route
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminLogsBlockedEmailsRoute = Discourse.Route.extend({
|
||||
Discourse.AdminLogsScreenedEmailsRoute = Discourse.Route.extend({
|
||||
renderTemplate: function() {
|
||||
this.render('admin/templates/logs/blocked_emails', {into: 'adminLogs'});
|
||||
this.render('admin/templates/logs/screened_emails', {into: 'adminLogs'});
|
||||
},
|
||||
|
||||
setupController: function() {
|
||||
return this.controllerFor('adminLogsBlockedEmails').show();
|
||||
return this.controllerFor('adminLogsScreenedEmails').show();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ Discourse.Route.buildRoutes(function() {
|
|||
});
|
||||
|
||||
this.resource('adminLogs', { path: '/logs' }, function() {
|
||||
this.route('blockedEmails', { path: '/blocked_emails' });
|
||||
this.route('screenedEmails', { path: '/screened_emails' });
|
||||
this.route('staffActionLogs', { path: '/staff_action_logs' });
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class='span15'>
|
||||
<ul class="nav nav-pills">
|
||||
<li>{{#linkTo 'adminLogs.staffActionLogs'}}{{i18n admin.logs.staff_actions.title}}{{/linkTo}}</li>
|
||||
<li>{{#linkTo 'adminLogs.blockedEmails'}}{{i18n admin.logs.blocked_emails.title}}{{/linkTo}}</li>
|
||||
<li>{{#linkTo 'adminLogs.screenedEmails'}}{{i18n admin.logs.screened_emails.title}}{{/linkTo}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<p>{{i18n admin.logs.blocked_emails.description}}</p>
|
||||
<p>{{i18n admin.logs.screened_emails.description}}</p>
|
||||
|
||||
{{#if loading}}
|
||||
<div class='admin-loading'>{{i18n loading}}</div>
|
||||
|
@ -7,15 +7,15 @@
|
|||
|
||||
<div class='table blocked-emails'>
|
||||
<div class="heading-container">
|
||||
<div class="col heading first email">{{i18n admin.logs.blocked_emails.email}}</div>
|
||||
<div class="col heading first email">{{i18n admin.logs.screened_emails.email}}</div>
|
||||
<div class="col heading action">{{i18n admin.logs.action}}</div>
|
||||
<div class="col heading match_count">{{i18n admin.logs.blocked_emails.match_count}}</div>
|
||||
<div class="col heading last_match_at">{{i18n admin.logs.blocked_emails.last_match_at}}</div>
|
||||
<div class="col heading match_count">{{i18n admin.logs.screened_emails.match_count}}</div>
|
||||
<div class="col heading last_match_at">{{i18n admin.logs.screened_emails.last_match_at}}</div>
|
||||
<div class="col heading created_at">{{i18n admin.logs.created_at}}</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
{{view Discourse.BlockedEmailsListView contentBinding="controller"}}
|
||||
{{view Discourse.ScreenedEmailsListView contentBinding="controller"}}
|
||||
</div>
|
||||
|
||||
{{else}}
|
|
@ -1,5 +0,0 @@
|
|||
Discourse.BlockedEmailsListView = Ember.ListView.extend({
|
||||
height: 700,
|
||||
rowHeight: 32,
|
||||
itemViewClass: Ember.ListItemView.extend({templateName: "admin/templates/logs/blocked_emails_list_item"})
|
||||
});
|
|
@ -0,0 +1,5 @@
|
|||
Discourse.ScreenedEmailsListView = Ember.ListView.extend({
|
||||
height: 700,
|
||||
rowHeight: 32,
|
||||
itemViewClass: Ember.ListItemView.extend({templateName: "admin/templates/logs/screened_emails_list_item"})
|
||||
});
|
|
@ -1181,8 +1181,8 @@ en:
|
|||
title: "Logs"
|
||||
action: "Action"
|
||||
created_at: "Created"
|
||||
blocked_emails:
|
||||
title: "Blocked Emails"
|
||||
screened_emails:
|
||||
title: "Screened Emails"
|
||||
description: "When someone tries to create a new account, the following email addresses will be checked and the registration will be blocked, or some other action performed."
|
||||
email: "Email Address"
|
||||
last_match_at: "Last Matched"
|
||||
|
|
Loading…
Reference in a new issue