1 {% load i18n extra_tags email_tags %}
4 prefix = settings.EMAIL_SUBJECT_PREFIX
5 app_name = settings.APP_SHORT_NAME
6 app_url = settings.APP_URL
8 new_member_links = html.mark_safe(", ".join([html.objlink(u, style=settings.EMAIL_ANCHOR_STYLE) for u in new_members]))
9 new_question_count = digest.count
14 {% subject %}{% blocktrans %}{{ prefix }} Daily digest{% endblocktrans %}{% endsubject %}
16 {% htmlcontent notifications/base.html %}
18 This is a brief of what's going on the {{ app_name }} community since our last update.
21 {% if new_member_count %}
22 <p style="{{ p_style }}">
23 {% if show_all_users %}
25 There are {{ new_member_count }} new members in the community. {{ new_member_links }} were the most active so far.
29 {{ new_member_links }} have joined the {{ app_name }} community.
35 {% if new_question_count %}
38 new_questions_link = html.hyperlink(app_url + reverse('questions') + '?sort=latest', _('new questions'), style=a_style)
39 user_questions = digest.get_for_user(recipient)
40 subscriptions_link = html.hyperlink(app_url + recipient.get_subscribed_url(), _('subscriptions'), style=a_style)
43 <p style="{{ p_style }}">
45 {{ new_question_count }} {{ new_questions_link }} were posted since our last update.
49 {% if user_questions.interesting %}
50 <p style="{{ p_style }}">
51 {% trans "We think you might like the following questions:" %}
54 {% for q in user_questions.interesting %}
56 <a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url }}">{{ q.title }}</a>
62 {% if user_questions.may_help %}
63 <p style="{{ p_style }}">
64 {% trans "These new questions didn't get many attention from the community, but we think you may be able to help:" %}
67 {% for q in user_questions.may_help %}
69 <a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url }}">{{ q.title }}</a>
74 {% if user_questions.subscriptions %}
75 <p style="{{ p_style }}">
76 {% blocktrans %}Meanwhile, some of your {{ subscriptions_link }} have new updates since you last visited them:{% endblocktrans %}
79 {% for q in user_questions.subscriptions %}
81 <a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url }}">{{ q.title }}</a>
93 {% textcontent notifications/base_text.html %}