summaryrefslogtreecommitdiffstats
path: root/askbot/templates/group_messaging/macros.html
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/templates/group_messaging/macros.html')
-rw-r--r--askbot/templates/group_messaging/macros.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/askbot/templates/group_messaging/macros.html b/askbot/templates/group_messaging/macros.html
new file mode 100644
index 00000000..7fbe4434
--- /dev/null
+++ b/askbot/templates/group_messaging/macros.html
@@ -0,0 +1,16 @@
+{%- macro message(post, visitor) -%}
+<div class="message" data-message-id="{{ post.id }}">
+ <p class="header">
+ {% if post.sender == visitor %}
+ {% trans date=post.sent_at %}You wrote on {{ date }}:{% endtrans %}
+ {% else %}
+ {% trans user=post.sender.username,
+ date=post.sent_at
+ %}{{ user }} wrote on {{ date }}:{% endtrans %}
+ {% endif %}
+ </p>
+ <div class="content">
+ {{ post.html|safe }}
+ </div>
+</div>
+{%- endmacro -%}