{% load i18n %}
{% load aa_forum %}

{% if message %}
    <div id="message-{{ message.pk }}" class="card card-default">
        <div class="card-body">
            <div class="aa-forum-message">
                <div class="d-none d-sm-block m-sm-3 m-md-0">
                    {% include "aa_forum/partials/forum/topic/message-author.html" with message_author=message.sender %}
                </div>

                <div class="aa-forum-message-wrapper m-3">
                    <div class="aa-forum-message-header row mb-3">
                        <div class="d-lg-none d-md-none d-sm-none">
                            {% include "aa_forum/partials/forum/topic/message-author.html" with message_author=message.sender %}
                        </div>

                        <div class="aa-forum-message-keyinfo col-md-6">
                            {{ message.subject }}
                            <br>
                            <small>« <b>{% translate "on:" %}</b> {{ message.time_sent|aa_forum_time }} »</small>
                        </div>
                    </div>

                    <div class="aa-forum-message-body pt-3">
                        <div class="aa-forum-message-body-inner">
                            <div class="ck ck-content">
                                {{ message.message|safe }}
                            </div>
                        </div>

                        {% if message_author.aa_forum_user_profile %}
                            {% if message_author.aa_forum_user_profile.signature %}
                                <div class="aa-forum-message-body-author-signature text-muted small hidden-xs pt-3">
                                    <div class="ck ck-content">
                                        {{ message_sender.aa_forum_user_profile.signature|safe }}
                                    </div>
                                </div>
                            {% endif %}
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endif %}
