Log when and why an email was not sent in email_logs

This commit is contained in:
Neil Lalonde
2014-02-14 13:06:39 -05:00
parent 42fb9d4fb1
commit 35dae76bbd
15 changed files with 164 additions and 37 deletions
@@ -0,0 +1,17 @@
/**
Handles routes related to viewing email logs of emails that were NOT sent.
@class AdminEmailSkippedRoute
@extends Discourse.Route
@namespace Discourse
@module Discourse
**/
Discourse.AdminEmailSkippedRoute = Discourse.Route.extend({
model: function() {
return Discourse.EmailLog.findAll('skipped');
},
renderTemplate: function() {
this.render('admin/templates/email_skipped', {into: 'adminEmail'});
}
});
@@ -17,6 +17,7 @@ Discourse.Route.buildRoutes(function() {
this.resource('adminEmail', { path: '/email'}, function() {
this.route('logs');
this.route('skipped');
this.route('previewDigest', { path: '/preview-digest' });
});