{% extends "base.html" %}
{% load url from future %}

{% block title %}{{ block.super }} – Private messages: {{ action }}{% endblock title %}
{% block content %}
    <h1>Messages ({{ action }})</h2>
    <dl>
    {% for pm in pms %}
    <dt>{{ pm.subject }} 
    {% ifequal action 'received' %}
    <a href="./{{ pm.id }}/archive/">archive</a>
    <a href="./{{ pm.id }}/delete/">delete</a>
    {% else %}
    <a href="{% url 'delete_pm' object_id=pm.recipient.id,msgid=message.id %}">DELETE</a>
    <a href="../{{ pm.id }}/delete/">delete</a>
    {% endifequal %}
    </dt>
    <dd>{{ pm.text }}</dd>
    {% endfor %}
    </dl>
{% endblock content %}

