1 {% load i18n extra_tags email_tags %}
4 prefix = html.mark_safe(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 %}
17 <p style="{{ p_style }}">
19 This is a brief of what's going on the {{ app_name }} community since our last update.
23 {% if new_member_count %}
24 <p style="{{ p_style }}">
25 {% if show_all_users %}
27 There are {{ new_member_count }} new members in the community. {{ new_member_links }} were the most active so far.
31 {{ new_member_links }} have joined the {{ app_name }} community.
37 {% if new_question_count %}
40 new_questions_link = html.hyperlink(app_url + reverse('questions') + '?sort=' + _('latest'), _('new questions'), style=a_style)
41 user_questions = digest.get_for_user(recipient)
42 subscriptions_link = html.hyperlink(app_url + recipient.get_subscribed_url(), _('subscriptions'), style=a_style)
45 <p style="{{ p_style }}">
47 {{ new_question_count }} {{ new_questions_link }} were posted since our last update.
51 {% if user_questions.interesting %}
52 <p style="{{ p_style }}">
53 {% trans "We think you might like the following questions:" %}
56 {% for q in user_questions.interesting %}
58 <a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url }}">{{ q.title }}</a>
64 {% if user_questions.may_help %}
65 <p style="{{ p_style }}">
66 {% trans "These new questions didn't get many attention from the community, but we think you may be able to help:" %}
69 {% for q in user_questions.may_help %}
71 <a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url }}">{{ q.title }}</a>
76 {% if user_questions.subscriptions %}
77 <p style="{{ p_style }}">
78 {% blocktrans %}Meanwhile, some of your {{ subscriptions_link }} have new updates since you last visited them:{% endblocktrans %}
81 {% for q in user_questions.subscriptions %}
83 <a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url }}">{{ q.title }}</a>
95 {% textcontent notifications/base_text.html %}