{% extends theme("message/message_layout.html") %}
{% block message_content %}
<table class="table table-bordered">
    <tbody>
        <tr>
        <td>
            <table class="table table-borderless" border="0">

                <tr>
                {% if message.from_user %}
                    {% if message.from_user.avatar %}
                    <td width="1">
                        <img src="{{ message.from_user.avatar }}" alt="Avatar" height="100" width="100">
                    </td>
                    {% endif %}

                    <td>
                        <a href="{{ url_for('user.profile', username=message.from_user.username) }}"><span style="color: green;"><strong><em>{{ message.from_user.username }}</em></strong></span></a>
                            {% if message.from_user|is_online %}
                            <span class="badge badge-success">Online</span>
                            {% else %}
                            <span class="badge badge-default">Offline</span>
                            {% endif %}
                        <br />
                        {{ message.from_user.primary_group.name }}<br />
                    </td>

                    <td class="pull-right">
                        Posts: {{ message.from_user.post_count }}<br />
                        Registered since: {{ message.from_user.date_joined|format_date('%b %d %Y') }}<br />
                    </td>
                {% else %}
                    [deleted]
                {% endif %}
                </tr>

            </table>
        </td>
        </tr>

        <tr>
            <td>
                <div class="message_body" id="mid{{ message.id }}">
                    {% if message.message %}
                        {% autoescape false %}
                        {{ message.message|markup }}
                        {% endautoescape %}
                    {% else %}
                        (No Message)
                    {% endif %}
                </div>
            </td>
        </tr>

    </tbody>
</table>

{% endblock %}
