diff --git a/aleksis/core/templates/templated_email/celery_failure.email b/aleksis/core/templates/templated_email/celery_failure.email index 20ab429715bcf9e2db1cf2c0fd4203e8817810b2..8718b6f522dfdca868abfbaaae9a6e5032983846 100644 --- a/aleksis/core/templates/templated_email/celery_failure.email +++ b/aleksis/core/templates/templated_email/celery_failure.email @@ -1,42 +1,50 @@ +{% extends "templated_email/base.email" %} {% load i18n %} -{% extends "base.html" %} -{% block subject %} - {% blocktrans with task_name=task_name%} Celery task {{ task_name }} failed!{% endblocktrans %} -{% endblock %} -{% block plain %} - {% blocktrans with task_name=task_name %} - the celery task {{ task_name }} failed with following information: - {% endblocktrans %} +{% block subject_content %}{% blocktrans with task_name=task_name %}Celery task {{ task_name }} failed!{% endblocktrans %}{% endblock %} +{% block plain_content %} +{% blocktrans with task_name=task_name %}the celery task {{ task_name }} failed with following information:{% endblocktrans %} -{% blocktrans with task_name=task_name task=task task_id=task_id exception=exception args=args kwargs=kwargs traceback=traceback %} - * Task name: {{task_name}} - * Task: {{task}} - * Id of the task: {{task_id}} - * Exception instance raised: {{ exception }} - * Positional arguments the task was called with: {{ args }} - * Keyword arguments the task was called with: {{ kwargs }} - * Stack trace object: {{ traceback }} -{% endblocktrans %} -{% endblock %} + * {% trans "Task" %}: {{ task_name }} + * {% trans "Task ID" %}: {{ task_id }} + * {% trans "Raised exception" %}: {{ exception }} + * {% trans "Positional arguments" %}: + {% for arg in args %}- {{ arg }} + {% endfor %} + * {% trans "Keyword arguments" %}: + {% for key, value in kwargs.items %}- {{ key }}: {{ value }} + {% endfor %} +{{ traceback }}{% endblock %} + +{% block html_content %} + <p> + {% blocktrans with task_name=task_name %} + the celery task {{ task_name }} failed with following information: + {% endblocktrans %} + </p> -{% block html %} - <p> - {% blocktrans with task_name=task_name %} - the celery task {{ task_name }} failed with following information: - {% endblocktrans %} - </p> + <ul> + <li>{% trans "Task" %}: {{ task_name }}</li> + <li>{% trans "Task ID" %}: {{ task_id }}</li> + <li>{% trans "Raised exception" %}: {{ exception }}</li> + <li>{% trans "Positional arguments" %}: + <ol> + {% for arg in args %} + <li>{{ arg }}</li> + {% endfor %} + </ol> + </li> + <li>{% trans "Keyword arguments" %}: + <ul> + {% for key, value in kwargs.items %} + <li>{{ key }}: {{ value }}</li> + {% endfor %} + </ul> + </li> + </ul> - <ul> - {% blocktrans with task_name=task_name task=task task_id=task_id exception=exception args=args kwargs=kwargs traceback=traceback %} - <li>Task name: {{task_name}}</li> - <li>Task: {{task}}</li> - <li>Id of the task: {{task_id}}</li> - <li>Exception instance raised: {{ exception }}</li> - <li>Positional arguments the task was called with: {{ args }}</li> - <li>Keyword arguments the task was called with: {{ kwargs }}</li> - <li>Stack trace object: {{ traceback }}</li> - </ul> - {% endblocktrans %} + <code> + {{ traceback|linebreaksbr }} + </code> {% endblock %} diff --git a/aleksis/core/templates/templated_email/data_checks.css b/aleksis/core/templates/templated_email/data_checks.css deleted file mode 100644 index b385b185ecfe66dcca070e8eb024bbb091917f04..0000000000000000000000000000000000000000 --- a/aleksis/core/templates/templated_email/data_checks.css +++ /dev/null @@ -1,16 +0,0 @@ -body { - line-height: 1.5; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-weight: normal; - color: rgba(0, 0, 0, 0.87); -} - -.count { - text-align: right; - font-family: monospace; - font-size: 14pt; -} - -td, th { - padding: 10px; -} diff --git a/aleksis/core/templates/templated_email/data_checks.email b/aleksis/core/templates/templated_email/data_checks.email index 0ed880319a9b87fdb4cd7fe14392a8841f286f39..1b3e04960596283327dbb5994fe6e8c6cae83b58 100644 --- a/aleksis/core/templates/templated_email/data_checks.email +++ b/aleksis/core/templates/templated_email/data_checks.email @@ -1,22 +1,16 @@ +{% extends "templated_email/base.email" %} {% load i18n %} -{% extends "base.html" %} -{% block subject %} - {% trans "The system detected some new problems with your data." %} -{% endblock %} - -{% block plain %} +{% block subject_content %}{% trans "The system detected some new problems with your data." %}{% endblock %} - {% blocktrans %} - the system detected some new problems with your data. - Please take some time to inspect them and solve the issues or mark them as ignored. - {% endblocktrans %} +{% block plain_content %} +{% blocktrans %}the system detected some new problems with your data. +Please take some time to inspect them and solve the issues or mark them as ignored.{% endblocktrans %} - {% for result in results %} - {{ result.0.problem_name }}: {{ result.1 }} - {% endfor %} +{% for result in results %}- {{ result.0.problem_name }}: {{ result.1 }} +{% endfor %} {% endblock %} -{% block html %} +{% block html_content %} <p> {% blocktrans %} the system detected some new problems with your data. diff --git a/aleksis/core/templates/templated_email/notification.email b/aleksis/core/templates/templated_email/notification.email index 349cf4fb31c23cdfe90a1443528cf53ffc5e8b42..e1290238f9713829640e6ebc518a618cc61d762f 100644 --- a/aleksis/core/templates/templated_email/notification.email +++ b/aleksis/core/templates/templated_email/notification.email @@ -1,30 +1,25 @@ +{% extends "templated_email/base.email" %} {% load i18n %} -{% extends "base.html" %} -{% block subject %} {% trans "New notification for" %} {{ notification_user }} {% endblock %} -{% block plain %} - {% blocktrans with notification_user=notification_user %} {{ notification_user }},{% endblocktrans %} +{% block subject_content %}{% trans "New notification for" %} {{ notification_user }}{% endblock %} - {% trans "we got a new notification for you:" %} +{% block plain_greeting %}{% blocktrans with notification_user=notification_user %}Hello {{ notification_user }},{% endblocktrans %}{% endblock %} - {{ notification.title }} +{% block plain_content %} +{% trans "we got a new notification for you:" %} - {{ notification.description }} +{{ notification.title }} - {% if notification.link %} - {% trans "More information" %} → {{ notification.link }} - {% endif %} +{{ notification.description }}{% if notification.link %} - {% blocktrans with trans_sender=notification.sender trans_created_at=notification.created %} - Sent by {{ trans_sender }} at {{ trans_created_at }} - {% endblocktrans %} +{% trans "More information" %} → {{ notification.link }}{% endif %} - {% trans "Your AlekSIS team" %} +{% blocktrans with trans_sender=notification.sender trans_created_at=notification.created %}Sent by {{ trans_sender }} at {{ trans_created_at }}{% endblocktrans %} {% endblock %} -{% block html %} - <p>{% blocktrans with notification_user=notification_user %} {{ notification_user }},{% endblocktrans %}</p> +{% block html_greeting %}<p>{% blocktrans with notification_user=notification_user %}Hello {{ notification_user }},{% endblocktrans %}</p>{% endblock %} +{% block html_content %} <p>{% trans "we got a new notification for you:" %}</p> <blockquote> @@ -40,5 +35,4 @@ Sent by {{ trans_sender }} at {{ trans_created_at }} {% endblocktrans %} </p> - {% endblock %} diff --git a/aleksis/core/templates/templated_email/person_changed.email b/aleksis/core/templates/templated_email/person_changed.email index d4157a8dce0217d307e3b334a0a1879235e93f68..068db0cc67f2b6f55e0f15a5d3e80f06a29594b4 100644 --- a/aleksis/core/templates/templated_email/person_changed.email +++ b/aleksis/core/templates/templated_email/person_changed.email @@ -1,18 +1,12 @@ {% load i18n %} -{% extends "base.html" %} -{% block subject %} - {% blocktrans with person=person %}{{ person }} changed their data!{% endblocktrans %} -{% endblock %} - -{% block plain %} +{% extends "templated_email/base.email" %} +{% block subject_content %}{% blocktrans with person=person %}{{ person }} changed their data!{% endblocktrans %}{% endblock %} - {% blocktrans with person=person %} - the person {{ person }} recently changed the following fields: - {% endblocktrans %} +{% block plain_content %} +{% blocktrans with person=person %}the person {{ person }} recently changed the following fields:{% endblocktrans %} - {% for field in changed_fields %} - * {{ field }} - {% endfor %} +{% for field in changed_fields %}* {{ field }} +{% endfor %} {% endblock %} {% block html %}