annotate gpp/templates/messages/view.html @ 194:6a5549c2efb5

Implement #62, add support for CSRF protection.
author Brian Neal <bgneal@gmail.com>
date Sat, 03 Apr 2010 20:00:56 +0000
parents 7ad1f3e77cd9
children daa2916f5b34
rev   line source
gremmie@1 1 {% extends 'messages/base.html' %}
gremmie@1 2 {% block title %}Messages: {{ msg.subject }}{% endblock %}
gremmie@1 3 {% block messages_content %}
gremmie@1 4 <h3>Viewing Message: {{ msg.subject }}</h3>
gremmie@1 5 <table class="message-header">
gremmie@1 6 <tr><th>Subject:</th><td>{{ msg.subject }}</td></tr>
gremmie@1 7 <tr><th>From:</th><td>{{ msg.sender }}</td></tr>
gremmie@1 8 <tr><th>To:</th><td>{{ msg.receiver }}</td></tr>
gremmie@1 9 <tr><th>Date Sent:</th><td>{{ msg.send_date|date:"F d, Y g:i:s A T" }}</td></tr>
gremmie@1 10 <tr><th>Date Received:</th>
gremmie@1 11 <td>{% if msg.unread %}<em>Unread</em>{% else %}{{ msg.read_date|date:"F d, Y g:i:s A T" }}{% endif %}</td></tr>
gremmie@1 12 </table>
gremmie@1 13
gremmie@1 14 <div class="message-body">
gremmie@1 15 {{ msg.html|safe }}
gremmie@1 16 </div>
gremmie@1 17 {% if msg.signature_attached %}
gremmie@1 18 <div class="message-hr"></div>
gremmie@1 19 <div class="message-signature">
gremmie@1 20 {{ msg.sender.get_profile.signature_html|safe }}
gremmie@1 21 </div>
gremmie@1 22 {% endif %}
gremmie@1 23 {% if is_deleted %}
bgneal@194 24 <form action="{% url messages-undelete msg.id %}" method="post">{% csrf_token %}
bgneal@156 25 {% if box %}<input type="hidden" name="box" value="{{ box }}" />{% endif %}
bgneal@156 26 <input type="submit" value="Undelete" />
bgneal@156 27 </form>
gremmie@1 28 {% else %}
gremmie@1 29 <a href="{% url messages-reply msg.id %}{% if box %}?box={{ box }}{% endif %}">Reply</a> |
bgneal@194 30 <form action="{% url messages-delete msg.id %}" method="post" class="messages-button">{% csrf_token %}
bgneal@156 31 {% if box %}<input type="hidden" name="box" value="{{ box }}" />{% endif %}
bgneal@156 32 <input type="submit" value="Delete" />
bgneal@156 33 </form>
gremmie@1 34 {% endif %}
gremmie@1 35 {% endblock %}