]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/notifications/newquestion.html
Converts all instant notifications to the new style emails.
[osqa.git] / forum / skins / default / templates / notifications / newquestion.html
index a5497166708e4c56189e852dabde84f4010f6a0f..d9987e6a24c4d0171002523fa031d001bf218397 100644 (file)
@@ -1,27 +1,43 @@
-{% extends "email_base.html" %}\r
-{% load i18n %}\r
-{% load extra_tags %}\r
+{% load i18n extra_tags email_tags %}\r
 \r
-{% block content %}\r
-    <p>{% trans "Hello" %} {% user_var username %},</p>\r
+{% declare %}\r
+    prefix = settings.EMAIL_SUBJECT_PREFIX\r
+    app_name = settings.APP_SHORT_NAME\r
+    question_author = question.author.username\r
+    app_url = settings.APP_URL\r
+    question_url = question.get_absolute_url()\r
+    question_title = question.title\r
+    question_tags = question.tagnames\r
+{% enddeclare %}\r
 \r
-    <p>\r
-        {% blocktrans with question.author.username as author_name and settings.APP_SHORT_NAME as app_title and settings.APP_URL as app_url and question.get_absolute_url as question_url and question.title as question_title and question.tagnames as question_tags %}\r
-        {{ author_name }} has just posted a new question on {{ app_title }}, with title\r
-        <a href="{{ app_url }}{{ question_url }}">{{ question_title }}</a> and tagged <em>{{ question_tags }}</em>:\r
-        {% endblocktrans %}\r
-    </p>\r
+{% email %}\r
+    {% subject %}{% blocktrans %}{{ prefix }} New question on {{ app_name }}{% endblocktrans %}{% endsubject %}\r
 \r
-    <blockquote>\r
-        {{ question.html|safe }}\r
-    </blockquote>\r
+    {% htmlcontent notifications/base.html %}\r
+        <p style="{{ p_style }}">\r
+            {% blocktrans %}\r
+            {{ question_author }} has just posted a new question on {{ app_name }}, with title\r
+            <a style="{{ a_style }}" href="{{ app_url }}{{ question_url }}">{{ question_title }}</a> and tagged <em>{{ question_tags }}</em>:\r
+            {% endblocktrans %}\r
+        </p>\r
 \r
-    <p>\r
+        <blockquote>\r
+            {{ question.html|safe }}\r
+        </blockquote>\r
+\r
+        <p style="{{ p_style }}">{% trans "Don't forget to come over and cast your vote." %}</p>        \r
+    {% endhtmlcontent %}\r
+\r
+{% textcontent notifications/base_text.html %}\r
     {% blocktrans %}\r
-        Don't forget to come over and cast your vote.\r
+        {{ question_author }} has just posted a new question on {{ app_name }}, with title\r
+        "{{ question_title }}" and tagged {{ question_tags }}:\r
     {% endblocktrans %}\r
-    </p>\r
 \r
-    <p>{% blocktrans %}Sincerely,<br />\r
-    Forum Administrator{% endblocktrans %}</p>\r
-{% endblock %}\r
+    {{ question.body|safe }}\r
+\r
+    {% trans "Don't forget to come over and cast your vote." %}\r
+{% endtextcontent %}\r
+\r
+{% endemail %}\r
+\r