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