Files
tripwithbonus/templates/blocks/profile/b_support_chat.html
2023-11-02 17:24:12 +03:00

79 lines
4.2 KiB
HTML

{% load static %}
{#{% load static %}#}
{# <div class="insert-tech-place">#}
<div class="container-messenger">
{# <div class="title-profile-cont">#}
{# <h1>Техническая поддержка</h1>#}
{# </div>#}
<img class="loader_chat_f_sw_chats support" src="{% static "/img/svg/loader.svg" %}" alt="loader">
{% if ticket %}
<div class="name_ticket">
<span>{{ ticket.name }}</span>
</div>
<div class="{% if user.is_staff %}block-chat{% else %}block-chat width-100{% endif %}">
{% if user.is_staff or ticket.manager %}
<div class="container-header-chat">
<div class="header-chat-left-part">
<img class="chat-avatar" {% if cur_receiver.user_profile.avatar %}src="{{ cur_receiver.user_profile.avatar.url }}"{% else %}src="{% static "img/svg/User.svg" %}"{% endif %}>
<span class="chat-username">{{ cur_receiver.last_name }} {{ cur_receiver.first_name }}</span>
</div>
<div class="header-chat-right-part">
<img class="header-icons-right-part-padding" src="{% static "img/svg/phone.svg" %}">
<img class="header-icons-right-part-padding" src="{% static "img/svg/info.svg" %}">
</div>
</div>
{% endif %}
{# <div class="container-messages">#}
{# {% if not messages %}#}
{# {% with text=ticket.text modifiedDT=ticket.modifiedDT %}#}
{# {% include "widgets/w_message.html" %}#}
{# {% endwith %}#}
{# {% else %}#}
{# {% for msg in messages %}#}
{# {% with text=msg.text modifiedDT=msg.modifiedDT %}#}
{# {% include "widgets/w_message.html" %}#}
{# {% endwith %}#}
{# {% endfor %}#}
{# {% endif %}#}
{# </div>#}
<div class="bottom_part_of_chats">
<div class="container-messages" data-user-id="{{ user.id }}" data-cur-receiver="{{ cur_receiver.id }}" data-ticket-id='{{ ticket.id }}'>
{% include "blocks/profile/b_messages_container.html" %}
</div>
<div class="footer-chat{% if not new_msg_allow %} hide{% endif %}">
<div class="left-part-block-enter-message">
<input class="enter-message-inp" onfocus="check_new_messages_timeout()" onkeypress="sendMessageEnter(event,{{ ticket.id }},{{ user.id }},{{ cur_receiver.id }})" placeholder="Отправить сообщение">
</div>
{# <div class="right-part-block-enter-message">#}
{# <button class="attach-file-btn-message" onclick="attachFilemeassge(event,this,{{ ticket.id }},{{ user.id }},{{ cur_receiver.id }})"></button>#}
{# <button class="send-message" onclick="sendMessage({{ ticket.id }},{{ user.id }},{{ cur_receiver.id }})"></button>#}
{# </div>#}
<div class="right-part-block-enter-message">
{# <button class="attach-file-btn-message" onclick="attachFilemeassge(event,this,null,{{ user.id }},{{ cur_receiver.id }})"></button>#}
<input style="display: none;" type="file" onchange="attachFilemeassge(event,this,{{ ticket.id }},{{ user.id }},{{ cur_receiver.id }})" id="id_choce_file" multiple>
<label for="id_choce_file" class="attach-file-btn-message"></label>
<button class="send-message" onclick="sendMessage({{ ticket.id }},{{ user.id }},{{ cur_receiver.id }})"></button>
<img src="{% static "/img/svg/loader.svg" %}" class="loader_show_message">
{# <button class="send-message" onclick="send_ws_msg('message')"></button>#}
</div>
</div>
</div>
</div>
{% endif %}
{% if user.is_staff %}
<div class="block-list-of-users">
{% include "blocks/profile/b_list_of_tickets_support_chat.html" %}
</div>
{% endif %}
</div>
{#</div>#}