discourse/app/assets/javascripts/admin/controllers/admin-customize-email-templates.js
2020-09-04 13:42:47 +02:00

19 lines
442 B
JavaScript

import { sort } from "@ember/object/computed";
import { action } from "@ember/object";
import Controller from "@ember/controller";
export default Controller.extend({
sortedTemplates: sort("emailTemplates", "titleSorting"),
init() {
this._super(...arguments);
this.set("titleSorting", ["title"]);
},
@action
onSelectTemplate(template) {
this.transitionToRoute("adminCustomizeEmailTemplates.edit", template);
},
});