view gpp/templates/messages/trash.html @ 197:2baadae33f2e

Got autocomplete working for the member search. Updated django and ran into a bug where url tags with comma separated kwargs starting consuming tons of CPU throughput. The work-around is to cut over to using spaces between arguments. This is now allowed to be consistent with other tags. Did some query optimization for the news app.
author Brian Neal <bgneal@gmail.com>
date Sat, 10 Apr 2010 04:32:24 +0000
parents d51743322bb2
children 6e7e84707e7d
line wrap: on
line source
{% extends 'messages/base.html' %}
{% block title %}Messages: Trash{% endblock %}
{% block custom_js %}
   <script type="text/javascript" src="{{ MEDIA_URL }}js/messages/box.js"></script>
{% endblock %}
{% block trash-class %}class="active"{% endblock %}
{% block messages_content %}
<h3>Trash</h3>
{% if messages %}
<ul class="user-messages">
   {% for msg in messages %}
      <li{% if msg.tags %} class="{{ msg.tags }}"{% endif %}>{{ msg }}</li>
   {% endfor %}
</ul>
{% endif %}
{% if msgs %}
   <form action="{% url messages-undelete_bulk %}" method="post" name="messages_box_form"
      onsubmit="return messages_confirm_undelete();">
   <table class="messages">
   <tr>
      <th>From</th>
      <th>To</th>
      <th>Subject</th>
      <th>Date</th>
      <th><input type="checkbox" id="master_select" onclick="messages_master_click();" /></th>
   </tr>
   {% for msg in msgs %}
   <tr>
      <td><a href="{% url bio.views.view_profile msg.sender.username %}">
         {{ msg.sender.username }}</a></td>
      <td><a href="{% url bio.views.view_profile msg.receiver.username %}">
         {{ msg.receiver.username }}</a></td>
      <td>
         {% if msg.unread %}<strong>{% endif %}
         {% if msg.replied_to %}<em>{% endif %}
         <a href="{{ msg.get_absolute_url }}?box=trash">{{ msg.subject }}</a>
         {% if msg.replied_to %}</em>{% endif %}
         {% if msg.unread %}</strong>{% endif %}
         </td>
      <td>{{ msg.send_date|date:"M j, Y g:i:s A T" }}</td>
      <td><input type="checkbox" name="undelete_ids" value="{{ msg.id }}"
         onclick="messages_set_master();" /></td>
   </tr>
   {% endfor %}
   <tr><td colspan="5" align="center"><input type="submit" value="Undelete Checked Messages" /></td></tr>
   </table>
   </form>
{% else %}
   <p><em>Your Trash is empty.</em></p>
{% endif %}
{% endblock %}