X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/d72e2bf6337cfb556c2ab8e31477a1afa1ed6a6e..HEAD:/forum/skins/default/templates/notifications/digest.html diff --git a/forum/skins/default/templates/notifications/digest.html b/forum/skins/default/templates/notifications/digest.html index 95ce064..91757b8 100644 --- a/forum/skins/default/templates/notifications/digest.html +++ b/forum/skins/default/templates/notifications/digest.html @@ -1,11 +1,11 @@ {% load i18n extra_tags email_tags %} {% declare %} - prefix = settings.EMAIL_SUBJECT_PREFIX - app_name = settings.APP_SHORT_NAME + 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(", ".join([html.objlink(u, style=settings.EMAIL_ANCHOR_STYLE) for u in new_members])) + 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 %} @@ -14,6 +14,13 @@ {% 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 %} +

{% blocktrans %} This is a brief of what's going on the {{ app_name }} community since our last update. @@ -36,12 +43,6 @@ {% if new_question_count %} - {% declare %} - new_questions_link = html.hyperlink(app_url + reverse('questions') + '?sort=latest', _('new questions'), style=a_style) - user_questions = digest.get_for_user(recipient) - subscriptions_link = html.hyperlink(app_url + recipient.get_subscribed_url(), _('subscriptions'), style=a_style) - {% enddeclare %} -

{% blocktrans %} {{ new_question_count }} {{ new_questions_link }} were posted since our last update. @@ -90,9 +91,56 @@ {% endif %} - {% endhtmlcontent %} + {% 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 %} +

+ {% blocktrans %} + {{ flagged_url }} have been marked as flagged. + {% endblocktrans %} +

+ {% endif %} - {% textcontent notifications/base_text.html %} + {% endhtmlcontent %} - {% endtextcontent %} -{% endemail %} \ No newline at end of file +{% 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 %}