summaryrefslogtreecommitdiffstats
path: root/forum/skins/default/templates/instant_notification.html
blob: 3f4da46764c0f37d81196020148294442f96822e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{% comment %}
Called from forum.models.__init__.maybe_send_instant_notifications()
Template paramaters:

receiving_user - User
update_author - User
updated_post - Comment|Answer|Question
related_origin_post - origin post related to the update
update_url - absolute url (including http://... to updated post
update_type - question_comment|answer_comment|answer_update|question_update
revision_number - integer (first revision is 1)
admin_email - email of forum administrator
email_settings_url - url of user's email settings
{% endcomment %}
{% load i18n %} 
{% load smart_if %}
{% blocktrans with receiving_user.get_best_name as user_name %}Dear {{user_name}},{% endblocktrans %}

{% if update_type == 'question_comment' or update_type == 'answer_comment' %}
{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %}
{{author_link}} has left a new <a href="{{update_url}}">comment</a>
related to question <a href="{{origin_post_url}}">{{origin_post_title}}</a>
{% endblocktrans %}
{% endif %}
{% if update_type == 'answer_update' %}
{% if revision_number == 1 %}
{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %}
{{author_link}} posted <a href="{{update_url}}">a new answer</a>
to question <a href="{{origin_post_url}}">{{origin_post_title}}</a>
{% endblocktrans %}
{% else %}
{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %}
{{author_link}} updated <a href="{{update_url}}">an answer</a>
to question <a href="{{origin_post_url}}">{{origin_post_title}}</a>
{% endblocktrans %}
{% endif %}
{% endif %}
{% if update_type == 'question_update' %}
{% if revision_number == 1 %}
{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %}
{{author_link}} asked a new question <a href="{{origin_post_url}}">{{origin_post_title}}</a>
{% endblocktrans %}
{% else %}
{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %}
{{author_link}} updated the question <a href="{{origin_post_url}}">{{origin_post_title}}</a>
{% endblocktrans %}
{% endif %}
{% endif %}

{% trans "Please take a look." %}

{% blocktrans %}Sincerely,
Forum Administrator{% endblocktrans %}

{% blocktrans %}go to {{email_settings_url}} to change frequency of email updates or {{admin_email}} administrator{% endblocktrans %}