]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/notifications/newquestion.html
Adds a couple of settings for email customization.
[osqa.git] / forum / skins / default / templates / notifications / newquestion.html
1 {% load i18n extra_tags email_tags %}
2
3 {% declare %}
4     prefix = settings.EMAIL_SUBJECT_PREFIX
5     app_name = settings.APP_SHORT_NAME
6     question_author = question.author.username
7     question_url = settings.APP_URL + question.get_absolute_url()
8     question_title = question.title
9     question_tags = question.tagnames
10     safe_body = html.html2text(question.html)
11     author_link = html.objlink(question.author, style=settings.EMAIL_ANCHOR_STYLE)
12     question_link = html.objlink(question, style=settings.EMAIL_ANCHOR_STYLE)
13     tag_links = html.mark_safe(" ".join([html.objlink(t, style=settings.EMAIL_ANCHOR_STYLE) for t in question.tags.all()]))
14 {% enddeclare %}
15
16 {% email %}
17     {% subject %}{% blocktrans %}{{ prefix }} New question on {{ app_name }}{% endblocktrans %}{% endsubject %}
18
19     {% htmlcontent notifications/base.html %}
20         <p style="{{ p_style }}">
21             {% blocktrans %}
22             {{ author_link }} has just posted a new question on {{ app_name }}, entitled
23             {{ question_link }}
24              and tagged "<em>{{ tag_links }}</em>". Here's what it says:
25             {% endblocktrans %}
26         </p>
27
28         <blockquote>
29             {{ question.html|safe }}
30         </blockquote>
31
32         <p style="{{ p_style }}">{% trans "Don't forget to come over and cast your vote." %}</p>        
33     {% endhtmlcontent %}
34
35 {% textcontent notifications/base_text.html %}
36 {% blocktrans %}
37 {{ question_author }} has just posted a new question on {{ app_name }}, entitled
38 "{{ question_title }}" and tagged {{ question_tags }}:
39 {% endblocktrans %}
40 {{ safe_body }}
41
42 {% trans "Don't forget to come over and cast your vote." %}
43 {% endtextcontent %}
44
45 {% endemail %}
46