help_text = _("Email footer text, usually \"CAN SPAM\" compliance, or the physical address of the organization running the website. See <a href=\"http://en.wikipedia.org/wiki/CAN-SPAM_Act_of_2003\">this Wikipedia article</a> for more info."),\r
required=False))\r
\r
+EMAIL_BORDER_COLOR = Setting('EMAIL_BORDER_COLOR', '#e5ebf8', EMAIL_SET, dict(\r
+label = _("Email Border color"),\r
+help_text = _("The outter border color of the email base template"),\r
+required=False))\r
+\r
+EMAIL_PARAGRAPH_STYLE = Setting('EMAIL_PARAGRAPH_STYLE', "color:#333333;font-family:'helvetica neue', arial, Helvetica, sans-serif;line-height:18px;font-size:14px;margin-top:10px;", EMAIL_SET, dict(\r
+label = _("Email Paragraph style"),\r
+help_text = _("A valid css string to be used to style email paragraphs (the P tag)."),\r
+required=False))\r
+\r
+EMAIL_ANCHOR_STYLE = Setting('EMAIL_ANCHOR_STYLE', "text-decoration:none;color:#3060a8;font-weight:bold;", EMAIL_SET, dict(\r
+label = _("Email link style"),\r
+help_text = _("A valid css string to be used to style email links (the A tag)."),\r
+required=False))\r
+\r
+\r
+\r
EMAIL_DIGEST_CONTROL = Setting('EMAIL_DIGEST_CONTROL', None)\r
question = answer.question
question_title = html.mark_safe(question.title)
accepted_by = answer.nstate.accepted.by.username
+ accepted_by_link = html.objlink(answer.nstate.accepted.by, style=settings.EMAIL_ANCHOR_STYLE)
+ answer_author_link = html.objlink(answer.author, style=settings.EMAIL_ANCHOR_STYLE)
+ question_link = html.objlink(question, style=settings.EMAIL_ANCHOR_STYLE)
{% enddeclare %}
{% email %}
- {% subject %}{% blocktrans %}{{ prefix }} New answer to {{ question_title }}{% endblocktrans %}{% endsubject %}
+ {% subject %}{% blocktrans %}{{ prefix }} An answer to {{ question_title }} has been accepted{% endblocktrans %}{% endsubject %}
{% htmlcontent notifications/base.html %}
- {% declare %}
- accepted_by_link = html.objlink(answer.nstate.accepted.by, style=a_style)
- answer_author_link = html.objlink(answer.author, style=a_style)
- question_link = html.objlink(question, style=a_style)
- {% enddeclare %}
<p style="{{ p_style }}">
{% blocktrans %}
{{ accepted_by_link }} has just accepted {{ answer_author_link }}'s answer on his question
{% load extra_filters extra_tags i18n email_tags %}
{% declare %}
- p_style = "color:#333333;font-family:'helvetica neue', arial, Helvetica, sans-serif;line-height:18px;font-size:14px;margin-top:10px;"
- a_style = "text-decoration:none;color:#3060a8;font-weight:bold;"
+ p_style = settings.EMAIL_PARAGRAPH_STYLE
+ a_style = settings.EMAIL_ANCHOR_STYLE
hr_style = "color:#ccc;border:0;height:1px;background-color:#ccc;margin-bottom:20px;"
small_style = "color:#333333;font-family:'Lucida Grande', Trebuchet, Helvetica, sans-serif;font-size:12px;"
- table_style = "border:20px #e5ebf8 solid;margin:10px auto 10px auto;width:750px;text-align:left;"
+ table_style = "border:20px %s solid;margin:10px auto 10px auto;width:750px;text-align:left;" % settings.EMAIL_BORDER_COLOR
{% enddeclare %}
<html>
<head>
question = answer.question
question_title = html.mark_safe(question.title)
safe_body = html.html2text(answer.html)
+ author_link = html.objlink(answer.author, style=settings.EMAIL_ANCHOR_STYLE)
+ question_link = html.objlink(question, style=settings.EMAIL_ANCHOR_STYLE)
{% enddeclare %}
{% email %}
{% subject %}{% blocktrans %}{{ prefix }} New answer to {{ question_title }}{% endblocktrans %}{% endsubject %}
{% htmlcontent notifications/base.html %}
- {% declare %}
- author_link = html.objlink(answer.author, style=a_style)
- question_link = html.objlink(question, style=a_style)
- {% enddeclare %}
<p style="{{ p_style }}">
{% blocktrans %}
{{ author_link }} has just posted a new answer on {{ app_name }} to the question
question_url = question.get_absolute_url()
question_title = html.mark_safe(question.title)
safe_body = html.html2text(comment.comment)
+ author_link = html.objlink(comment.author, style=settings.EMAIL_ANCHOR_STYLE)
+ question_link = html.objlink(question, style=settings.EMAIL_ANCHOR_STYLE)
{% enddeclare %}
{% email %}
{% subject %}{% blocktrans %}{{ prefix }} New comment on {{ question_title }}{% endblocktrans %}{% endsubject %}
{% htmlcontent notifications/base.html %}
- {% declare %}
- author_link = html.objlink(comment.author, style=a_style)
- question_link = html.objlink(question, style=a_style)
- {% enddeclare %}
<p style="{{ p_style }}">
{% blocktrans %}{{ author_link }} has just posted a comment on {% endblocktrans %}
{% ifnotequal post question %}
app_url = settings.APP_URL
newmember_name = newmember.username
newmember_url = newmember.get_profile_url()
+ newmember_link = html.objlink(newmember, style=settings.EMAIL_ANCHOR_STYLE)
{% enddeclare %}
{% email %}
{% subject %}{% blocktrans %}{{ prefix }}{{ newmember_name }} is a new member on {{ app_name }}{% endblocktrans %}{% endsubject %}
{% htmlcontent notifications/base.html %}
- {% declare %}
- newmember_link = html.objlink(newmember, style=a_style)
- {% enddeclare %}
<p style="{{ p_style }}">
{% blocktrans %}
{{ newmember_link }} has just joined {{ app_name }}. You can visit {{ newmember_name }}'s profile using the following link: <br />
question_title = question.title
question_tags = question.tagnames
safe_body = html.html2text(question.html)
+ author_link = html.objlink(question.author, style=settings.EMAIL_ANCHOR_STYLE)
+ question_link = html.objlink(question, style=settings.EMAIL_ANCHOR_STYLE)
+ tag_links = html.mark_safe(" ".join([html.objlink(t, style=settings.EMAIL_ANCHOR_STYLE) for t in question.tags.all()]))
{% enddeclare %}
{% email %}
{% subject %}{% blocktrans %}{{ prefix }} New question on {{ app_name }}{% endblocktrans %}{% endsubject %}
{% htmlcontent notifications/base.html %}
- {% declare %}
- author_link = html.objlink(question.author, style=a_style)
- question_link = html.objlink(question, style=a_style)
- tag_links = html.mark_safe(" ".join([html.objlink(t, style=a_style) for t in question.tags.all()]))
- {% enddeclare %}
-
<p style="{{ p_style }}">
{% blocktrans %}
{{ author_link }} has just posted a new question on {{ app_name }}, entitled