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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{% load i18n extra_tags email_tags %}
{% declare %}
prefix = html.mark_safe(smart_str(settings.EMAIL_SUBJECT_PREFIX))
app_name = smart_unicode(settings.APP_SHORT_NAME)
app_url = settings.APP_URL
new_member_links = html.mark_safe(smart_unicode(", ".join([html.objlink(u, style=settings.EMAIL_ANCHOR_STYLE) for u in new_members])))
new_question_count = digest.count
{% enddeclare %}
{% email %}
{% subject %}{% blocktrans %}{{ prefix }} Daily digest{% endblocktrans %}{% endsubject %}
{% htmlcontent notifications/base.html %}
{% declare %}
new_questions_link = html.hyperlink(smart_unicode(app_url) + reverse('questions') + '?sort=' + _('latest'), smart_unicode(_('new questions')), style=a_style)
user_questions = digest.get_for_user(recipient)
subscribed_url = '%s%s' % (app_url, recipient.get_subscribed_url())
subscriptions_link = html.hyperlink(subscribed_url, _('subscriptions'), style=a_style)
{% enddeclare %}
<p style="{{ p_style }}">
{% blocktrans %}
This is a brief of what's going on the {{ app_name }} community since our last update.
{% endblocktrans %}
</p>
{% if new_member_count %}
<p style="{{ p_style }}">
{% if show_all_users %}
{% blocktrans %}
There are {{ new_member_count }} new members in the community. {{ new_member_links }} were the most active so far.
{% endblocktrans %}
{% else %}
{% blocktrans %}
{{ new_member_links }} have joined the {{ app_name }} community.
{% endblocktrans %}
{% endif %}
{% endif %}
</p>
{% if new_question_count %}
<p style="{{ p_style }}">
{% blocktrans %}
{{ new_question_count }} {{ new_questions_link }} were posted since our last update.
{% endblocktrans %}
</p>
{% if user_questions.interesting %}
<p style="{{ p_style }}">
{% trans "We think you might like the following questions:" %}
</p>
<ul>
{% for q in user_questions.interesting %}
<li>
<a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url }}">{{ q.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if user_questions.may_help %}
<p style="{{ p_style }}">
{% trans "These new questions didn't get many attention from the community, but we think you may be able to help:" %}
</p>
<ul>
{% for q in user_questions.may_help %}
<li>
<a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url }}">{{ q.title }}</a>
</li>
{% endfor %}
</ul>
{% if user_questions.subscriptions %}
<p style="{{ p_style }}">
{% blocktrans %}Meanwhile, some of your {{ subscriptions_link }} have new updates since you last visited them:{% endblocktrans %}
</p>
<ul>
{% for q in user_questions.subscriptions %}
<li>
<a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url }}">{{ q.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% endif %}
{% if recipient.is_superuser %}
{% declare %}
flagged_url = html.hyperlink(smart_unicode(app_url + reverse('admin_flagged_posts')), smart_unicode(str(flagged_count) + ' ' + _('posts')), style=a_style)
{% enddeclare %}
<p style="{{ p_style }}">
{% blocktrans %}
{{ flagged_url }} have been marked as flagged.
{% endblocktrans %}
</p>
{% endif %}
{% endhtmlcontent %}
{% textcontent notifications/base_text.html %}
{% blocktrans %}This is a brief of what's going on the {{ app_name }} community since our last update.{% endblocktrans %}
{% if new_member_count %}
{% if show_all_users %}
{% blocktrans %}There are {{ new_member_count }} new members in the community. {{ new_member_links }} were the most active so far.{% endblocktrans %}
{% else %}
{% blocktrans %}{{ new_member_links }} have joined the {{ app_name }} community.{% endblocktrans %}
{% endif %}
{% endif %}
{% if new_question_count %}
{% blocktrans %}{{ new_question_count }} new questions were posted since our last update.{% endblocktrans %}
{% if user_questions.interesting %}{% trans "We think you might like the following questions:" %}
{% for q in user_questions.interesting %}
* {{ q.title }}
{% endfor %}
{% endif %}
{% if user_questions.may_help %}
{% trans "These new questions didn't get many attention from the community, but we think you may be able to help:" %}
{% for q in user_questions.may_help %}
* {{ q.title }}
{% endfor %}
{% if user_questions.subscriptions %}
{% blocktrans %}Meanwhile, some of your subscriptions have new updates since you last visited them:{% endblocktrans %}
{% for q in user_questions.subscriptions %}
* {{ q.title }}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
{% if recipient.is_superuser %}
{% blocktrans %}{{ flagged_count }} posts have been marked as flagged.{% endblocktrans %}
{% endif %}
{% endtextcontent %}
{% endemail %}