annotate gpp/templates/messages/trash.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 88b2b9cb8c1f
children
rev   line source
gremmie@1 1 {% extends 'messages/base.html' %}
bgneal@310 2 {% load url from future %}
gremmie@1 3 {% block title %}Messages: Trash{% endblock %}
gremmie@1 4 {% block custom_js %}
bgneal@312 5 <script type="text/javascript" src="{{ STATIC_URL }}js/box.js"></script>
gremmie@1 6 {% endblock %}
gremmie@1 7 {% block trash-class %}class="active"{% endblock %}
gremmie@1 8 {% block messages_content %}
gremmie@1 9 <h3>Trash</h3>
gremmie@1 10 {% if messages %}
gremmie@1 11 <ul class="user-messages">
gremmie@1 12 {% for msg in messages %}
bgneal@178 13 <li{% if msg.tags %} class="{{ msg.tags }}"{% endif %}>{{ msg }}</li>
gremmie@1 14 {% endfor %}
gremmie@1 15 </ul>
gremmie@1 16 {% endif %}
gremmie@1 17 {% if msgs %}
bgneal@310 18 <form action="{% url 'messages-undelete_bulk' %}" method="post" name="messages_box_form"
bgneal@257 19 onsubmit="return messages_confirm_undelete();">{% csrf_token %}
gremmie@1 20 <table class="messages">
gremmie@1 21 <tr>
gremmie@1 22 <th>From</th>
gremmie@1 23 <th>To</th>
gremmie@1 24 <th>Subject</th>
gremmie@1 25 <th>Date</th>
gremmie@1 26 <th><input type="checkbox" id="master_select" onclick="messages_master_click();" /></th>
gremmie@1 27 </tr>
gremmie@1 28 {% for msg in msgs %}
gremmie@1 29 <tr>
bgneal@310 30 <td><a href="{% url 'bio.views.view_profile' msg.sender.username %}">
gremmie@1 31 {{ msg.sender.username }}</a></td>
bgneal@310 32 <td><a href="{% url 'bio.views.view_profile' msg.receiver.username %}">
gremmie@1 33 {{ msg.receiver.username }}</a></td>
gremmie@1 34 <td>
gremmie@1 35 {% if msg.unread %}<strong>{% endif %}
gremmie@1 36 {% if msg.replied_to %}<em>{% endif %}
gremmie@1 37 <a href="{{ msg.get_absolute_url }}?box=trash">{{ msg.subject }}</a>
gremmie@1 38 {% if msg.replied_to %}</em>{% endif %}
gremmie@1 39 {% if msg.unread %}</strong>{% endif %}
gremmie@1 40 </td>
gremmie@1 41 <td>{{ msg.send_date|date:"M j, Y g:i:s A T" }}</td>
gremmie@1 42 <td><input type="checkbox" name="undelete_ids" value="{{ msg.id }}"
gremmie@1 43 onclick="messages_set_master();" /></td>
gremmie@1 44 </tr>
gremmie@1 45 {% endfor %}
gremmie@1 46 <tr><td colspan="5" align="center"><input type="submit" value="Undelete Checked Messages" /></td></tr>
gremmie@1 47 </table>
gremmie@1 48 </form>
gremmie@1 49 {% else %}
gremmie@1 50 <p><em>Your Trash is empty.</em></p>
gremmie@1 51 {% endif %}
gremmie@1 52 {% endblock %}