view sg101/templates/messages/inbox.html @ 805:e966d5553955

Private message refactor: view & reply to existing PMs.
author Brian Neal <bgneal@gmail.com>
date Sun, 31 Aug 2014 16:01:00 -0500
parents dbc389a409f5
children 59e36169a814
line wrap: on
line source
{% extends 'messages/messages_base.html' %}
{% block messages_content %}
<h3>Inbox <small>(Page {{ page.number }} of {{ page.paginator.num_pages }})</small></h3>
<p>
This is your inbox. It contains messages sent to you by others. Messages in <strong>bold</strong> are unread.
Messages in <em>italics</em> have been replied to.
</p>
{% if page.object_list %}
   {% include "messages/pagination.html" %}
   <form action="." onsubmit="return bulkMsgAction(this, 'delete');">
   <table class="messages">
   <tr>
      <th>From</th>
      <th>Subject</th>
      <th>Date</th>
      <th><input type="checkbox" onclick="tabMasterCheckClick(this, 'inbox_ids');" /></th>
   </tr>
   {% for msg in page.object_list %}
   <tr>
      <td><a href="{% url 'bio.views.view_profile' msg.sender.username %}">
         {{ msg.sender.username }}</a></td>
      <td>
         <a href="{% url 'messages-view' msg.pk %}"
            class="{% if msg.unread %}unread {% endif %}{% if msg.replied_to %}replied_to{% endif %}">{{ msg.subject }}</a>
         </td>
      <td>{{ msg.send_date|date:"M j, Y g:i A" }}</td>
      <td><input type="checkbox" name="inbox_ids" value="{{ msg.id }}" /></td>
   </tr>
   {% endfor %}
   <tr><td colspan="4"><input type="submit" value="Delete Checked Messages" /></td></tr>
   </table>
   </form>
   {% include "messages/pagination.html" %}
{% else %}
   <p><em>Your Inbox is empty.</em></p>
{% endif %}
{% include 'messages/usage_graph.html' with pct_used=inbox_pct box_name='inbox' %}
{% endblock %}