view gpp/templates/messages/view.html @ 354:26956137b890

Fixing #179; provide links to sender & receiver profiles when viewing private messages. Also provided a legend on the inbox to state what bold and italic message titles mean.
author Brian Neal <bgneal@gmail.com>
date Fri, 04 Mar 2011 01:34:21 +0000
parents daa2916f5b34
children
line wrap: on
line source
{% extends 'messages/base.html' %}
{% load url from future %}
{% block title %}Messages: {{ msg.subject }}{% endblock %}
{% block messages_content %}
<h3>Viewing Message: {{ msg.subject }}</h3>
<table class="message-header">
   <tr><th>Subject:</th><td>{{ msg.subject }}</td></tr>
   <tr><th>From:</th><td><a href="{% url 'bio-view_profile' username=msg.sender.username %}">
            {{ msg.sender }}</a></td></tr>
   <tr><th>To:</th><td><a href="{% url 'bio-view_profile' username=msg.receiver.username %}">
            {{ msg.receiver }}</a></td></tr>
   <tr><th>Date Sent:</th><td>{{ msg.send_date|date:"F d, Y g:i:s A T" }}</td></tr>
   <tr><th>Date Received:</th>
      <td>{% if msg.unread %}<em>Unread</em>{% else %}{{ msg.read_date|date:"F d, Y g:i:s A T" }}{% endif %}</td></tr>
</table>

<div class="message-body">
   {{ msg.html|safe }}
</div>
{% if msg.signature_attached %}
<div class="message-hr"></div>
<div class="message-signature">
   {{ msg.sender.get_profile.signature_html|safe }}
</div>
{% endif %}
{% if is_deleted %}
<form action="{% url 'messages-undelete' msg.id %}" method="post">{% csrf_token %}
   {% if box %}<input type="hidden" name="box" value="{{ box }}" />{% endif %}
   <input type="submit" value="Undelete" />
</form>
{% else %}
<a href="{% url 'messages-reply' msg.id %}{% if box %}?box={{ box }}{% endif %}">Reply</a> |
<form action="{% url 'messages-delete' msg.id %}" method="post" class="messages-button">{% csrf_token %}
   {% if box %}<input type="hidden" name="box" value="{{ box }}" />{% endif %}
   <input type="submit" value="Delete" />
</form>
{% endif %}
{% endblock %}