annotate gpp/templates/messages/view.html @ 368:b76af55aafe4

For #176; cache the output of the latest poll block template tag.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 Mar 2011 21:00:00 +0000
parents 26956137b890
children
rev   line source
gremmie@1 1 {% extends 'messages/base.html' %}
bgneal@310 2 {% load url from future %}
gremmie@1 3 {% block title %}Messages: {{ msg.subject }}{% endblock %}
gremmie@1 4 {% block messages_content %}
gremmie@1 5 <h3>Viewing Message: {{ msg.subject }}</h3>
gremmie@1 6 <table class="message-header">
gremmie@1 7 <tr><th>Subject:</th><td>{{ msg.subject }}</td></tr>
bgneal@354 8 <tr><th>From:</th><td><a href="{% url 'bio-view_profile' username=msg.sender.username %}">
bgneal@354 9 {{ msg.sender }}</a></td></tr>
bgneal@354 10 <tr><th>To:</th><td><a href="{% url 'bio-view_profile' username=msg.receiver.username %}">
bgneal@354 11 {{ msg.receiver }}</a></td></tr>
gremmie@1 12 <tr><th>Date Sent:</th><td>{{ msg.send_date|date:"F d, Y g:i:s A T" }}</td></tr>
gremmie@1 13 <tr><th>Date Received:</th>
gremmie@1 14 <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 15 </table>
gremmie@1 16
gremmie@1 17 <div class="message-body">
gremmie@1 18 {{ msg.html|safe }}
gremmie@1 19 </div>
gremmie@1 20 {% if msg.signature_attached %}
gremmie@1 21 <div class="message-hr"></div>
gremmie@1 22 <div class="message-signature">
gremmie@1 23 {{ msg.sender.get_profile.signature_html|safe }}
gremmie@1 24 </div>
gremmie@1 25 {% endif %}
gremmie@1 26 {% if is_deleted %}
bgneal@310 27 <form action="{% url 'messages-undelete' msg.id %}" method="post">{% csrf_token %}
bgneal@156 28 {% if box %}<input type="hidden" name="box" value="{{ box }}" />{% endif %}
bgneal@156 29 <input type="submit" value="Undelete" />
bgneal@156 30 </form>
gremmie@1 31 {% else %}
bgneal@310 32 <a href="{% url 'messages-reply' msg.id %}{% if box %}?box={{ box }}{% endif %}">Reply</a> |
bgneal@310 33 <form action="{% url 'messages-delete' msg.id %}" method="post" class="messages-button">{% csrf_token %}
bgneal@156 34 {% if box %}<input type="hidden" name="box" value="{{ box }}" />{% endif %}
bgneal@156 35 <input type="submit" value="Delete" />
bgneal@156 36 </form>
gremmie@1 37 {% endif %}
gremmie@1 38 {% endblock %}