`NotificationDetailView` does not use the `NotificationType`'s template
Describe the bug
When rendering a notification, e.g. for a NewEvent, the template of the type is not used in NotificationDetailView, leading to display not in correspondance with email content.
To Reproduce Steps to reproduce the behavior:
- Create an Event and send a NewEvent-Notification
- View the notification in it's detail view.
- See missing event date and time information
Expected behavior The content should be shown in full as templated in the Notifcation Type.
Additional info
To fix this might need some refactoring, as the template currently contains the whole email, not just the actual notification content parts. With content only inside the template, NewEventNotificationType is inconsistent with it's plaintext not containing any date/time info.
https://github.com/ephios-dev/ephios/blob/7a7a4e1fb245b613b057a2e9c36ece32aff08bdc/ephios/core/services/notifications/types.py#L207-L218
I'd suggest changing the role of the notification type template. It should only apply to the body of the mail where the plaintext is rendered into. That way, we could render the body alone for displaying notifications in the browser as well.
Your suggestion may still lead to weird behaviour because of heading levels etc, so that may need further work.
On the other hand we are only using a separate HTML template for the NewEventNotification, which is also so simple that it could just use plaintext. Then we could remove the custom HTML templates alltogether.
On the other hand we are only using a separate HTML template for the NewEventNotification, which is also so simple that it could just use plaintext. Then we could remove the custom HTML templates alltogether.
Yeah probably simplest for now.