2019-10-24 01:06:54 +08:00
|
|
|
import Controller from "@ember/controller";
|
2020-07-07 17:44:13 +08:00
|
|
|
import { action } from "@ember/object";
|
2019-10-31 04:28:29 +08:00
|
|
|
import { sort } from "@ember/object/computed";
|
2020-07-07 17:44:13 +08:00
|
|
|
|
2019-10-24 01:06:54 +08:00
|
|
|
export default Controller.extend({
|
2019-10-31 04:28:29 +08:00
|
|
|
sortedTemplates: sort("emailTemplates", "titleSorting"),
|
2015-11-13 05:08:19 +08:00
|
|
|
|
2019-05-28 18:15:12 +08:00
|
|
|
init() {
|
|
|
|
this._super(...arguments);
|
|
|
|
|
2020-07-07 17:44:13 +08:00
|
|
|
this.set("titleSorting", ["title"]);
|
2019-08-12 16:27:25 +08:00
|
|
|
},
|
|
|
|
|
2020-07-07 17:44:13 +08:00
|
|
|
@action
|
|
|
|
onSelectTemplate(template) {
|
|
|
|
this.transitionToRoute("adminCustomizeEmailTemplates.edit", template);
|
2019-05-28 18:15:12 +08:00
|
|
|
},
|
2015-11-13 05:08:19 +08:00
|
|
|
});
|