Add notification templates in code repository in HTML format#509
Draft
nikomakela wants to merge 5 commits into
Draft
Add notification templates in code repository in HTML format#509nikomakela wants to merge 5 commits into
nikomakela wants to merge 5 commits into
Conversation
Contributor
Author
|
NOTE: Since the text and format in notifications have changed, the content needs to be approved by the product owner. The templates can be previewed from the django admin site.
|
889a52c to
77ba0ef
Compare
KK-1441. Change the Google Spreadsheet importer to a file importer, so the notification templates can be fetched from the project's repository. The templates needs to be under `notification_importers` app in templates -folder. They should be categorized by the notification type, so the emai ltemplates should be under notification_importers/templates/email/ -folder. Then the files should be named so that the name is constracted from `[type]-[locale].html`
KK-1441. Copy the notification templates contents from the Google Spreadsheet (https://docs.google.com/spreadsheets/d/ 1TkdQsO50DHOg5pi1JhzudOL1GKpiK-V2DCIoAipKj-M), so they can be imported to database by using the `notification_importers.notification_importer.NotificationFileImporter` instead of the spreadsheet importer.
KK-1441. The is_obsolete -field is removed from the user model, so it cannot be used anymore in the notification templates either, because rendering the template would fail. Remove the is_obsolete if-statements from the notification templates where it was used.
KK-1441. The notification importer needs `<title>` -tag in order to set subject field properly. Also the HTML syntax makes the template look better when sent to customer. However, since there is no design for those templates yet, the HTML content should be as simple as possible (e.g. similar to markdown format). Target was to convert plain text messages to minimal HTML equivalent.
KK-1441. Instead of showing the long and ugly URL, now when we are using HTML-formatted notification templates, we could also use some text as a link instead of the URL (as text).
8c6fab7 to
79cc045
Compare
Contributor
|
Removed review request from myself to make my review request list more up to date. If this really needs code review still, and this is really going to be merged, then please ask for code review from me anew. Thank you! |
Contributor
Author
|
Converted to draft, since there is no plan for this yet and Solution office requested the change to draft. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KK-1441.
Based on #506, which starts using the
notification_importerapp (that was copied from Kultus), but with a Google Spreadsheet importer.In this PR, the notification templates content is copied from https://docs.google.com/spreadsheets/d/1TkdQsO50DHOg5pi1JhzudOL1GKpiK-V2DCIoAipKj-M. The content is then added to notification template HTML files that can be imported with
notification_importers.notification_importer.NotificationFileImporter.This changes the Google Spreadsheet importer to a file importer, so the notification templates can be fetched from the project's repository. The templates needs to be under
notification_importersapp in templates -folder. They should be categorized by the notification type, so the emai ltemplates should be under notification_importers/templates/email/ -folder. Then the files should be named so that the name is constracted from[type]-[locale].html.The notification importer needs
<title>-tag in order to set subject field properly. Also the HTML syntax makes the template look better when sent to customer. However, since there is no design for those templates yet, the HTML content should be as simple as possible (e.g. similar to markdown format). Target was to convert plain text messages to minimal HTML equivalent.Instead of showing the long and ugly URL, now when we are using HTML-formatted notification templates, we could also use some text as a link instead of the URL (as text).