discourse/app/assets/javascripts/admin/addon/routes/admin-email-templates-edit.js
Gary Pendergast 5da6a06ce3
UX: Use DPageHeader on the Emails page (#30781)
There are a few changes here to make the Emails admin page more consistent with the rest of the admin UI.

- The header and navigation menu have been updated.
- The sidebar now stays highlighted when visiting the email admin sub-pages.
- Moved the Template editor from /admin/customize/email_templates to /admin/email/templates, so it fit as a sub-page.
- Removed the link to the Template editor from the Customize section of the old top menu, since it's accessible from the Emails section, instead.
2025-01-15 15:36:16 +11:00

19 lines
486 B
JavaScript

import Route from "@ember/routing/route";
import { scrollTop } from "discourse/mixins/scroll-top";
export default class AdminEmailTemplatesEditRoute extends Route {
model(params) {
const all = this.modelFor("adminEmailTemplates");
return all.findBy("id", params.id);
}
setupController(controller, emailTemplate) {
controller.setProperties({ emailTemplate, saved: false });
scrollTop();
}
deactivate() {
this.controller.set("emailTemplate", null);
}
}