discourse/app/assets/javascripts/admin/addon/controllers/admin-customize-email-templates.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
442 B
JavaScript
Raw Normal View History

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