Fix bug #1186: Fixed emails sent when a wiki page is updated
parent
55c3e0c7cf
commit
674902eb7d
|
@ -111,6 +111,15 @@ class HistoryEntry(models.Model):
|
||||||
if description_diff:
|
if description_diff:
|
||||||
key = "description_diff"
|
key = "description_diff"
|
||||||
value = (None, description_diff)
|
value = (None, description_diff)
|
||||||
|
elif key == "content":
|
||||||
|
content_diff = get_diff_of_htmls(
|
||||||
|
self.diff[key][0],
|
||||||
|
self.diff[key][1]
|
||||||
|
)
|
||||||
|
|
||||||
|
if content_diff:
|
||||||
|
key = "content_diff"
|
||||||
|
value = (None, content_diff)
|
||||||
elif key in users_keys:
|
elif key in users_keys:
|
||||||
value = [resolve_value("users", x) for x in self.diff[key]]
|
value = [resolve_value("users", x) for x in self.diff[key]]
|
||||||
elif key == "watchers":
|
elif key == "watchers":
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{% set excluded_fields = [
|
{% set excluded_fields = [
|
||||||
"description",
|
"description",
|
||||||
"description_html"
|
"description_html",
|
||||||
|
"content",
|
||||||
|
"content_html"
|
||||||
] %}
|
] %}
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
|
@ -94,7 +96,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>to:</b> <i>{{ mdrender(object.project, values.1) }}</i>
|
<b>diff:</b> <i>{{ mdrender(object.project, values.1) }}</i>
|
||||||
|
</dd>
|
||||||
|
{# CONTENT #}
|
||||||
|
{% elif field_name in ["content_diff"] %}
|
||||||
|
<dd style="background: #eee; padding: 5px 15px; color: #444">
|
||||||
|
<b>diff:</b> <i>{{ mdrender(object.project, values.1) }}</i>
|
||||||
</dd>
|
</dd>
|
||||||
{# ASSIGNED TO #}
|
{# ASSIGNED TO #}
|
||||||
{% elif field_name == "assigned_to" %}
|
{% elif field_name == "assigned_to" %}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{% set excluded_fields = [
|
{% set excluded_fields = [
|
||||||
"description_diff",
|
"description_diff",
|
||||||
"description_html"
|
"description_html",
|
||||||
|
"content_diff",
|
||||||
|
"content_html"
|
||||||
] %}
|
] %}
|
||||||
{% for field_name, values in changed_fields.items() %}
|
{% for field_name, values in changed_fields.items() %}
|
||||||
{% if field_name not in excluded_fields %}
|
{% if field_name not in excluded_fields %}
|
||||||
|
|
|
@ -23,6 +23,7 @@ register = library.Library()
|
||||||
|
|
||||||
EXTRA_FIELD_VERBOSE_NAMES = {
|
EXTRA_FIELD_VERBOSE_NAMES = {
|
||||||
"description_diff": _("description"),
|
"description_diff": _("description"),
|
||||||
|
"content_diff": _("content")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue