From 33a57fbcb64049a817998411e01cc37cc5315e75 Mon Sep 17 00:00:00 2001 From: Adolfo Fitoria Date: Tue, 18 Sep 2012 14:55:18 -0600 Subject: initial work for email templates --- .../default/templates/email/ask_for_signature.html | 13 ++++++++--- .../email/insufficient_rep_to_post_by_email.html | 9 ++++++-- .../email/notify_admins_about_new_tags.html | 26 +++++++++++++++------- .../email/notify_author_about_approved_post.html | 11 ++++++++- .../default/templates/email/post_as_subthread.html | 6 +++++ .../skins/default/templates/email/quoted_post.html | 6 +++++ .../templates/email/re_welcome_lamson_on.html | 12 +++++++--- .../templates/email/reply_by_email_error.html | 7 ++++++ 8 files changed, 73 insertions(+), 17 deletions(-) diff --git a/askbot/skins/default/templates/email/ask_for_signature.html b/askbot/skins/default/templates/email/ask_for_signature.html index 93e2fa4b..ee4a1311 100644 --- a/askbot/skins/default/templates/email/ask_for_signature.html +++ b/askbot/skins/default/templates/email/ask_for_signature.html @@ -1,12 +1,19 @@ +{% extends "email/base_mail.html"%} {% import "email/macros.html" as macros %} -

- {% trans user=username|escape %}{{ user }}, please reply to this message.{% endtrans %} -

+{%block headline%} +{% trans user=username|escape %}{{ user }}, please reply to this message.{% endtrans %} +{% endblock %} + +{%block content %}

{% trans %}Your post could not be published, because we could not detect signature in your email.{% endtrans %}
{% trans %}This happened either because this is your first post or you have changed your email signature.{% endtrans %}
{% trans %}Please make a simple response, without editing this message.{% endtrans %}
{% trans %}We will then attempt to detect the signature in your response and you should be able to post.{% endtrans %}

+{% endblock %} + +{%block footer %} {% include "email/footer.html" %}

{{ footer_code }}

