2015-11-20 20:27:06 -05:00
|
|
|
import EmailLog from 'admin/models/email-log';
|
|
|
|
|
2014-02-14 18:50:08 -05:00
|
|
|
/**
|
|
|
|
Handles routes related to viewing email logs.
|
|
|
|
|
|
|
|
@class AdminEmailSentRoute
|
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
2015-11-20 20:27:06 -05:00
|
|
|
export default Discourse.Route.extend({
|
2014-02-14 18:50:08 -05:00
|
|
|
|
|
|
|
model: function() {
|
2015-11-20 20:27:06 -05:00
|
|
|
return EmailLog.findAll({ status: this.get("status") });
|
2014-02-14 18:50:08 -05:00
|
|
|
},
|
|
|
|
|
2014-02-17 15:58:28 -05:00
|
|
|
setupController: function(controller, model) {
|
2014-02-18 12:21:35 -05:00
|
|
|
controller.set("model", model);
|
2014-02-14 18:50:08 -05:00
|
|
|
// resets the filters
|
|
|
|
controller.set("filter", { status: this.get("status") });
|
|
|
|
},
|
|
|
|
|
|
|
|
renderTemplate: function() {
|
|
|
|
this.render("admin/templates/email_" + this.get("status"), { into: "adminEmail" });
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|