1 {% load i18n extra_tags email_tags %}
 
   4     prefix = html.mark_safe(smart_str(settings.EMAIL_SUBJECT_PREFIX))
 
   5     app_name = smart_unicode(settings.APP_SHORT_NAME)
 
   6     app_url = settings.APP_URL
 
   8     new_member_links = html.mark_safe(smart_unicode(", ".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             new_questions_link = html.hyperlink(smart_unicode(app_url) + reverse('questions') + '?sort=' + _('latest'), smart_unicode(_('new questions')), style=a_style)
 
  19             user_questions = digest.get_for_user(recipient)
 
  20             subscribed_url = '%s%s' % (app_url, recipient.get_subscribed_url())
 
  21             subscriptions_link = html.hyperlink(subscribed_url, _('subscriptions'), style=a_style)
 
  24         <p style="{{ p_style }}">
 
  26             This is a brief of what's going on the {{ app_name }} community since our last update.
 
  30         {% if new_member_count %}
 
  31         <p style="{{ p_style }}">
 
  32         {% if show_all_users %}
 
  34             There are {{ new_member_count }} new members in the community. {{ new_member_links }} were the most active so far.
 
  38             {{ new_member_links }} have joined the {{ app_name }} community.
 
  44         {% if new_question_count %}
 
  46         <p style="{{ p_style }}">
 
  48             {{ new_question_count }} {{ new_questions_link }} were posted since our last update.
 
  52         {% if user_questions.interesting %}
 
  53         <p style="{{ p_style }}">
 
  54             {% trans "We think you might like the following questions:" %}
 
  57         {% for q in user_questions.interesting %}
 
  59                 <a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url  }}">{{ q.title }}</a>
 
  65         {% if user_questions.may_help %}
 
  66         <p style="{{ p_style }}">
 
  67             {% trans "These new questions didn't get many attention from the community, but we think you may be able to help:" %}
 
  70         {% for q in user_questions.may_help %}
 
  72                 <a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url  }}">{{ q.title }}</a>
 
  77         {% if user_questions.subscriptions %}
 
  78         <p style="{{ p_style }}">
 
  79             {% blocktrans %}Meanwhile, some of your {{ subscriptions_link }} have new updates since you last visited them:{% endblocktrans %}
 
  82         {% for q in user_questions.subscriptions %}
 
  84                 <a style="{{ a_style }}" href="{{ app_url }}{{ q.get_absolute_url  }}">{{ q.title }}</a>
 
  94         {% if recipient.is_superuser %}
 
  96             flagged_url = html.hyperlink(smart_unicode(app_url + reverse('admin_flagged_posts')), smart_unicode(str(flagged_count) + ' ' + _('posts')), style=a_style)
 
  98         <p style="{{ p_style }}">
 
 100             {{ flagged_url }} have been marked as flagged.
 
 107 {% textcontent notifications/base_text.html %}
 
 108 {% blocktrans %}This is a brief of what's going on the {{ app_name }} community since our last update.{% endblocktrans %}
 
 110 {% if new_member_count %}
 
 111 {% if show_all_users %}
 
 112 {% blocktrans %}There are {{ new_member_count }} new members in the community. {{ new_member_links }} were the most active so far.{% endblocktrans %}
 
 114 {% blocktrans %}{{ new_member_links }} have joined the {{ app_name }} community.{% endblocktrans %}
 
 118 {% if new_question_count %}
 
 119 {% blocktrans %}{{ new_question_count }} new questions were posted since our last update.{% endblocktrans %}
 
 121 {% if user_questions.interesting %}{% trans "We think you might like the following questions:" %}
 
 122 {% for q in user_questions.interesting %}
 
 127 {% if user_questions.may_help %}
 
 128 {% trans "These new questions didn't get many attention from the community, but we think you may be able to help:" %}
 
 129 {% for q in user_questions.may_help %}
 
 133 {% if user_questions.subscriptions %}
 
 134 {% blocktrans %}Meanwhile, some of your subscriptions have new updates since you last visited them:{% endblocktrans %}
 
 135 {% for q in user_questions.subscriptions %}
 
 142 {% if recipient.is_superuser %}
 
 143 {% blocktrans %}{{ flagged_count }} posts have been marked as flagged.{% endblocktrans %}