[CoLab] Implement email templating
Description; admin would like to draft or modify email notification templates that can be selected for use in the Tasks & Notifications subsystem.
This project will adopt a phased approach;
- Use a templating framework to replace the hardcoded implementation of 1) generic 2) event and 3) client email notifications. Provide a preview of email templates.
- Admins/Group managers should be able to create and modify email notification templates within Kotahi. We should use the Wax editor to edit email notification content.
- Admins/Group managers should be able to implement basic field mapping in email notifications within Kotahi. Embed expressions in email content - the ability for an admin to insert relevant metadata in email templates e.g. ((firstname)) or ((manuscriptid)).
Phase 1; IMPLEMENT EMAIL TEMPLATING
-
Implement https://handlebarsjs.com/ as the email notification templating framework. -
Create a page to manage email templates. -
See a list of email templates; Settings>Email -
Provide a preview of existing email templates. -
All new instances of Kotahi should use generic templates only per archetype. -
Migrate client email templates to use handlebars.
Phase 2; CREATE AND MODIFY EMAIL TEMPLATES
-
Admins can access Menu>Settings>Email page to create, modify and/or delete email notification templates. -
Display a list of all existing templates. -
Action to create a new template. -
Wax editor to add/modify email content; email template description field, subject field, body content field with expressions and signature (is this from the email client?) -
Action to access an existing template -
Action to delete a template (with confirmation pop-up). -
Ability to add expressions to email templates using the Wax editor; ((firstname)), ((manuscriptid)), ((sender_editor)), ((authorinvitation)), ((reviewerinvitation))