mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-19 12:02:27 -05:00
5c899c765b
This reverts commit c21457d6a7
.
27 lines
641 B
JavaScript
27 lines
641 B
JavaScript
import EmailLog from 'admin/models/email-log';
|
|
|
|
/**
|
|
Handles routes related to viewing email logs.
|
|
|
|
@class AdminEmailSentRoute
|
|
@extends Discourse.Route
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
export default Discourse.Route.extend({
|
|
|
|
model: function() {
|
|
return EmailLog.findAll({ status: this.get("status") });
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
controller.set("model", model);
|
|
// resets the filters
|
|
controller.set("filter", { status: this.get("status") });
|
|
},
|
|
|
|
renderTemplate: function() {
|
|
this.render("admin/templates/email_" + this.get("status"), { into: "adminEmail" });
|
|
}
|
|
|
|
});
|