From f8a2d402b11bf34deba67b20da557508f62f70cd Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 24 Oct 2013 17:42:02 +0200 Subject: [PATCH] Port userstory email changes emails to new template. --- ...ate_userstory_notification-body-html.jinja | 13 ++++++++++- ...ate_userstory_notification-body-text.jinja | 2 -- ...roy_userstory_notification-body-html.jinja | 13 ++++++++++- ...roy_userstory_notification-body-text.jinja | 2 -- ...ate_userstory_notification-body-html.jinja | 22 +++++++++++++------ ...ate_userstory_notification-body-text.jinja | 8 ------- 6 files changed, 39 insertions(+), 21 deletions(-) delete mode 100644 greenmine/projects/userstories/templates/emails/create_userstory_notification-body-text.jinja delete mode 100644 greenmine/projects/userstories/templates/emails/destroy_userstory_notification-body-text.jinja delete mode 100644 greenmine/projects/userstories/templates/emails/update_userstory_notification-body-text.jinja diff --git a/greenmine/projects/userstories/templates/emails/create_userstory_notification-body-html.jinja b/greenmine/projects/userstories/templates/emails/create_userstory_notification-body-html.jinja index 0eda2fcb..eb526fbf 100644 --- a/greenmine/projects/userstories/templates/emails/create_userstory_notification-body-html.jinja +++ b/greenmine/projects/userstories/templates/emails/create_userstory_notification-body-html.jinja @@ -1,2 +1,13 @@ -# TODO: {{ changer }} {{ object }} +{% extends "emails/base.jinja" %} +{% block body %} + + + + +
+

{{ object.project.name }}

+

User story: {{ object.subject }}

+

Created by {{ changer.get_full_name() }}

+
+{% endblock %} diff --git a/greenmine/projects/userstories/templates/emails/create_userstory_notification-body-text.jinja b/greenmine/projects/userstories/templates/emails/create_userstory_notification-body-text.jinja deleted file mode 100644 index 0eda2fcb..00000000 --- a/greenmine/projects/userstories/templates/emails/create_userstory_notification-body-text.jinja +++ /dev/null @@ -1,2 +0,0 @@ -# TODO: {{ changer }} {{ object }} - diff --git a/greenmine/projects/userstories/templates/emails/destroy_userstory_notification-body-html.jinja b/greenmine/projects/userstories/templates/emails/destroy_userstory_notification-body-html.jinja index 0eda2fcb..1b0c3f39 100644 --- a/greenmine/projects/userstories/templates/emails/destroy_userstory_notification-body-html.jinja +++ b/greenmine/projects/userstories/templates/emails/destroy_userstory_notification-body-html.jinja @@ -1,2 +1,13 @@ -# TODO: {{ changer }} {{ object }} +{% extends "emails/base.jinja" %} +{% block body %} + + + + +
+

{{ object.project.name }}

+

User story: {{ object.subject }}

+

Deleted by {{ changer.get_full_name() }}

+
+{% endblock %} diff --git a/greenmine/projects/userstories/templates/emails/destroy_userstory_notification-body-text.jinja b/greenmine/projects/userstories/templates/emails/destroy_userstory_notification-body-text.jinja deleted file mode 100644 index 0eda2fcb..00000000 --- a/greenmine/projects/userstories/templates/emails/destroy_userstory_notification-body-text.jinja +++ /dev/null @@ -1,2 +0,0 @@ -# TODO: {{ changer }} {{ object }} - diff --git a/greenmine/projects/userstories/templates/emails/update_userstory_notification-body-html.jinja b/greenmine/projects/userstories/templates/emails/update_userstory_notification-body-html.jinja index e5708f8b..6cdd6d26 100644 --- a/greenmine/projects/userstories/templates/emails/update_userstory_notification-body-html.jinja +++ b/greenmine/projects/userstories/templates/emails/update_userstory_notification-body-html.jinja @@ -1,8 +1,16 @@ -

Updated fields by {{ changer }}:

- -{# TODO Print the "object" details #} +{% extends "emails/base.jinja" %} + +{% set final_url = resolve_front_url("userstory", object.project.id, object.id) %} + +{% block body %} + + + + +
+

{{ object.project.name }}

+

User story: {{ object.subject }}

+

Updated by {{ changer.get_full_name() }}

+
+{% endblock %} diff --git a/greenmine/projects/userstories/templates/emails/update_userstory_notification-body-text.jinja b/greenmine/projects/userstories/templates/emails/update_userstory_notification-body-text.jinja deleted file mode 100644 index 3192319b..00000000 --- a/greenmine/projects/userstories/templates/emails/update_userstory_notification-body-text.jinja +++ /dev/null @@ -1,8 +0,0 @@ -Updated fields by {{ changer }}: - -{% for field in changed_fields_dict.values() %} - ** {{ field.verbose_name}}: from "{{ field.old_value}}" to "{{ field.new_value}}". -{% endfor %} - -{# TODO Print the "object" details #} -