0.7.70
chat avatars
This commit is contained in:
@@ -10,7 +10,7 @@ from django.template.loader import render_to_string
|
|||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
import json
|
import json
|
||||||
from datetime import datetime, time
|
from datetime import datetime, time
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
def get_update_chat_Dict(data):
|
def get_update_chat_Dict(data):
|
||||||
@@ -63,7 +63,10 @@ def get_update_chat_Dict(data):
|
|||||||
|
|
||||||
|
|
||||||
# формируем правую панель
|
# формируем правую панель
|
||||||
context_Dict.update({'receivers': receivers})
|
context_Dict.update({
|
||||||
|
'receivers': receivers,
|
||||||
|
'MEDIA_URL': settings.MEDIA_URL
|
||||||
|
})
|
||||||
users_list_html = render_to_string(
|
users_list_html = render_to_string(
|
||||||
'blocks/profile/b_list_of_users_messenger.html', context_Dict)
|
'blocks/profile/b_list_of_users_messenger.html', context_Dict)
|
||||||
res_Dict.update({
|
res_Dict.update({
|
||||||
@@ -87,7 +90,10 @@ def get_update_chat_Dict(data):
|
|||||||
if ticket.manager:
|
if ticket.manager:
|
||||||
context_Dict.update({'new_msg_allow': True})
|
context_Dict.update({'new_msg_allow': True})
|
||||||
|
|
||||||
context_Dict.update({'messages': msgs})
|
context_Dict.update({
|
||||||
|
'messages': msgs,
|
||||||
|
'MEDIA_URL': settings.MEDIA_URL
|
||||||
|
})
|
||||||
html = render_to_string(tpl_name, context_Dict)
|
html = render_to_string(tpl_name, context_Dict)
|
||||||
if required_full_support_chat_html:
|
if required_full_support_chat_html:
|
||||||
res_Dict.update({'support_chat_html': html})
|
res_Dict.update({'support_chat_html': html})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
<div class="tab_user_messanger{% if item.id == cur_receiver.id %} select{% endif %}" onclick="selectedUserMessenger(null,{{ item.id }})" data-cur-receiver-item="{{ item.id }}">
|
<div class="tab_user_messanger{% if item.id == cur_receiver.id %} select{% endif %}" onclick="selectedUserMessenger(null,{{ item.id }})" data-cur-receiver-item="{{ item.id }}">
|
||||||
<div class="left-part-tab-user">
|
<div class="left-part-tab-user">
|
||||||
<img class="user_avatar_messenger" {% if item.user_profile.avatar %}src="{{ item.user_profile.avatar.url }}"{% else %}src="{% static "img/svg/User.svg" %}"{% endif %}>
|
<img class="user_avatar_messenger" src="{% if item.user_profile.avatar %}{{ MEDIA_URL }}{{ item.user_profile.avatar.url }}{% else %}{% static "img/svg/User.svg" %}{% endif %}" alt="{{ item.user_profile }}" />
|
||||||
<div class="status_user">
|
<div class="status_user">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user