mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 07:51:36 +08:00
19 lines
442 B
JavaScript
19 lines
442 B
JavaScript
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);
|
|
},
|
|
});
|