mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 09:34:44 +08:00
19 lines
429 B
JavaScript
19 lines
429 B
JavaScript
import { sort } from "@ember/object/computed";
|
|
import Controller from "@ember/controller";
|
|
export default Controller.extend({
|
|
emailTemplates: null,
|
|
sortedTemplates: sort("emailTemplates", "titleSorting"),
|
|
|
|
init() {
|
|
this._super(...arguments);
|
|
|
|
this.titleSorting = ["title"];
|
|
},
|
|
|
|
actions: {
|
|
selectTemplate(template) {
|
|
this.transitionToRoute("adminCustomizeEmailTemplates.edit", template);
|
|
}
|
|
}
|
|
});
|