+{% endblock %} diff --git a/askbot/skins/default/templates/email/insufficient_rep_to_post_by_email.html b/askbot/skins/default/templates/email/insufficient_rep_to_post_by_email.html index 284cc1b0..a7e88b3b 100644 --- a/askbot/skins/default/templates/email/insufficient_rep_to_post_by_email.html +++ b/askbot/skins/default/templates/email/insufficient_rep_to_post_by_email.html @@ -1,3 +1,4 @@ +{% extends "email/base_mail.html"%} {% import "email/macros.html" as macros %} {# parameters: * min_upvotes @@ -5,11 +6,15 @@ * site_name - for the footer * site_link - html for the link #} -

+{%block headline%} {% trans user=username|escape %}{{ username }}, your question could not be posted by email just yet.{% endtrans %} -

+{%endblock%} +{%block content%}

{% trans %}To make posts by email, you need to receive about {{min_upvotes}} upvotes.{% endtrans %}
{% trans link=site_link|safe %}At this time, please post your question at {{link}}{% endtrans %}

+{%endblock%} +{%block footer} {% include "email/footer.html" %} +{%endblock%} diff --git a/askbot/skins/default/templates/email/notify_admins_about_new_tags.html b/askbot/skins/default/templates/email/notify_admins_about_new_tags.html index 9aaaffc2..dd37bb34 100644 --- a/askbot/skins/default/templates/email/notify_admins_about_new_tags.html +++ b/askbot/skins/default/templates/email/notify_admins_about_new_tags.html @@ -1,8 +1,18 @@ -

Hello,

-

Please have a look at these new tags {{tags|join(', ')}}, -created by {{user.username}}.

-

If you decide not to use the tags, please reply to this email -to the user

-

Otherwise, please visit the question -and apply the tags

-

Thank you.

+{% extends "email/base_mail.html"%} +{%block headline%} + {%trans %}Hello{%endtrans%} +{% endblock %} + +{%block content %} +

{% trans %}Please have a look at these new tags {{tags|join(', ')}}, + created by {{user.username}}.{% endtrans %}

+

{% trans %}If you decide not to use the tags, please reply to this email + to the user {% endtrans %}

+

{%trans%}Otherwise, please visit the question + and apply the tags{%endtrans%}

+

{%trans%}Thank you.{%endtrans%}

+{% endblock %} + +{%block footer %} +{% include "email/footer.html" %} +{% endblock %} diff --git a/askbot/skins/default/templates/email/notify_author_about_approved_post.html b/askbot/skins/default/templates/email/notify_author_about_approved_post.html index 085141d9..24601775 100644 --- a/askbot/skins/default/templates/email/notify_author_about_approved_post.html +++ b/askbot/skins/default/templates/email/notify_author_about_approved_post.html @@ -1,3 +1,5 @@ +{% extends "email/base_mail.html"%} + {# parameters: * reply_separator_line @@ -6,6 +8,8 @@ * post * reply_code (comma-separated list of emails to respond to this message) #} + +{%block content %} {{ reply_separator_line }}

{% trans post_text = post.text|safe_urlquote, @@ -18,4 +22,9 @@

{{ post.thread.title }}

{% endif %} {{ post.html }} -

{{ reply_code }}

+{% endblock %} + +{%block footer %} +{% include "email/footer.html" %} +

{{ email_code }}

{# important #} +{% endblock %} diff --git a/askbot/skins/default/templates/email/post_as_subthread.html b/askbot/skins/default/templates/email/post_as_subthread.html index 9b6eb728..cba5a3fd 100644 --- a/askbot/skins/default/templates/email/post_as_subthread.html +++ b/askbot/skins/default/templates/email/post_as_subthread.html @@ -1,4 +1,7 @@ +{% extends "email/base_mail.html"%} {% from "email/macros.html" import quoted_post %} + +{%block content %} {% if post.post_type in ('question', 'answer') %} {{ quoted_post(post) }} {% set comments = post.get_cached_comments() %} @@ -15,3 +18,6 @@ {% endfor %} {% endif %} {% endif %} +{% endblock %} +{% include "email/footer.html" %} +{% endblock %} diff --git a/askbot/skins/default/templates/email/quoted_post.html b/askbot/skins/default/templates/email/quoted_post.html index ecc20ad9..f3015f20 100644 --- a/askbot/skins/default/templates/email/quoted_post.html +++ b/askbot/skins/default/templates/email/quoted_post.html @@ -1,5 +1,11 @@ +{% extends "email/base_mail.html"%} {% from "email/macros.html" import quoted_post %} +{%block content %} {{ quoted_post( post, quote_level, is_leaf_post = is_leaf_post, format = format ) }} +{% endblock %} +{%block footer %} +{% include "email/footer.html" %} +{% endblock %} diff --git a/askbot/skins/default/templates/email/re_welcome_lamson_on.html b/askbot/skins/default/templates/email/re_welcome_lamson_on.html index 412fede8..d2c7884c 100644 --- a/askbot/skins/default/templates/email/re_welcome_lamson_on.html +++ b/askbot/skins/default/templates/email/re_welcome_lamson_on.html @@ -1,7 +1,13 @@ -

- {% trans %}Great, you are ready to use {{ site_name }}!{% endtrans %} -

+{% extends "email/base_mail.html"%} +{% block headline %}{% trans %}Great, you are ready to use {{ site_name }}!{% endtrans %}{%endblock%} +{% block title %}{% trans %}Great, you are ready to use {{ site_name }}!{% endtrans %}{%endblock%} + +{%block content %}

{% trans %}You can post questions by emailing them at {{ ask_address }}.{% endtrans %}

{% trans %}When you receive update notifications, you will be able to respond to them, also by email.{% endtrans %}

{% trans %}Of course, you can always visit the {{ site_name }} at {{ site_url }}{% endtrans %}

+{%endblock%} + +{%block footer%} {% include "email/footer.html" %} +{%endblock%} diff --git a/askbot/skins/default/templates/email/reply_by_email_error.html b/askbot/skins/default/templates/email/reply_by_email_error.html index 53648184..618e061a 100644 --- a/askbot/skins/default/templates/email/reply_by_email_error.html +++ b/askbot/skins/default/templates/email/reply_by_email_error.html @@ -1,4 +1,11 @@ +{% extends "email/base_mail.html"%} +{%block headline%}{% trans %}Oops, there was an error.{% endblock %} +{%block content %} {% trans %}

The system was unable to process your message successfully, the reason being:

{% endtrans %} {{error}} +{% endblock %} +{%block footer %} +{% include "email/footer.html" %} +{% endblock %} -- cgit v1.2.3-1-g7c22