{% load i18n %}

<div class="discussion-detail">
    <div>
        <input type="checkbox" name="discussion_ids" value="{{ discussion.pk }}" class="read">
    </div>
    <div class="discussion-information">
        <h2><a href="{% url 'discussions_detail' discussion.pk %}">{{ discussion.subject }}</a></h2>

        {% if discussion.latest_message %}
            {% with message=discussion.latest_message %}
                <p>{{ message.body }}</p>
                <em>{% blocktrans with author=message.sender %}Started by {{ author }}{% endblocktrans %}</em>
            {% endwith %}
        {% endif %}

        <div class="recipient-list">
            {% for recipient in discussion.recipients.all %}
                <ul>
                    {% if recipient != user %}
                        <li><a href="{% url 'discussions_list' %}">{{ recipient }}</a></li>
                    {% endif %}
                </ul>
            {% endfor %}
        </div>
    </div>
</div>
