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