discourse/app/assets/javascripts/admin/routes/admin-email-logs.js.es6

28 lines
641 B
Plaintext
Raw Normal View History

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
**/
export default Discourse.Route.extend({
2014-02-15 07:50:08 +08:00
model: function() {
return EmailLog.findAll({ status: this.get("status") });
2014-02-15 07:50:08 +08:00
},
setupController: function(controller, model) {
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" });
}
});