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