Refactoring email templates for notifications

remotes/origin/enhancement/email-actions
Alejandro Alonso 2014-10-28 18:02:46 +01:00
parent a68785a380
commit 89b8dfdc63
55 changed files with 245 additions and 222 deletions

View File

@ -99,12 +99,12 @@
{# DESCRIPTIONS #} {# DESCRIPTIONS #}
{% elif field_name in ["description_diff"] %} {% elif field_name in ["description_diff"] %}
<dd style="background: #eee; padding: 5px 15px; color: #444"> <dd style="background: #eee; padding: 5px 15px; color: #444">
<b>diff:</b> <i>{{ mdrender(object.project, values.1) }}</i> <b>diff:</b> <i>{{ mdrender(project, values.1) }}</i>
</dd> </dd>
{# CONTENT #} {# CONTENT #}
{% elif field_name in ["content_diff"] %} {% elif field_name in ["content_diff"] %}
<dd style="background: #eee; padding: 5px 15px; color: #444"> <dd style="background: #eee; padding: 5px 15px; color: #444">
<b>diff:</b> <i>{{ mdrender(object.project, values.1) }}</i> <b>diff:</b> <i>{{ mdrender(project, values.1) }}</i>
</dd> </dd>
{# ASSIGNED TO #} {# ASSIGNED TO #}
{% elif field_name == "assigned_to" %} {% elif field_name == "assigned_to" %}

View File

@ -1,23 +1,25 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("issue", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("issue", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View issue #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View issue #{0}".format(snapshot.ref) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>Issue #{{ object.ref }}: {{ object.subject }}</h2> <h2>Issue #{{ snapshot.ref }}: {{ snapshot.subject }}</h2>
<p>Updated by <b>{{ changer.get_full_name() }}</b>.</p> <p>Updated by <b>{{ changer.get_full_name() }}</b>.</p>
{% if comment %} {% for entry in history_entries%}
<p>Comment <b>{{ mdrender(object.project, comment) }}</b></p> {% if entry.comment %}
{% endif %} <p>Comment <b>{{ mdrender(project, entry.comment) }}</b></p>
{% if changed_fields %} {% endif %}
<p>Updated fields:</p> {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-html.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-html.jinja" %}
</td> {% endif %}
</td>
{% endfor %}
</tr> </tr>
</table> </table>
{% endblock %} {% endblock %}

View File

@ -1,15 +1,17 @@
{% set final_url = resolve_front_url("issue", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("issue", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View issue #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View issue #{0}".format(snapshot.ref) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Issue #{{ object.ref }}: {{ object.subject }} - Issue #{{ snapshot.ref }}: {{ snapshot.subject }}
- Updated by {{ changer.get_full_name() }} - Updated by {{ changer.get_full_name() }}
{% if comment %} {% for entry in history_entries%}
Comment: {{ comment|linebreaksbr }} {% if entry.comment %}
{% endif %} Comment: {{ entry.comment|linebreaksbr }}
{% if changed_fields %} {% endif %}
- Updated fields: {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-text.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-text.jinja" %}
{% endif %}
{% endfor %}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Updated the issue #{{ object.ref|safe }} "{{ object.subject|safe }}" [{{ project.name|safe }}] Updated the issue #{{ snapshot.ref|safe }} "{{ snapshot.subject|safe }}"

View File

@ -1,14 +1,14 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("issue", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("issue", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View issue #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View issue #{0}".format(snapshot.ref) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>Issue #{{ object.ref }}: {{ object.subject }}</h2> <h2>Issue #{{ snapshot.ref }}: {{ snapshot.subject }}</h2>
<p>Created by <b>{{ changer.get_full_name() }}</b>.</p> <p>Created by <b>{{ changer.get_full_name() }}</b>.</p>
</td> </td>
</tr> </tr>

View File

@ -1,8 +1,8 @@
{% set final_url = resolve_front_url("issue", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("issue", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View issue #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View issue #{0}".format(snapshot.ref) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- US #{{ object.ref }}: {{ object.subject }} - US #{{ snapshot.ref }}: {{ snapshot.subject }}
- Created by {{ changer.get_full_name() }} - Created by {{ changer.get_full_name() }}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Created the issue #{{ object.ref|safe }} "{{ object.subject|safe }}" [{{ project.name|safe }}] Created the issue #{{ snapshot.ref|safe }} "{{ snapshot.subject|safe }}"

View File

@ -4,8 +4,8 @@
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>{{ object.project.name }}</h1> <h1>{{ project.name }}</h1>
<h2>Issue #{{ object.ref }}: {{ object.subject }}</h2> <h2>Issue #{{ snapshot.ref }}: {{ snapshot.subject }}</h2>
<p>Deleted by <b>{{ changer.get_full_name() }}</b></p> <p>Deleted by <b>{{ changer.get_full_name() }}</b></p>
</td> </td>
</tr> </tr>

View File

@ -1,3 +1,3 @@
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Issue #{{ object.ref }}: {{ object.subject }} - Issue #{{ snapshot.ref }}: {{ snapshot.subject }}
- Deleted by {{ changer.get_full_name() }} - Deleted by {{ changer.get_full_name() }}

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Deleted the issue #{{ object.ref|safe }} "{{ object.subject|safe }}" [{{ project.name|safe }}] Deleted the issue #{{ snapshot.ref|safe }} "{{ snapshot.subject|safe }}"

View File

@ -1,22 +1,24 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("taskboard", object.project.slug, object.slug) %} {% set final_url = resolve_front_url("taskboard", project.slug, snapshot.slug) %}
{% set final_url_name = "Taiga - View milestone #{0}".format(object.slug) %} {% set final_url_name = "Taiga - View milestone #{0}".format(snapshot.slug) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>Milestone #{{ object.slug }}: {{ object.name }}</h2> <h2>Milestone #{{ snapshot.slug }}: {{ snapshot.name }}</h2>
<p>Updated by <b>{{ changer.get_full_name() }}</b>.</p> <p>Updated by <b>{{ changer.get_full_name() }}</b>.</p>
{% if comment %} {% for entry in history_entries%}
<p>Comment <b>{{ comment|linebreaksbr }}</b></p> {% if entry.comment %}
{% endif %} <p>Comment <b>{{ entry.comment|linebreaksbr }}</b></p>
{% if changed_fields %} {% endif %}
<p>Updated fields:</p> {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-html.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-html.jinja" %}
{% endif %}
{% endfor %}
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -1,15 +1,17 @@
{% set final_url = resolve_front_url("taskboard", object.project.slug, object.slug) %} {% set final_url = resolve_front_url("taskboard", project.slug, snapshot.slug) %}
{% set final_url_name = "Taiga - View milestone #{0}".format(object.slug) %} {% set final_url_name = "Taiga - View milestone #{0}".format(snapshot.slug) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Milestone #{{ object.slug }}: {{ object.name }} - Milestone #{{ snapshot.slug }}: {{ snapshot.name }}
- Updated by {{ changer.get_full_name() }} - Updated by {{ changer.get_full_name() }}
{% if comment %} {% for entry in history_entries%}
Comment: {{ comment|linebreaksbr }} {% if entry.comment %}
{% endif %} Comment: {{ entry.comment|linebreaksbr }}
{% if changed_fields %} {% endif %}
- Updated fields: {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-text.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-text.jinja" %}
{% endif %}
{% endfor %}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Updated the milestone #{{ object.slug|safe }} "{{ object.name|safe }}" [{{ project.name|safe }}] Updated the milestone #{{ snapshot.slug|safe }} "{{ snapshot.name|safe }}"

View File

@ -1,14 +1,14 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("taskboard", object.project.slug, object.slug) %} {% set final_url = resolve_front_url("taskboard", project.slug, snapshot.slug) %}
{% set final_url_name = "Taiga - View milestone #{0}".format(object.slug) %} {% set final_url_name = "Taiga - View milestone #{0}".format(snapshot.slug) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>Milestone #{{ object.slug }}: {{ object.name }}</h2> <h2>Milestone #{{ snapshot.slug }}: {{ snapshot.name }}</h2>
<p>Created by <b>{{ changer.get_full_name() }}</b>.</p> <p>Created by <b>{{ changer.get_full_name() }}</b>.</p>
</td> </td>
</tr> </tr>

View File

@ -1,8 +1,8 @@
{% set final_url = resolve_front_url("taskboard", object.project.slug, object.slug) %} {% set final_url = resolve_front_url("taskboard", project.slug, snapshot.slug) %}
{% set final_url_name = "Taiga - View milestone #{0}".format(object.slug) %} {% set final_url_name = "Taiga - View milestone #{0}".format(snapshot.slug) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Milestone #{{ object.slug }}: {{ object.name }} - Milestone #{{ snapshot.slug }}: {{ snapshot.name }}
- Created by {{ changer.get_full_name() }} - Created by {{ changer.get_full_name() }}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Created the milestone #{{ object.slug|safe }} "{{ object.name|safe }}" [{{ project.name|safe }}] Created the milestone #{{ snapshot.slug|safe }} "{{ snapshot.name|safe }}"

View File

@ -4,8 +4,8 @@
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>{{ object.project.name }}</h1> <h1>{{ project.name }}</h1>
<h2>Milestone #{{ object.slug }}: {{ object.name }}</h2> <h2>Milestone #{{ snapshot.slug }}: {{ snapshot.name }}</h2>
<p>Deleted by <b>{{ changer.get_full_name() }}</b></p> <p>Deleted by <b>{{ changer.get_full_name() }}</b></p>
</td> </td>
</tr> </tr>

View File

@ -1,3 +1,3 @@
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Milestone #{{ object.slug }}: {{ object.name }} - Milestone #{{ snapshot.slug }}: {{ snapshot.name }}
- Deleted by {{ changer.get_full_name() }} - Deleted by {{ changer.get_full_name() }}

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Deleted the milestone #{{ object.slug|safe }} "{{ object.name|safe }}" [{{ project.name|safe }}] Deleted the milestone #{{ snapshot.slug|safe }} "{{ snapshot.name|safe }}"

View File

@ -1,21 +1,23 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("project-admin", object.slug) %} {% set final_url = resolve_front_url("project-admin", snapshot.slug) %}
{% set final_url_name = "Taiga - View Project #{0}".format(object.slug) %} {% set final_url_name = "Taiga - View Project #{0}".format(snapshot.slug) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h2>Project #{{ object.slug }}: {{ object.name }}</h2> <h2>Project #{{ snapshot.slug }}: {{ snapshot.name }}</h2>
<p>Updated by <b>{{ changer.get_full_name() }}</b>.</p> <p>Updated by <b>{{ changer.get_full_name() }}</b>.</p>
{% if comment %} {% for entry in history_entries%}
<p>Comment <b>{{ comment|linebreaksbr }}</b></p> {% if entry.comment %}
{% endif %} <p>Comment <b>{{ entry.comment|linebreaksbr }}</b></p>
{% if changed_fields %} {% endif %}
<p>Updated fields:</p> {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-html.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-html.jinja" %}
{% endif %}
{% endfor %}
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -1,16 +1,17 @@
{% set final_url = resolve_front_url("project-admin", object.slug) %} {% set final_url = resolve_front_url("project-admin", snapshot.slug) %}
{% set final_url_name = "Taiga - View Project #{0}".format(object.slug) %} {% set final_url_name = "Taiga - View Project #{0}".format(snapshot.slug) %}
- Project #{{ object.slug }}: {{ object.name }} - Project #{{ snapshot.slug }}: {{ snapshot.name }}
- Updated by {{ changer.get_full_name() }} - Updated by {{ changer.get_full_name() }}
{% if comment %} {% for entry in history_entries%}
Comment: {{ comment|linebreaksbr }} {% if entry.comment %}
{% endif %} Comment: {{ entry.comment|linebreaksbr }}
{% if changed_fields %} {% endif %}
- Updated fields: {% set changed_fields = entry.values_diff %}
{% for field_name, values in changed_fields.items() %} {% for field_name, values in changed_fields.items() %}
* {{ verbose_name(object, field_name) }}</b>: from '{{ values.0 }}' to '{{ values.1 }}'. * {{ verbose_name(object, field_name) }}</b>: from '{{ values.0 }}' to '{{ values.1 }}'.
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endfor %}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.name|safe }}] Updated the project #{{ object.slug|safe }} [{{ snapshot.name|safe }}] Updated the project #{{ snapshot.slug|safe }}

View File

@ -1,12 +1,12 @@
{% set final_url = resolve_front_url("project-admin", object.slug) %} {% set final_url = resolve_front_url("project-admin", snapshot.slug) %}
{% set final_url_name = "Taiga - View Project #{0}".format(object.slug) %} {% set final_url_name = "Taiga - View Project #{0}".format(snapshot.slug) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>Project #{{ object.slug }}: {{ object.name }}</h2> <h2>Project #{{ snapshot.slug }}: {{ snapshot.name }}</h2>
<p>Created by <b>{{ changer.get_full_name() }}</b>.</p> <p>Created by <b>{{ changer.get_full_name() }}</b>.</p>
</td> </td>
</tr> </tr>

View File

@ -1,7 +1,7 @@
{% set final_url = resolve_front_url("project-admin", object.slug) %} {% set final_url = resolve_front_url("project-admin", snapshot.slug) %}
{% set final_url_name = "Taiga - View Project #{0}".format(object.slug) %} {% set final_url_name = "Taiga - View Project #{0}".format(snapshot.slug) %}
- Project #{{ object.slug }}: {{ object.name }} - Project #{{ snapshot.slug }}: {{ snapshot.name }}
- Created by {{ changer.get_full_name() }} - Created by {{ changer.get_full_name() }}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.name|safe }}] Created the project #{{ object.slug|safe }} [{{ snapshot.name|safe }}] Created the project #{{ snapshot.slug|safe }}

View File

@ -4,7 +4,7 @@
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h2>Project #{{ object.slug }}: {{ object.name }}</h2> <h2>Project #{{ snapshot.slug }}: {{ snapshot.name }}</h2>
<p>Deleted by <b>{{ changer.get_full_name() }}</b></p> <p>Deleted by <b>{{ changer.get_full_name() }}</b></p>
</td> </td>
</tr> </tr>

View File

@ -1,2 +1,2 @@
- Project #{{ object.slug }}: {{ object.name }} - Project #{{ snapshot.slug }}: {{ snapshot.name }}
- Deleted by {{ changer.get_full_name() }} - Deleted by {{ changer.get_full_name() }}

View File

@ -1 +1 @@
[{{ object.name|safe }}] Deleted the project #{{ object.slug|safe }} [{{ snapshot.name|safe }}] Deleted the project #{{ snapshot.slug|safe }}

View File

@ -1,22 +1,24 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("task", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("task", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View task #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View task #{0}".format(snapshot.ref) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>Task #{{ object.ref }}: {{ object.subject }}</h2> <h2>Task #{{ snapshot.ref }}: {{ snapshot.subject }}</h2>
<p>Updated by <b>{{ changer.get_full_name() }}</b>.</p> <p>Updated by <b>{{ changer.get_full_name() }}</b>.</p>
{% if comment %} {% for entry in history_entries%}
<p>Comment <b>{{ mdrender(object.project, comment) }}</b></p> {% if entry.comment %}
{% endif %} <p>Comment <b>{{ mdrender(project, entry.comment) }}</b></p>
{% if changed_fields %} {% endif %}
<p>Updated fields:</p> {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-html.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-html.jinja" %}
{% endif %}
{% endfor %}
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -1,15 +1,17 @@
{% set final_url = resolve_front_url("task", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("task", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View task #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View task #{0}".format(snapshot.ref) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Task #{{ object.ref }}: {{ object.subject }} - Task #{{ snapshot.ref }}: {{ snapshot.subject }}
- Updated by {{ changer.get_full_name() }} - Updated by {{ changer.get_full_name() }}
{% if comment %} {% for entry in history_entries%}
Comment: {{ comment|linebreaksbr }} {% if entry.comment %}
{% endif %} Comment: {{ entry.comment|linebreaksbr }}
{% if changed_fields %} {% endif %}
- Updated fields: {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-text.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-text.jinja" %}
{% endif %}
{% endfor %}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Updated the task #{{ object.ref }} "{{ object.subject|safe }}" [{{ project.name|safe }}] Updated the task #{{ snapshot.ref }} "{{ snapshot.subject|safe }}"

View File

@ -1,14 +1,14 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("task", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("task", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View task #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View task #{0}".format(snapshot.ref) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>Task #{{ object.ref }}: {{ object.subject }}</h2> <h2>Task #{{ snapshot.ref }}: {{ snapshot.subject }}</h2>
<p>Created by <b>{{ changer.get_full_name() }}</b>.</p> <p>Created by <b>{{ changer.get_full_name() }}</b>.</p>
</td> </td>
</tr> </tr>

View File

@ -1,8 +1,8 @@
{% set final_url = resolve_front_url("task", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("task", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View task #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View task #{0}".format(snapshot.ref) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Task #{{ object.ref }}: {{ object.subject }} - Task #{{ snapshot.ref }}: {{ snapshot.subject }}
- Created by {{ changer.get_full_name() }} - Created by {{ changer.get_full_name() }}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Created the task #{{ object.ref }} "{{ object.subject|safe }}" [{{ project.name|safe }}] Created the task #{{ snapshot.ref }} "{{ snapshot.subject|safe }}"

View File

@ -4,8 +4,8 @@
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>{{ object.project.name }}</h1> <h1>{{ project.name }}</h1>
<h2>Task #{{ object.ref }}: {{ object.subject }}</h2> <h2>Task #{{ snapshot.ref }}: {{ snapshot.subject }}</h2>
<p>Deleted by <b>{{ changer.get_full_name() }}</b></p> <p>Deleted by <b>{{ changer.get_full_name() }}</b></p>
</td> </td>
</tr> </tr>

View File

@ -1,4 +1,4 @@
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Task #{{ object.ref }}: {{ object.subject }} - Task #{{ snapshot.ref }}: {{ snapshot.subject }}
- Deleted by {{ changer.get_full_name() }} - Deleted by {{ changer.get_full_name() }}

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Deleted the task #{{ object.ref }} "{{ object.subject|safe }}" [{{ project.name|safe }}] Deleted the task #{{ snapshot.ref }} "{{ snapshot.subject|safe }}"

View File

@ -1,22 +1,24 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("userstory", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("userstory", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View US #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View US #{0}".format(snapshot.ref) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>US #{{ object.ref }}: {{ object.subject }}</h2> <h2>US #{{ snapshot.ref }}: {{ snapshot.subject }}</h2>
<p>Updated by <b>{{ changer.get_full_name() }}</b>.</p> <p>Updated by <b>{{ changer.get_full_name() }}</b>.</p>
{% if comment %} {% for entry in history_entries%}
<p>Comment <b>{{ mdrender(object.project, comment)}}</b></p> {% if entry.comment %}
{% endif %} <p>Comment <b>{{ mdrender(project, entry.comment) }}</b></p>
{% if changed_fields %} {% endif %}
<p>Updated fields:</p> {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-html.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-html.jinja" %}
{% endif %}
{% endfor %}
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -1,15 +1,17 @@
{% set final_url = resolve_front_url("userstory", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("userstory", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View US #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View US #{0}".format(snapshot.ref) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- US #{{ object.ref }}: {{ object.subject }} - US #{{ snapshot.ref }}: {{ snapshot.subject }}
- Updated by {{ changer.get_full_name() }} - Updated by {{ changer.get_full_name() }}
{% if comment %} {% for entry in history_entries%}
Comment: {{ comment|linebreaksbr }} {% if entry.comment %}
{% endif %} Comment: {{ entry.comment|linebreaksbr }}
{% if changed_fields %} {% endif %}
- Updated fields: {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-text.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-text.jinja" %}
{% endif %}
{% endfor %}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Updated the US #{{ object.ref }} "{{ object.subject|safe }}" [{{ project.name|safe }}] Updated the US #{{ snapshot.ref }} "{{ snapshot.subject|safe }}"

View File

@ -1,14 +1,14 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("userstory", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("userstory", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View US #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View US #{0}".format(snapshot.ref) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>US #{{ object.ref }}: {{ object.subject }}</h2> <h2>US #{{ snapshot.ref }}: {{ snapshot.subject }}</h2>
<p>Created by <b>{{ changer.get_full_name() }}</b>.</p> <p>Created by <b>{{ changer.get_full_name() }}</b>.</p>
</td> </td>
</tr> </tr>

View File

@ -1,8 +1,8 @@
{% set final_url = resolve_front_url("userstory", object.project.slug, object.ref) %} {% set final_url = resolve_front_url("userstory", project.slug, snapshot.ref) %}
{% set final_url_name = "Taiga - View US #{0}".format(object.ref) %} {% set final_url_name = "Taiga - View US #{0}".format(snapshot.ref) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- US #{{ object.ref }}: {{ object.subject }} - US #{{ snapshot.ref }}: {{ snapshot.subject }}
- Created by {{ changer.get_full_name() }} - Created by {{ changer.get_full_name() }}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Created the US #{{ object.ref }} "{{ object.subject|safe }}" [{{ project.name|safe }}] Created the US #{{ snapshot.ref }} "{{ snapshot.subject|safe }}"

View File

@ -4,8 +4,8 @@
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>{{ object.project.name }}</h1> <h1>{{ project.name }}</h1>
<h2>US #{{ object.ref }}: {{ object.subject }}</h2> <h2>US #{{ snapshot.ref }}: {{ snapshot.subject }}</h2>
<p>Deleted by <b>{{ changer.get_full_name() }}</b></p> <p>Deleted by <b>{{ changer.get_full_name() }}</b></p>
</td> </td>
</tr> </tr>

View File

@ -1,3 +1,3 @@
- Project: {{ object.project.name }} - Project: {{ project.name }}
- US #{{ object.ref }}: {{ object.subject }} - US #{{ snapshot.ref }}: {{ snapshot.subject }}
- Deleted by {{ changer.get_full_name() }} - Deleted by {{ changer.get_full_name() }}

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Deleted the US #{{ object.ref }} "{{ object.subject|safe }}" [{{ project.name|safe }}] Deleted the US #{{ snapshot.ref }} "{{ snapshot.subject|safe }}"

View File

@ -1,22 +1,24 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("wiki", object.project.slug, object.slug) %} {% set final_url = resolve_front_url("wiki", project.slug, snapshot.slug) %}
{% set final_url_name = "Taiga - View Wiki Page '{0}'".format(object.slug) %} {% set final_url_name = "Taiga - View Wiki Page '{0}'".format(snapshot.slug) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>Wiki Page: {{ object.slug }}</h2> <h2>Wiki Page: {{ snapshot.slug }}</h2>
<p>Updated by <b>{{ changer.get_full_name() }}</b>.</p> <p>Updated by <b>{{ changer.get_full_name() }}</b>.</p>
{% if comment %} {% for entry in history_entries%}
<p>Comment <b>{{ mdrender(object.project, comment) }}</b></p> {% if entry.comment %}
{% endif %} <p>Comment <b>{{ mdrender(project, entry.comment) }}</b></p>
{% if changed_fields %} {% endif %}
<p>Updated fields:</p> {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-html.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-html.jinja" %}
{% endif %}
{% endfor %}
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -1,15 +1,17 @@
{% set final_url = resolve_front_url("wiki", object.project.slug, object.slug) %} {% set final_url = resolve_front_url("wiki", project.slug, snapshot.slug) %}
{% set final_url_name = "Taiga - View Wiki Page '{0}'".format(object.slug) %} {% set final_url_name = "Taiga - View Wiki Page '{0}'".format(snapshot.slug) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Wiki Page: {{ object.slug }} - Wiki Page: {{ snapshot.slug }}
- Updated by {{ changer.get_full_name() }} - Updated by {{ changer.get_full_name() }}
{% if comment %} {% for entry in history_entries%}
Comment: {{ comment|linebreaksbr }} {% if entry.comment %}
{% endif %} Comment: {{ entry.comment|linebreaksbr }}
{% if changed_fields %} {% endif %}
- Updated fields: {% set changed_fields = entry.values_diff %}
{% include "emails/includes/fields_diff-text.jinja" %} {% if changed_fields %}
{% endif %} {% include "emails/includes/fields_diff-text.jinja" %}
{% endif %}
{% endfor %}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Updated the Wiki Page "{{ object.slug }}" [{{ project.name|safe }}] Updated the Wiki Page "{{ snapshot.slug }}"

View File

@ -1,14 +1,14 @@
{% extends "emails/base.jinja" %} {% extends "emails/base.jinja" %}
{% set final_url = resolve_front_url("wiki", object.project.slug, object.slug) %} {% set final_url = resolve_front_url("wiki", project.slug, snapshot.slug) %}
{% set final_url_name = "Taiga - View Wiki Page '{0}'".format(object.slug) %} {% set final_url_name = "Taiga - View Wiki Page '{0}'".format(snapshot.slug) %}
{% block body %} {% block body %}
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>Project: {{ object.project.name }}</h1> <h1>Project: {{ project.name }}</h1>
<h2>Wiki Page: {{ object.slug }}</h2> <h2>Wiki Page: {{ snapshot.slug }}</h2>
<p>Created by <b>{{ changer.get_full_name() }}</b>.</p> <p>Created by <b>{{ changer.get_full_name() }}</b>.</p>
</td> </td>
</tr> </tr>

View File

@ -1,8 +1,8 @@
{% set final_url = resolve_front_url("wiki", object.project.slug, object.slug) %} {% set final_url = resolve_front_url("wiki", project.slug, snapshot.slug) %}
{% set final_url_name = "Taiga - View Wiki Page '{0}'".format(object.slug) %} {% set final_url_name = "Taiga - View Wiki Page '{0}'".format(snapshot.slug) %}
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Wiki Page: {{ object.slug }} - Wiki Page: {{ snapshot.slug }}
- Created by {{ changer.get_full_name() }} - Created by {{ changer.get_full_name() }}
** More info at {{ final_url_name }} ({{ final_url }}) ** ** More info at {{ final_url_name }} ({{ final_url }}) **

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Created the Wiki Page "{{ object.slug }}" [{{ project.name|safe }}] Created the Wiki Page "{{ snapshot.slug }}"

View File

@ -4,8 +4,8 @@
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body"> <table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body">
<tr> <tr>
<td> <td>
<h1>{{ object.project.name }}</h1> <h1>{{ project.name }}</h1>
<h2>Wiki Page: {{ object.slug }}</h2> <h2>Wiki Page: {{ snapshot.slug }}</h2>
<p>Deleted by <b>{{ changer.get_full_name() }}</b></p> <p>Deleted by <b>{{ changer.get_full_name() }}</b></p>
</td> </td>
</tr> </tr>

View File

@ -1,3 +1,3 @@
- Project: {{ object.project.name }} - Project: {{ project.name }}
- Wiki Page: {{ object.slug }} - Wiki Page: {{ snapshot.slug }}
- Deleted by {{ changer.get_full_name() }} - Deleted by {{ changer.get_full_name() }}

View File

@ -1 +1 @@
[{{ object.project.name|safe }}] Deleted the Wiki Page "{{ object.slug }}" [{{ project.name|safe }}] Deleted the Wiki Page "{{ snapshot.slug }}"