{% extends "discussions/base.html" %}
{% load i18n %}

{% block content_title %}<h2>{% blocktrans %}Conversation with {{ recipient }}{% endblocktrans %}</h2>{% endblock %}

{% block content %}
    {{ block.super }}
    <ul>
        {% for message in message_list %}
            <li>
                {{ message.body }}
                <p>{% blocktrans with message.sent_at as sent_at %}Received on {{ sent_at }}{% endblocktrans %}</p>
                <em>{% blocktrans with author=message.sender %}Sent by {{ author }}{% endblocktrans %}</em>
            </li>
        {% endfor %}
    </ul>

    <form action="" method="post" id="compose_message_form">
        {% csrf_token %}
        <fieldset>
            <legend>{% trans "Compose message" %}</legend>
            {{ form.as_p }}
        </fieldset>
        <input type="submit" name="send" value="{% trans "Send" %}" />
    </form>
{% endblock %}
