diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-06-03 18:50:56 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-06-03 18:50:56 -0400 |
commit | e5ea67fd5ec4d15a217689faa216a01814f55748 (patch) | |
tree | ce81c570147578cb831ef883d5ad9e779775e53c /forum/skins/default/templates/instant_notification.html | |
parent | 02247d157b3da4d0711b8858bf758aefdf64c04d (diff) | |
download | askbot-e5ea67fd5ec4d15a217689faa216a01814f55748.tar.gz askbot-e5ea67fd5ec4d15a217689faa216a01814f55748.tar.bz2 askbot-e5ea67fd5ec4d15a217689faa216a01814f55748.zip |
created instant notification template and the formatting function
Diffstat (limited to 'forum/skins/default/templates/instant_notification.html')
-rw-r--r-- | forum/skins/default/templates/instant_notification.html | 84 |
1 files changed, 37 insertions, 47 deletions
diff --git a/forum/skins/default/templates/instant_notification.html b/forum/skins/default/templates/instant_notification.html index 856e6676..b860ab02 100644 --- a/forum/skins/default/templates/instant_notification.html +++ b/forum/skins/default/templates/instant_notification.html @@ -1,54 +1,44 @@ -{% comment %} -Called from forum.models.__init__.maybe_send_instant_notifications() -Template paramaters: - -receiving_user - User -update_author - User -updated_post - Comment|Answer|Question -related_origin_post - origin post related to the update -update_url - absolute url (including http://... to updated post -update_type - question_comment|answer_comment|answer_update|question_update -revision_number - integer (first revision is 1) -admin_email - email of forum administrator -email_settings_url - url of user's email settings -{% endcomment %} {% load i18n %} {% load smart_if %} -{% blocktrans with receiving_user.username as user_name %}Dear {{user_name}},{% endblocktrans %} -{% if update_type == 'question_comment' or update_type == 'answer_comment' %} -{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %} -{{author_link}} has left a new <a href="{{update_url}}">comment</a> -related to question <a href="{{origin_post_url}}">{{origin_post_title}}</a> +{% blocktrans %}<p>Dear {{receiving_user_name}},</p>{% endblocktrans %} +<p></p> + {% if update_type == 'question_comment' %} +{% blocktrans %} +<p>{{update_author_name}} left a <a href="%{{post_url}}">new comment</a> +for question "{{origin_post_title}}"</p> {% endblocktrans %} -{% endif %} -{% if update_type == 'answer_update' %} -{% if revision_number == 1 %} -{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %} -{{author_link}} posted <a href="{{update_url}}">a new answer</a> -to question <a href="{{origin_post_url}}">{{origin_post_title}}</a> + {% endif %} + {% if update_type == 'answer_comment' %} +{% blocktrans %} +<p>{{update_author_name}} left a <a href="{{post_url}}">new comment</a> + for an answer to question "{{origin_post_title}}"</p> {% endblocktrans %} -{% else %} -{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %} -{{author_link}} updated <a href="{{update_url}}">an answer</a> -to question <a href="{{origin_post_url}}">{{origin_post_title}}</a> + {% endif %} + {% if update_type == 'new_answer' %} +{% blocktrans %} +<p>{{update_author_name}} answered a question +<a href="{{post_url}}">{{origin_post_title}}</a></p> {% endblocktrans %} -{% endif %} -{% endif %} -{% if update_type == 'question_update' %} -{% if revision_number == 1 %} -{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %} -{{author_link}} asked a new question <a href="{{origin_post_url}}">{{origin_post_title}}</a> + {% endif %} + {% if update_type == 'new_question' %} +{% blocktrans %} +<p>{{update_author_name}} asked a question +<a href="{{post_url}}">{{origin_post_title}}</a></p> {% endblocktrans %} -{% else %} -{% blocktrans with post_author.get_profile_link as author_link and related_origin_post.get_absolute_url as origin_post_url and related_origin_post.title as origin_post_title %} -{{author_link}} updated the question <a href="{{origin_post_url}}">{{origin_post_title}}</a> + {%if update_type == 'answer_update' %} +{% blocktrans %} +<p>{{update_author_name}} updated an answer to the question +<a href="{{post_url}}">{{origin_post_title}}</a></p> {% endblocktrans %} -{% endif %} -{% endif %} - -{% trans "Please take a look." %} - -{% blocktrans %}Sincerely, -Forum Administrator{% endblocktrans %} - -{% blocktrans %}go to {{email_settings_url}} to change frequency of email updates or {{admin_email}} administrator{% endblocktrans %} + {% if update_type == 'question_update' %} +{% blocktrans %} +<p>{{update_author_name}} updated a question +<a href="{{post_url}}">{{origin_post_title}}</a></p> +{% endblocktrans %} + {% endif %} +<p></p> +{% blocktrans %} +<p>Please note - you can easily <a href="{{user_subscriptions_url}}">change</a> +how often you receive these notifications.</p> +{% endblocktrans %} +{% trans "<p>Sincerely,<br/>Forum Administrator</p>" %} |