{% extends "bee_django_message/base.html" %}
{% load bootstrap3 %}
{% load bee_django_message_filter %}
{% block content %}
    <h4>详情</h4>
    {% if record.message %}
        {% if record.message.need_done %}
            {% if not record.is_done %}
                <a href="{% url 'bee_django_message:record_update' record.id %}" class="btn btn-danger">去处理</a>

            {% endif %}
        {% endif %}
    {% endif %}
    <table class="table">
        <tr>
            <td class="col-xs-3">发送人</td>
            <td>{{ record.from_user|get_send_name }}</td>
        </tr>
        <tr>
            <td class="col-xs-3">接收人</td>
            <td>{{ record.to_user|default:"" }}</td>
        </tr>
        <tr>
            <td>标题</td>
            <td>{{ record.title }}</td>
        </tr>
        <tr>
            <td>内容</td>
            <td>{{ record.info|default:""|safe }}</td>
        </tr>
        <tr>
            <td>链接</td>
            <td>
                {% if record.url %}
                    <a href="{{ record.url }}">链接</a>
                {% endif %}
            </td>
        </tr>
        <tr>
            <td>发送时间</td>
            <td>{{ record.sent_at }}</td>
        </tr>
        {% if record.message %}
            {% if record.message.need_done %}
                <tr>
                    <td>处理结果</td>
                    <td>{{ record.done_info|default:""|linebreaks }}</td>
                </tr>
                <tr>
                    <td>处理时间</td>
                    <td>{{ record.done_at|default:"" }}</td>
                </tr>
                <tr>
                    <td>处理人</td>
                    <td>{{ record.done_by|get_name_detail:False }}</td>
                </tr>
            {% endif %}
        {% endif %}
    </table>
{% endblock %}