mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 10:43:43 +08:00
a2ea9c5417
Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods We are upgrading all `this.transitionToRoute` calls on controllers to directly call the router service (`this.router.transitionTo`)
17 lines
497 B
JavaScript
17 lines
497 B
JavaScript
import { sort } from "@ember/object/computed";
|
|
import Controller from "@ember/controller";
|
|
import { action } from "@ember/object";
|
|
import { inject as service } from "@ember/service";
|
|
|
|
export default class AdminCustomizeEmailTemplatesController extends Controller {
|
|
@service router;
|
|
|
|
titleSorting = ["title"];
|
|
@sort("emailTemplates", "titleSorting") sortedTemplates;
|
|
|
|
@action
|
|
onSelectTemplate(template) {
|
|
this.router.transitionTo("adminCustomizeEmailTemplates.edit", template);
|
|
}
|
|
}
|