view gpp/templates/messages/outbox.html @ 310:daa2916f5b34

Fixing 145; New url tag behavior (forwards compatibility) in Django 1.3.
author Brian Neal <bgneal@gmail.com>
date Thu, 20 Jan 2011 04:03:48 +0000
parents 6e7e84707e7d
children 88b2b9cb8c1f
line wrap: on
line source
{% extends 'messages/base.html' %}
{% load url from future %}
{% block title %}Messages: Outbox{% endblock %}
{% block custom_js %}
   <script type="text/javascript" src="{{ MEDIA_URL }}js/messages/box.js"></script>
{% endblock %}
{% block outbox-class %}class="active"{% endblock %}
{% block messages_content %}
<h3>Outbox</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-delete_bulk' %}" method="post" name="messages_box_form"
      onsubmit="return messages_confirm_delete();">{% csrf_token %}
   <table class="messages"> 
   <tr>
      <th>To</th>
      <th>Subject</th>
      <th>Sent</th>
      <th>Received</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.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=outbox">{{ 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 A" }}</td>
      <td>{% if msg.unread %}<em>Unread</em>{% else %}{{ msg.read_date|date:"M j, Y g:i A" }}{% endif %}</td>
      <td><input type="checkbox" name="delete_ids" value="{{ msg.id }}"
         onclick="messages_set_master();" /></td>
   </tr>
   {% endfor %}
   <tr><td colspan="5" align="center"><input type="submit" value="Delete Checked Messages" /></td></tr>
   </table>
   <input type="hidden" name="box" value="outbox" />
   </form>
{% else %}
   <p><em>Your Outbox is empty.</em></p>
{% endif %}
{% endblock %}