{% load static %}
{% load tt_chat %}

<div style="width: 100%;">
    <div class="container-message_support_chat {% get_msg_side user ticket msg %}">
        <div class="block_avatar_message {% get_msg_side user ticket msg %}">
            <img src="{% if msg.sender.user_profile.avatar %}{{ MEDIA_URL }}{{ msg.sender.user_profile.avatar }}{% else %}{% static "img/svg/user_icon_standart.png" %}{% endif %}" alt="{{ msg.sender }}" />
        </div>
        <div class="block_text_message {% get_msg_side user ticket msg %}">
            <div class="container_text_message {% get_msg_side user ticket msg %}">

                {% if msg.files %}
                    {% for file in msg.files %}
                        <div class="file_border_cont {{ msg.id }}_ident">
                            <div class="left_part_file_w">
                                <a href="{% url 'get_file_from_message' msg.id file.file_name %}" download><img class="img_download_file {% get_msg_side user ticket msg %}" src="{% static "/img/svg/download_file.svg" %}"></a>
                            </div>
                            <div class="right_part_file_w {% get_msg_side user ticket msg %}">
                                <div>{{ file.file_name }}</div>
                                <div>{% get_filesize file.file_size %}</div>
                            </div>
                            <div class="clear_both"></div>
                        </div>
                    {% endfor %}

                {% elif msg.text %}
                    <span class="text_message">
                        {{ msg.text }}
                    </span>
                {% elif ticket and ticket.text %}
                    <span class="text_message">
                        {{ ticket.text }}
                    </span>
                {% endif %}
            </div>
            <div class="data_send_message {% get_msg_side user ticket msg %}">
                <span>{% if msg %}{{ msg.modifiedDT }}{% else %}{{ ticket.modifiedDT }}{% endif %}</span>
            </div>
        </div>
    </div>
</div>


{#<div class="container-message_support_chat{% if msg.sender == ticket.manager %} left{% else %} right{% endif %}">#}
{#    <div class="block_avatar_message">#}
{#        <img src="{% static "delete_later/Avatar.png" %}">#}
{#    </div>#}
{#    <div class="block_text_message">#}
{#        <div class="container_text_message{% if msg.sender == ticket.manager %} border{% else %} background{% endif %}">#}
{#            <span class="text_message">#}
{#                Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,#}
{#            </span>#}
{#        </div>#}
{#        <div class="data_send_message{% if msg.sender == ticket.manager %} left{% else %} right{% endif %}">#}
{#            <span>8:00 PM</span>#}
{#        </div>#}
{#    </div>#}
{#</div>#}