From b3a2ff0f1502ba4a9d64cc1db4b9b076af62b6a6 Mon Sep 17 00:00:00 2001 From: borissedw Date: Fri, 4 Aug 2023 14:01:30 +0300 Subject: [PATCH 01/19] 0.0.33 --- static/css/styles(boris).css | 10 ++++++---- templates/blocks/profile/b_create_ticket.html | 4 +++- templates/pages/p_results_search_route.html | 2 ++ templates/tb_base.html | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 templates/pages/p_results_search_route.html diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 279e760..c42a625 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -329,13 +329,14 @@ } .container-messages{ - height: 74%; + height: calc(74% - 70px); width: 100%; - /*transform: rotate(180deg);*/ + /* transform: rotate(180deg); */ overflow-y: auto; - /*transform: scaleY(-1);*/ + /* transform: scaleY(-1); */ display: flex; flex-direction: column-reverse; + padding-top: 70px; } @@ -512,6 +513,7 @@ .insert_users{ /*min-height: 440px;*/ + margin-bottom: 20px; } /*messgae*/ @@ -581,7 +583,7 @@ .container_text_message{ width: 100%; - min-height: 60px; + /*min-height: 60px;*/ border-radius: 10px; } diff --git a/templates/blocks/profile/b_create_ticket.html b/templates/blocks/profile/b_create_ticket.html index e040693..d432270 100644 --- a/templates/blocks/profile/b_create_ticket.html +++ b/templates/blocks/profile/b_create_ticket.html @@ -46,4 +46,6 @@ {# #} - \ No newline at end of file + + +
\ No newline at end of file diff --git a/templates/pages/p_results_search_route.html b/templates/pages/p_results_search_route.html new file mode 100644 index 0000000..a6f7824 --- /dev/null +++ b/templates/pages/p_results_search_route.html @@ -0,0 +1,2 @@ +{% extends "tb_base.html" %} +{% load static %} \ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index 67e656d..4fb85dc 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -14,11 +14,11 @@ {% block meta %} - {% endblock %}
+ {% include 'blocks/b_header.html' %} {% block content %} From c8484f1451ea6d2635adc3ae4563044f9a834145 Mon Sep 17 00:00:00 2001 From: borissedw Date: Fri, 4 Aug 2023 14:13:13 +0300 Subject: [PATCH 02/19] 0.0.34 --- static/css/styles(boris).css | 4 +++- templates/pages/p_results_find_route.html | 7 +++++++ templates/pages/p_results_search_route.html | 2 -- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 templates/pages/p_results_find_route.html delete mode 100644 templates/pages/p_results_search_route.html diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index c42a625..c79283c 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -636,4 +636,6 @@ padding-top: 10px; border-top: 1px solid #E6E6E6; width: 100%; -} \ No newline at end of file +} + +/*p_results_find_route*/ \ No newline at end of file diff --git a/templates/pages/p_results_find_route.html b/templates/pages/p_results_find_route.html new file mode 100644 index 0000000..f0e2405 --- /dev/null +++ b/templates/pages/p_results_find_route.html @@ -0,0 +1,7 @@ +{% extends "tb_base.html" %} +{% load static %} +
+

Поиск перевозчика

+
+
+
\ No newline at end of file diff --git a/templates/pages/p_results_search_route.html b/templates/pages/p_results_search_route.html deleted file mode 100644 index a6f7824..0000000 --- a/templates/pages/p_results_search_route.html +++ /dev/null @@ -1,2 +0,0 @@ -{% extends "tb_base.html" %} -{% load static %} \ No newline at end of file From 5ff0b100c56dd9c09a91a334f2840a318cdc1a5c Mon Sep 17 00:00:00 2001 From: SDE Date: Fri, 4 Aug 2023 14:16:36 +0300 Subject: [PATCH 03/19] 0.1.30 routes/route_search_results/ --- RoutesApp/urls.py | 10 ++++++++++ RoutesApp/views.py | 20 +++++++++++++++++++- TWB/urls.py | 3 +++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 RoutesApp/urls.py diff --git a/RoutesApp/urls.py b/RoutesApp/urls.py new file mode 100644 index 0000000..ab2668d --- /dev/null +++ b/RoutesApp/urls.py @@ -0,0 +1,10 @@ +# coding=utf-8 +from django.urls import path +from .views import * +from django.contrib.auth import views + +urlpatterns = [ + + path('route_search_results/', route_search_results_View, name='route_search_results_View'), + +] \ No newline at end of file diff --git a/RoutesApp/views.py b/RoutesApp/views.py index 91ea44a..cd2720f 100644 --- a/RoutesApp/views.py +++ b/RoutesApp/views.py @@ -1,3 +1,21 @@ from django.shortcuts import render -# Create your views here. +from uuid import uuid1 +from .models import * +from django.contrib import auth +from django.http import HttpResponse, Http404 +from django.template import loader, RequestContext +from django.contrib.auth.decorators import login_required +from BaseModels.mailSender import techSendMail +from django.utils.translation import gettext as _ +from datetime import datetime + +def route_search_results_View(request): + + routes = Route.objects.filter(enable=True).order_by('-modifiedDT') + Dict = { + 'routes': routes + } + + t = loader.get_template('pages/p_results_find_route.html') + return HttpResponse(t.render(Dict, request)) diff --git a/TWB/urls.py b/TWB/urls.py index b29fc41..5505b0b 100644 --- a/TWB/urls.py +++ b/TWB/urls.py @@ -20,7 +20,10 @@ urlpatterns += i18n_patterns( path('profile/', include('AuthApp.urls')), path('user_account/', include('AuthApp.js_urls')), + path('routes/', include('RoutesApp.js_urls')), + path('routes/', include('RoutesApp.urls')), + path('messages/', include('ChatServiceApp.js_urls')), path('reference_data/', include('ReferenceDataApp.js_urls')), From 139cf7eed1308512de5b26e3621e214e34cc694f Mon Sep 17 00:00:00 2001 From: borissedw Date: Fri, 4 Aug 2023 14:48:35 +0300 Subject: [PATCH 04/19] 0.0.35 --- static/css/styles(boris).css | 36 ++++++++++++++++++++++- static/css/styles.css | 7 ----- static/js/user_profile.js | 2 +- templates/pages/p_results_find_route.html | 24 +++++++++++---- 4 files changed, 55 insertions(+), 14 deletions(-) diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index c79283c..7e000e1 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -6,6 +6,26 @@ width: 100% !important; } + + +.text-align-center{ + text-align: center; + width: 100%; + +} + + +.title_page{ + font-size: 44px; + color: #272424; + font-weight: 700; +} + +.cut-width{ + max-width: 1280px; + margin: auto; +} + /**/ .title-profile-cont{ @@ -638,4 +658,18 @@ width: 100%; } -/*p_results_find_route*/ \ No newline at end of file +/*p_results_find_route*/ + +.container_form_search_carrier{ + height: 120px; + width: 100%; + background: #FFF; + box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20); + margin-top: 60px; + margin-bottom: 40px; + border-radius: 10px; +} + +.block-filters-find-route{ + min-height: 660px; +} \ No newline at end of file diff --git a/static/css/styles.css b/static/css/styles.css index 0682362..e5a6378 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -106,15 +106,8 @@ html, body{ height: 100%; } -/*uni-classes (boris)*/ -.text-align-center{ - text-align: center; -} - -/*uno classes end (boris)*/ - /*Стилизация radio button */ diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 1001d9e..e5cc202 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -254,7 +254,7 @@ function sendRoute(el, routeID = null){ }, error: function (data, exception){ - document.querySelector(".info_profile").innerHTML = data.responseText; + document.querySelector(".info_profile").innerHTML = data.responseJSON.html; diff --git a/templates/pages/p_results_find_route.html b/templates/pages/p_results_find_route.html index f0e2405..15e77fd 100644 --- a/templates/pages/p_results_find_route.html +++ b/templates/pages/p_results_find_route.html @@ -1,7 +1,21 @@ {% extends "tb_base.html" %} {% load static %} -
-

Поиск перевозчика

-
-
-
\ No newline at end of file + +{% block content %} +
+
+

Поиск перевозчика

+
+
+
+
+
+ +
+
+ +
+
+
+ +{% endblock %} \ No newline at end of file From dcead848c273d5b4b7f134ce8facee3d2ce599fa Mon Sep 17 00:00:00 2001 From: borissedw Date: Fri, 4 Aug 2023 16:15:54 +0300 Subject: [PATCH 05/19] 0.0.36 --- static/css/styles(boris).css | 57 +++++++++++++++++++ templates/pages/p_results_find_route.html | 5 ++ .../carrier_card/inf_about_moving.html | 10 ++++ templates/widgets/w_carrier_card.html | 27 +++++++++ 4 files changed, 99 insertions(+) create mode 100644 templates/small_INCLUDES/carrier_card/inf_about_moving.html create mode 100644 templates/widgets/w_carrier_card.html diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 7e000e1..6debae9 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -26,6 +26,10 @@ margin: auto; } +.clear_both{ + clear: both; +} + /**/ .title-profile-cont{ @@ -672,4 +676,57 @@ .block-filters-find-route{ min-height: 660px; + background: #FFFFFF; + box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20); + width: 30%; + float: left; +} + +.block-finded-routes{ + width: 68%; + float: right; + /*display: inline-block;*/ +} + +.carrier-card{ + width: 100%; + /*height: 830px;*/ + background: #FFFFFF; + box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20); + margin-bottom: 20px; + border-radius: 10px; + padding: 20px; +} + +.left-part-carrier-card{ + width: 70%; + float: left; +} + +.first-line-card-carrier{ + margin-bottom: 20px; +} + +.carrier-title{ + font-size: 20px; + font-weight: 500; + color: #272424; + width: 50%; + float: left; + text-align: left; + display: block; +} + +.type_transportation_carrier{ + width: 50%; + float: right; + text-align: -webkit-right; + display: block; +} + +.from-to-country-container-carrier{ + width: 90%; + margin: auto; + background: #F8F8F8; + box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20); } \ No newline at end of file diff --git a/templates/pages/p_results_find_route.html b/templates/pages/p_results_find_route.html index 15e77fd..a03456d 100644 --- a/templates/pages/p_results_find_route.html +++ b/templates/pages/p_results_find_route.html @@ -13,8 +13,13 @@
+ {% for route in routes %} + {% include "widgets/w_carrier_card.html" %} + {% endfor %} +
+
diff --git a/templates/small_INCLUDES/carrier_card/inf_about_moving.html b/templates/small_INCLUDES/carrier_card/inf_about_moving.html new file mode 100644 index 0000000..d9224fb --- /dev/null +++ b/templates/small_INCLUDES/carrier_card/inf_about_moving.html @@ -0,0 +1,10 @@ +{% load static %} +
+
+ +
+ +
+ +
+
\ No newline at end of file diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html new file mode 100644 index 0000000..8c1c504 --- /dev/null +++ b/templates/widgets/w_carrier_card.html @@ -0,0 +1,27 @@ +{% load static %} +
+
+
+
+ Перевозчик: +
+
+ {{ route.get_type_transport_display }} +
+
+
+
+ {{ route.get_from_place_display }} +
+
+
+ {{ route.get_to_place_display }} +
+
+ {% include "small_INCLUDES/carrier_card/inf_about_moving.html" %} +
+
+ +
+
+
\ No newline at end of file From 3e342e6d1990a06da0de05cdd6ce23f1fd305164 Mon Sep 17 00:00:00 2001 From: SDE Date: Fri, 4 Aug 2023 16:25:07 +0300 Subject: [PATCH 06/19] 0.1.31 search routes page --- RoutesApp/funcs.py | 23 ++++++++++++++--------- RoutesApp/js_views.py | 6 +++--- RoutesApp/views.py | 12 ++++++++---- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/RoutesApp/funcs.py b/RoutesApp/funcs.py index 86e1b4b..ba014fd 100644 --- a/RoutesApp/funcs.py +++ b/RoutesApp/funcs.py @@ -1,16 +1,21 @@ from .models import * -def get_routes_for_user(user): +def get_routes_Dict(user=None): from ReferenceDataApp.models import Airport, Country, City - if not user and user.is_authenticated: - errors_Dict = { - 'errors': { - 'all__': f'ошибка идентификации пользователя' - } - } - return errors_Dict + # if not user and user.is_authenticated: + # errors_Dict = { + # 'errors': { + # 'all__': f'ошибка идентификации пользователя' + # } + # } + # return errors_Dict + kwargs = {} + if user: + kwargs.update({ + 'owner': user + }) - routes = Route.objects.filter(owner=user) + routes = Route.objects.filter(**kwargs).order_by('-modifiedDT') res_Dict = {} diff --git a/RoutesApp/js_views.py b/RoutesApp/js_views.py index b9ba100..bead357 100644 --- a/RoutesApp/js_views.py +++ b/RoutesApp/js_views.py @@ -14,7 +14,7 @@ from datetime import datetime from django.template.loader import render_to_string from django.urls import reverse from .forms import * -from .funcs import get_routes_for_user +from .funcs import get_routes_Dict def edit_route_ajax(request): @@ -153,7 +153,7 @@ def get_routes_ajax(request): raise Http404 try: - routes_Dict = get_routes_for_user(request.user) + routes_Dict = get_routes_Dict(request.user) if 'errors' in routes_Dict: return JsonResponse(routes_Dict, status=400) @@ -209,7 +209,7 @@ def create_or_change_route_ajax(request, route_id=None): obj.owner = request.user obj.save() - routes_Dict = get_routes_for_user(request.user) + routes_Dict = get_routes_Dict(request.user) if 'errors' in routes_Dict: form.errors.update(routes_Dict['errors']) diff --git a/RoutesApp/views.py b/RoutesApp/views.py index cd2720f..df370b7 100644 --- a/RoutesApp/views.py +++ b/RoutesApp/views.py @@ -9,13 +9,17 @@ from django.contrib.auth.decorators import login_required from BaseModels.mailSender import techSendMail from django.utils.translation import gettext as _ from datetime import datetime +from .funcs import * def route_search_results_View(request): - routes = Route.objects.filter(enable=True).order_by('-modifiedDT') - Dict = { - 'routes': routes - } + Dict = {} + + routes = get_routes_Dict() + if routes: + Dict = { + 'routes': routes['routes'] + } t = loader.get_template('pages/p_results_find_route.html') return HttpResponse(t.render(Dict, request)) From cf627fdb7a22b3845295b4f9e62c471e45443da6 Mon Sep 17 00:00:00 2001 From: borissedw Date: Sun, 6 Aug 2023 12:37:43 +0300 Subject: [PATCH 07/19] 0.0.37 --- static/css/styles(boris).css | 211 +++++++++++++++++- static/img/svg/email.svg | 5 + static/js/user_profile(boris).js | 20 ++ static/js/user_profile.js | 8 +- .../carrier_card/inf_about_moving.html | 29 ++- templates/tb_base.html | 4 + templates/widgets/w_carrier_card.html | 42 +++- 7 files changed, 302 insertions(+), 17 deletions(-) create mode 100644 static/img/svg/email.svg diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 6debae9..fd130d3 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -30,6 +30,7 @@ clear: both; } + /**/ .title-profile-cont{ @@ -695,12 +696,13 @@ box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20); margin-bottom: 20px; border-radius: 10px; - padding: 20px; + /*padding: 20px;*/ } .left-part-carrier-card{ - width: 70%; + width: calc(70% - 20px); float: left; + padding: 20px; } .first-line-card-carrier{ @@ -725,8 +727,211 @@ } .from-to-country-container-carrier{ - width: 90%; + width: calc(100% - 70px); margin: auto; background: #F8F8F8; box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20); + padding-top: 20px; + padding-bottom: 20px; + padding-left: 35px; + padding-right: 35px; + margin-bottom: 20px; +} + +.from-to-country-text.left{ + color: #272424; + font-size: 16px; + font-weight: 500; + width: 46%; + /*padding-top: 20px;*/ + /*padding-bottom: 20px;*/ + /*padding-left: 80px;*/ + float: left; + text-align: right; +} + +.from-to-country-text.right{ + color: #272424; + font-size: 16px; + font-weight: 500; + width: 46%; + /*padding-top: 20px;*/ + /*padding-bottom: 20px;*/ + /*padding-right: 80px;*/ + float: right; + text-align: left; +} + + +.line_inf_about_moving{ + width: 100%; + margin-bottom: 20px; +} + +.container_inf_about_moving.second{ + margin-bottom: 0; +} + +.splitter-from-to-country{ + border: 1px solid #FF613A; + width: 20px; + display: inline-block; + /*width: 5%;*/ + margin-bottom: 4px; + margin-left: 6px; +} + +.container_inf_about_moving{ + display: block; + width: 100%; +} + + +.carrier_inf_moving.left{ + width: 50%; + float: left; + text-align: left; +} +.carrier_inf_moving.right{ + width: 50%; + float: right; + text-align: right; +} + +.splliter-left-right-part-carrier-card{ + border: 1px solid #E6E6E6; + height: 100%; + display: inline-block; + transform: rotate(180deg) ; + position: relative; + left: 70%; +} + +.inf_carrier{ + padding-top: 15px; + display: block; + +} + +.phones_carrier{ + text-decoration: none; + color: #000000; + font-size: 16px; + padding-bottom: 10px; + display: block; +} + +.phones_carrier_span{ + position: relative; + top: 4px; + background: linear-gradient(99deg, #040404 2%, #f5f5f5 16%, #ffffff); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + transition: 200ms; +} + +.phones_carrier_span.active{ + background: unset; + -webkit-background-clip: unset; + -webkit-text-fill-color: unset; +} + +.phones_carrier input{ + display: none; +} +.email_carrier{ + text-decoration: none; + color: #000000; + font-size: 16px; + padding-bottom: 10px; + display: block; +} + +.email_carrier_span{ + position: relative; + top: 6px; + background: linear-gradient(99deg, #040404 2%, #f5f5f5 16%, #ffffff); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + transition: 200ms; +} + +.email_carrier_span.active{ + background: unset; + -webkit-background-clip: unset; + -webkit-text-fill-color: unset; +} + +.email_carrier input{ + display: none; +} + +.open_inf_carrier{ + font-size: 16px; + font-weight: 500; + color: #272424; + border: 2px solid #FF613A; + padding: 8px 16px; + background: #FFFFFF; + transition: 200ms; + border-radius: 10px; + width: 100%; +} + +.open_inf_carrier:hover{ + background: #FF613A; + color: #FFFFFF; +} + + +.open_chat_carrier{ + display: none; +} + +.open_chat_carrier.active{ + display: block; + font-size: 16px; + font-weight: 500; + color: #272424; + border: 2px solid #00a420; + padding: 8px 16px; + background: #FFFFFF; + transition: 200ms; + border-radius: 10px; + width: 100%; + margin-bottom: 10px; +} + +.open_chat_carrier:hover{ + color: #FFFFFF; + background: #00a420; +} + +.inf_carrier_container{ + width: calc(30% - 61px); + float: right; + padding: 20px; + border-left: 1px solid #E6E6E6; +} + +.title_container_inf_carrier{ + font-weight: 500; + font-size: 20px; + color: #272424; + padding-bottom: 10px; +} + +.name_carrier{ + font-size: 16px; + color: #272424; + font-weight: 400; + position: relative; + top: 11px; + left: 4px; +} + +.from-to-city-text{ + font-size: 14px; + color: #27242499; + padding-top: 10px; } \ No newline at end of file diff --git a/static/img/svg/email.svg b/static/img/svg/email.svg new file mode 100644 index 0000000..23407a3 --- /dev/null +++ b/static/img/svg/email.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/static/js/user_profile(boris).js b/static/js/user_profile(boris).js index 0219c78..0d0fda9 100644 --- a/static/js/user_profile(boris).js +++ b/static/js/user_profile(boris).js @@ -247,3 +247,23 @@ function sendMessageEnter (e,id_ticket,sender,receiver){ // } } + + +function show_inf_carrier (el) { + event.preventDefault() + let form = el.form + let ph_1 = form[0] + let ph_2 = form[1] + let em_2 = form[2] + let btn_open_chat = form[3] + + ph_1.parentElement.children[1].classList.toggle("active"); + ph_2.parentElement.children[1].classList.toggle("active"); + em_2.parentElement.children[1].classList.toggle("active"); + if (el.innerHTML === "Скрыть контакт"){ + el.innerHTML = "Открыть контакт" + } else{ + el.innerHTML = "Скрыть контакт" + } + btn_open_chat.classList.toggle("active") +} \ No newline at end of file diff --git a/static/js/user_profile.js b/static/js/user_profile.js index e5cc202..f361e3e 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -396,8 +396,8 @@ function getRoute(){ 'route_id': id } - $.ajax({ - headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, + $.ajax({ + headers: {"X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val()}, url: '/ru/routes/edit_route/', type: "POST", // async: true, @@ -406,14 +406,14 @@ function getRoute(){ contentType: false, // enctype: 'json', data: JSON.stringify(route_obj), - success: function(data){ + success: function (data) { console.log('data received') // location.href = '/profile' document.querySelector(".info_profile").innerHTML = data.html; }, - error: function (data, exception){ + error: function (data, exception) { console.log(101) } diff --git a/templates/small_INCLUDES/carrier_card/inf_about_moving.html b/templates/small_INCLUDES/carrier_card/inf_about_moving.html index d9224fb..28b7be8 100644 --- a/templates/small_INCLUDES/carrier_card/inf_about_moving.html +++ b/templates/small_INCLUDES/carrier_card/inf_about_moving.html @@ -1,10 +1,31 @@ {% load static %} -
-
+
+
+
+
Отправка:
+
{% if route.arrival_DT %}{{ route.arrival_DT }}{% else %}Неизвестно{% endif %}
+
+ +
+
Прибытие:
+
{% if route.departure_DT %}{{ route.departure_DT }}{% else %}Неизвестно{% endif %}
+ +
+
- -
+
+
+
Отправка:
+
{% if route.from_city %}{{ route.from_city }}{% else %}Неизвестно{% endif %} / {% if route.from_airport %}{{ route.from_airport }}{% else %}Неизвестно{% endif %}
+
+ +
+
Прибытие:
+
{% if route.to_city %}{{ route.to_city }}{% else %}Неизвестно{% endif %} / {% if to.from_airport %}{{ route.to_airport }}{% else %}Неизвестно{% endif %}
+ +
+
\ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index 4fb85dc..e95ae44 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -8,6 +8,10 @@ + + + + diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index 8c1c504..43f88e6 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -8,20 +8,50 @@
{{ route.get_type_transport_display }}
+
-
- {{ route.get_from_place_display }} +
+ {% if route.from_country %}{{ route.from_country }}{% else %}Неизвестно{% endif %} / {% if route.from_city %}{{ route.from_city }}{% else %}Неизвестно{% endif %}
-
-
- {{ route.get_to_place_display }} +
+
+ {% if route.to_country %}{{ route.to_country }}{% else %}Неизвестно{% endif %} / {% if route.to_city %}{{ route.to_city }}{% else %}Неизвестно{% endif %}
{% include "small_INCLUDES/carrier_card/inf_about_moving.html" %} +
-
+{#
#} +
+
Контакты отправителия:
+
+ + Иванов Иван +
+
+ + + +
+
\ No newline at end of file From db430edb90c4a4e71d7ed5f215c68e64a2fb880c Mon Sep 17 00:00:00 2001 From: borissedw Date: Sun, 6 Aug 2023 12:41:55 +0300 Subject: [PATCH 08/19] 0.0.38 --- static/js/find_route.js | 18 ++++++++++++++++++ static/js/user_profile(boris).js | 18 ------------------ templates/pages/p_results_find_route.html | 4 ++++ templates/tb_base.html | 4 ---- 4 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 static/js/find_route.js diff --git a/static/js/find_route.js b/static/js/find_route.js new file mode 100644 index 0000000..53b7da3 --- /dev/null +++ b/static/js/find_route.js @@ -0,0 +1,18 @@ +function show_inf_carrier (el) { + event.preventDefault() + let form = el.form + let ph_1 = form[0] + let ph_2 = form[1] + let em_2 = form[2] + let btn_open_chat = form[3] + + ph_1.parentElement.children[1].classList.toggle("active"); + ph_2.parentElement.children[1].classList.toggle("active"); + em_2.parentElement.children[1].classList.toggle("active"); + if (el.innerHTML === "Скрыть контакт"){ + el.innerHTML = "Открыть контакт" + } else{ + el.innerHTML = "Скрыть контакт" + } + btn_open_chat.classList.toggle("active") +} \ No newline at end of file diff --git a/static/js/user_profile(boris).js b/static/js/user_profile(boris).js index 0d0fda9..0cf2945 100644 --- a/static/js/user_profile(boris).js +++ b/static/js/user_profile(boris).js @@ -249,21 +249,3 @@ function sendMessageEnter (e,id_ticket,sender,receiver){ } -function show_inf_carrier (el) { - event.preventDefault() - let form = el.form - let ph_1 = form[0] - let ph_2 = form[1] - let em_2 = form[2] - let btn_open_chat = form[3] - - ph_1.parentElement.children[1].classList.toggle("active"); - ph_2.parentElement.children[1].classList.toggle("active"); - em_2.parentElement.children[1].classList.toggle("active"); - if (el.innerHTML === "Скрыть контакт"){ - el.innerHTML = "Открыть контакт" - } else{ - el.innerHTML = "Скрыть контакт" - } - btn_open_chat.classList.toggle("active") -} \ No newline at end of file diff --git a/templates/pages/p_results_find_route.html b/templates/pages/p_results_find_route.html index a03456d..6f6e029 100644 --- a/templates/pages/p_results_find_route.html +++ b/templates/pages/p_results_find_route.html @@ -1,6 +1,10 @@ {% extends "tb_base.html" %} {% load static %} +{% block meta %} + +{% endblock %} + {% block content %}
diff --git a/templates/tb_base.html b/templates/tb_base.html index e95ae44..4fb85dc 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -8,10 +8,6 @@ - - - - From 29d3431dde43ab02ad5ba87cc8ccf2df1af10490 Mon Sep 17 00:00:00 2001 From: borissedw Date: Sun, 6 Aug 2023 12:58:02 +0300 Subject: [PATCH 09/19] 0.0.39 --- static/css/styles(boris).css | 12 +++++++++--- static/img/svg/arrow.svg | 3 +++ .../carrier_card/inf_about_moving.html | 12 ++++++------ 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 static/img/svg/arrow.svg diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index fd130d3..9ee83cf 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -778,7 +778,7 @@ display: inline-block; /*width: 5%;*/ margin-bottom: 4px; - margin-left: 6px; + margin-left: 9px; } .container_inf_about_moving{ @@ -788,12 +788,12 @@ .carrier_inf_moving.left{ - width: 50%; + width: 41%; float: left; text-align: left; } .carrier_inf_moving.right{ - width: 50%; + width: 41%; float: right; text-align: right; } @@ -934,4 +934,10 @@ font-size: 14px; color: #27242499; padding-top: 10px; +} + +.arrow_inf_about_moving{ + position: relative; + top: 19px; + left: 18px; } \ No newline at end of file diff --git a/static/img/svg/arrow.svg b/static/img/svg/arrow.svg new file mode 100644 index 0000000..f1df9b1 --- /dev/null +++ b/static/img/svg/arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/templates/small_INCLUDES/carrier_card/inf_about_moving.html b/templates/small_INCLUDES/carrier_card/inf_about_moving.html index 28b7be8..091f189 100644 --- a/templates/small_INCLUDES/carrier_card/inf_about_moving.html +++ b/templates/small_INCLUDES/carrier_card/inf_about_moving.html @@ -6,7 +6,7 @@
{% if route.arrival_DT %}{{ route.arrival_DT }}{% else %}Неизвестно{% endif %}
- +
Прибытие:
{% if route.departure_DT %}{{ route.departure_DT }}{% else %}Неизвестно{% endif %}
@@ -16,14 +16,14 @@
-
Отправка:
-
{% if route.from_city %}{{ route.from_city }}{% else %}Неизвестно{% endif %} / {% if route.from_airport %}{{ route.from_airport }}{% else %}Неизвестно{% endif %}
+
Откуда заберёт:
+
{% if route.type_transport == 'avia' %}{{ route.from_airport }}{% else %}{{ route.get_from_place_display }}{% endif %}
- +
-
Прибытие:
-
{% if route.to_city %}{{ route.to_city }}{% else %}Неизвестно{% endif %} / {% if to.from_airport %}{{ route.to_airport }}{% else %}Неизвестно{% endif %}
+
Куда доставит:
+
{% if route.type_transport == 'avia' %}{{ route.to_airport }}{% else %}{{ route.get_to_place_display }}{% endif %}
From b3bee232c34a665d88c726a5c60c196f13ba5ff2 Mon Sep 17 00:00:00 2001 From: SDE Date: Sun, 6 Aug 2023 13:05:17 +0300 Subject: [PATCH 10/19] 0.1.32 search routes page --- RoutesApp/admin.py | 4 +++- templates/small_INCLUDES/carrier_card/inf_about_moving.html | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RoutesApp/admin.py b/RoutesApp/admin.py index 5789c13..715b9c6 100644 --- a/RoutesApp/admin.py +++ b/RoutesApp/admin.py @@ -2,7 +2,7 @@ from sets.admin import * from .models import * from django.contrib import admin -class Admin_Route(Admin_Trans_BaseModelViewPage): +class Admin_Route(Admin_Trans_BaseModel): list_display = [ 'id', 'type_transport', 'cargo_type', 'departure_DT', 'from_address_point', 'from_place', @@ -10,4 +10,6 @@ class Admin_Route(Admin_Trans_BaseModelViewPage): 'order', 'modifiedDT', 'createDT' ] + list_display_links = ['id'] + admin.site.register(Route,Admin_Route) diff --git a/templates/small_INCLUDES/carrier_card/inf_about_moving.html b/templates/small_INCLUDES/carrier_card/inf_about_moving.html index 091f189..7765f34 100644 --- a/templates/small_INCLUDES/carrier_card/inf_about_moving.html +++ b/templates/small_INCLUDES/carrier_card/inf_about_moving.html @@ -17,13 +17,13 @@
Откуда заберёт:
-
{% if route.type_transport == 'avia' %}{{ route.from_airport }}{% else %}{{ route.get_from_place_display }}{% endif %}
+
{% if route.from_place == 'airport' %}{{ route.from_airport }}{% else %}{{ route.get_from_place_display }}{% endif %}
Куда доставит:
-
{% if route.type_transport == 'avia' %}{{ route.to_airport }}{% else %}{{ route.get_to_place_display }}{% endif %}
+
{% if route.to_place == 'airport' %}{{ route.to_airport }}{% else %}{{ route.get_to_place_display }}{% endif %}
From 9a1ee8d971eec31fe2b9297db8999c5d191881e9 Mon Sep 17 00:00:00 2001 From: borissedw Date: Sun, 6 Aug 2023 13:36:15 +0300 Subject: [PATCH 11/19] 0.0.40 --- static/css/styles(boris).css | 26 +++++++++++++++++++----- static/js/find_route.js | 18 +++++++++++------ templates/widgets/w_carrier_card.html | 29 +++++++++++++-------------- 3 files changed, 47 insertions(+), 26 deletions(-) diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 9ee83cf..2d270b9 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -700,7 +700,7 @@ } .left-part-carrier-card{ - width: calc(70% - 20px); + width: calc(65% - 20px); float: left; padding: 20px; } @@ -810,7 +810,7 @@ .inf_carrier{ padding-top: 15px; display: block; - + margin-bottom: 15px; } .phones_carrier{ @@ -824,16 +824,26 @@ .phones_carrier_span{ position: relative; top: 4px; - background: linear-gradient(99deg, #040404 2%, #f5f5f5 16%, #ffffff); + background: linear-gradient(99deg, #040404 56%, #9f9f9f 25%, #ffffff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; transition: 200ms; + width: calc(90% - 10px); + overflow: hidden; + float: right; + padding-right: 10px; +} + +.inf_carrier_icon{ + width: 10%; } .phones_carrier_span.active{ background: unset; -webkit-background-clip: unset; -webkit-text-fill-color: unset; + overflow: unset; + overflow-wrap: break-word; } .phones_carrier input{ @@ -849,17 +859,23 @@ .email_carrier_span{ position: relative; - top: 6px; + top: 2px; background: linear-gradient(99deg, #040404 2%, #f5f5f5 16%, #ffffff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; transition: 200ms; + width: calc(90% - 10px); + float: right; + overflow: hidden; + padding-right: 10px; } .email_carrier_span.active{ background: unset; -webkit-background-clip: unset; -webkit-text-fill-color: unset; + overflow: unset; + overflow-wrap: break-word; } .email_carrier input{ @@ -908,7 +924,7 @@ } .inf_carrier_container{ - width: calc(30% - 61px); + width: calc(35% - 61px); float: right; padding: 20px; border-left: 1px solid #E6E6E6; diff --git a/static/js/find_route.js b/static/js/find_route.js index 53b7da3..631dce2 100644 --- a/static/js/find_route.js +++ b/static/js/find_route.js @@ -7,12 +7,18 @@ function show_inf_carrier (el) { let btn_open_chat = form[3] ph_1.parentElement.children[1].classList.toggle("active"); - ph_2.parentElement.children[1].classList.toggle("active"); - em_2.parentElement.children[1].classList.toggle("active"); - if (el.innerHTML === "Скрыть контакт"){ - el.innerHTML = "Открыть контакт" - } else{ - el.innerHTML = "Скрыть контакт" + try { + ph_2.parentElement.children[1].classList.toggle("active"); + } catch { + // p } + + em_2.parentElement.children[1].classList.toggle("active"); btn_open_chat.classList.toggle("active") + if (el.style.display === "none"){ + el.style.display = "" + } else { + el.style.display = "none" + } + } \ No newline at end of file diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index 43f88e6..228bb20 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -27,27 +27,26 @@
Контакты отправителия:
- Иванов Иван + {{ route.owner.last_name }} {{ route.owner.first_name }}
- +
From 1ea38af75fa91278d5bf7b01d8f5fc58a57961d3 Mon Sep 17 00:00:00 2001 From: borissedw Date: Sun, 6 Aug 2023 13:37:07 +0300 Subject: [PATCH 12/19] 0.0.41 --- static/js/user_profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index f361e3e..899e7c6 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -1,7 +1,7 @@ function writeMessage(){ $.ajax({ headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, - url: '/ru/user_account/new_msg_to_user/', + url: '/ru/user_account/chats/', type: "POST", // async: true, cache: false, From ec317aa8ba5ac0af463ff595ed5027a302f05b0d Mon Sep 17 00:00:00 2001 From: SDE Date: Sun, 6 Aug 2023 13:53:28 +0300 Subject: [PATCH 13/19] 0.1.33 chat routines --- AuthApp/js_urls.py | 2 +- AuthApp/js_views.py | 4 +-- AuthApp/urls.py | 2 ++ AuthApp/views.py | 28 +++++++++++++++++++ ChatServiceApp/funcs.py | 23 +++++++++++++++ ChatServiceApp/templatetags/tt_chat.py | 4 ++- templates/blocks/b_user_profile.html | 20 ++++--------- .../{b_new_msg_to_user.html => b_chats.html} | 0 .../blocks/profile/b_profile_first_page.html | 15 ++++++++++ 9 files changed, 79 insertions(+), 19 deletions(-) rename templates/blocks/profile/{b_new_msg_to_user.html => b_chats.html} (100%) create mode 100644 templates/blocks/profile/b_profile_first_page.html diff --git a/AuthApp/js_urls.py b/AuthApp/js_urls.py index 00a21a8..f071d50 100644 --- a/AuthApp/js_urls.py +++ b/AuthApp/js_urls.py @@ -15,7 +15,7 @@ urlpatterns = [ path('my_routes/', my_routes_ajax, name='my_routes_ajax'), path('subscribe/', subscribe_ajax, name='subscribe_ajax'), - path('new_msg_to_user/', new_msg_to_user_ajax, name='new_msg_to_user' ), + path('chats/', chats_ajax, name='chats_ajax'), path('support_tickets/', support_tickets_ajax, name='support_tickets_ajax'), diff --git a/AuthApp/js_views.py b/AuthApp/js_views.py index 4d51687..d3c1fde 100644 --- a/AuthApp/js_views.py +++ b/AuthApp/js_views.py @@ -25,14 +25,14 @@ def subscribe_ajax(request): return JsonResponse({'html': html}, status=200) @login_required(login_url='/profile/login/') -def new_msg_to_user_ajax(request): +def chats_ajax(request): if request.method != 'POST': raise Http404 Dict = { } - html = render_to_string('blocks/profile/b_new_msg_to_user.html', Dict, request=request) + html = render_to_string('blocks/profile/b_chats.html', Dict, request=request) return JsonResponse({'html': html}, status=200) @login_required(login_url='/profile/login/') diff --git a/AuthApp/urls.py b/AuthApp/urls.py index 4a8dac7..f2aec95 100644 --- a/AuthApp/urls.py +++ b/AuthApp/urls.py @@ -9,6 +9,8 @@ urlpatterns = [ path('registration/', registration_View, name='registration_page'), path('', user_profile_View, name='user_profile'), + path('chat//', chat_w_user_View, name='chat_w_user'), + path('chat/', chat_w_user_View, name='chat_w_user_wo_user_id'), path('login/', login_View, name='login_profile'), diff --git a/AuthApp/views.py b/AuthApp/views.py index 4cc18a5..c47eb2f 100644 --- a/AuthApp/views.py +++ b/AuthApp/views.py @@ -22,6 +22,34 @@ def registration_View(request): return HttpResponse(t.render(Dict, request)) + +@login_required(login_url='/profile/login/') +def chat_w_user_View(request, user_id=None): + from ChatServiceApp.funcs import get_chat_receivers_for_user, get_msgs_for_chat_w_users + + receivers = get_chat_receivers_for_user(request.user) + + cur_chat_msgs = None + + try: + cur_receiver = User.objects.get(id=user_id) + if not cur_receiver in receivers: + receivers.insert(0, cur_receiver) + cur_chat_msgs = get_msgs_for_chat_w_users(request.user, cur_receiver) + except User.DoesNotExist: + cur_receiver = None + + + Dict = { + 'page': 'chat', + 'cur_receiver': cur_receiver, + 'receivers': receivers, + 'cur_chat_msgs':cur_chat_msgs + } + + t = loader.get_template('pages/profile/p_user_profile.html') + return HttpResponse(t.render(Dict, request)) + @login_required(login_url='/profile/login/') def user_profile_View(request): diff --git a/ChatServiceApp/funcs.py b/ChatServiceApp/funcs.py index 7e74b52..0097fdb 100644 --- a/ChatServiceApp/funcs.py +++ b/ChatServiceApp/funcs.py @@ -1,4 +1,27 @@ from .models import * +from django.db.models import Q + + +def get_msgs_for_chat_w_users(user1, user2): + + msgs = Message.objects.filter( + Q(sender=user1) | Q(receiver=user1), + Q(sender=user2) | Q(receiver=user2), + group=None + ) + return msgs + +def get_chat_receivers_for_user(user): + receivers = Message.objects.filter( + Q(sender=user) | Q(receiver=user), + group=None + ).order_by('-modifiedDT').values('sender', 'receiver') + + receivers_list = [] + receivers_list.extend([item['sender'] for item in receivers if item['sender'] != user]) + receivers_list.extend([item['receiver'] for item in receivers if item['receiver'] != user]) + + return receivers_list def get_messages_for_ticket(ticket): return ticket.rel_messages_for_group.filter(enable=True).order_by('-modifiedDT') diff --git a/ChatServiceApp/templatetags/tt_chat.py b/ChatServiceApp/templatetags/tt_chat.py index 4c93e8e..e65385a 100644 --- a/ChatServiceApp/templatetags/tt_chat.py +++ b/ChatServiceApp/templatetags/tt_chat.py @@ -17,10 +17,12 @@ def get_msg_side(cur_user, ticket, msg): return 'right' else: return 'left' - else: + elif ticket: if ticket.owner == cur_user: return 'right' else: return 'left' + else: + return 'right' # return 'left' \ No newline at end of file diff --git a/templates/blocks/b_user_profile.html b/templates/blocks/b_user_profile.html index 8e39b96..732cab5 100644 --- a/templates/blocks/b_user_profile.html +++ b/templates/blocks/b_user_profile.html @@ -31,20 +31,10 @@
-

Добро пожаловать: {{ user.first_name }} {{ user.last_name }} ({{ user.username }})

-
-
-
Статус: {{ user.user_profile.get_account_type_display }}
-{#
#} -{#
#} -
-
-
Если хотите отправить посылку - зарегистрируйтесь, как отправитель
-
Если у Вас возникнут вопросы Вы можете связаться с нами: support@twb.com
-
У Вас три новых сообщения. Посмотреть
-
Хотите получать уведомление о появлении посылок? Заполните форму
+ {% if not page %} + {% include "blocks/profile/b_profile_first_page.html" %} + {% elif page == 'chat' %} + {% include "blocks/profile/b_chats.html" %} + {% endif %}
\ No newline at end of file diff --git a/templates/blocks/profile/b_new_msg_to_user.html b/templates/blocks/profile/b_chats.html similarity index 100% rename from templates/blocks/profile/b_new_msg_to_user.html rename to templates/blocks/profile/b_chats.html diff --git a/templates/blocks/profile/b_profile_first_page.html b/templates/blocks/profile/b_profile_first_page.html new file mode 100644 index 0000000..a751731 --- /dev/null +++ b/templates/blocks/profile/b_profile_first_page.html @@ -0,0 +1,15 @@ +

Добро пожаловать: {{ user.first_name }} {{ user.last_name }} ({{ user.username }})

+
+
+
Статус: {{ user.user_profile.get_account_type_display }}
+{#
#} +{#
#} +
+
+
Если хотите отправить посылку - зарегистрируйтесь, как отправитель
+
Если у Вас возникнут вопросы Вы можете связаться с нами: support@twb.com
+
У Вас три новых сообщения. Посмотреть
+
Хотите получать уведомление о появлении посылок? Заполните форму
\ No newline at end of file From 55ddbe917f6dc7ab3d47e97c4e8ce1498bd7a839 Mon Sep 17 00:00:00 2001 From: borissedw Date: Sun, 6 Aug 2023 14:14:27 +0300 Subject: [PATCH 14/19] 0.0.42 --- static/css/styles(boris).css | 17 ++++++++--------- static/js/find_route.js | 3 ++- templates/widgets/w_carrier_card.html | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 2d270b9..cd7d927 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -700,9 +700,9 @@ } .left-part-carrier-card{ - width: calc(65% - 20px); + width: 58%; float: left; - padding: 20px; + padding: 2%; } .first-line-card-carrier{ @@ -912,21 +912,20 @@ border: 2px solid #00a420; padding: 8px 16px; background: #FFFFFF; - transition: 200ms; border-radius: 10px; width: 100%; margin-bottom: 10px; } -.open_chat_carrier:hover{ - color: #FFFFFF; - background: #00a420; -} +/*.open_chat_carrier:hover{*/ +/* color: #FFFFFF;*/ +/* background: #00A420;*/ +/*}*/ .inf_carrier_container{ - width: calc(35% - 61px); + width: 33%; float: right; - padding: 20px; + padding: 2%; border-left: 1px solid #E6E6E6; } diff --git a/static/js/find_route.js b/static/js/find_route.js index 631dce2..52245c6 100644 --- a/static/js/find_route.js +++ b/static/js/find_route.js @@ -21,4 +21,5 @@ function show_inf_carrier (el) { el.style.display = "none" } -} \ No newline at end of file +} + diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index 228bb20..3f223e4 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -43,9 +43,9 @@
From a40a3602b8439a8b8a944ca4d2b3744cf293af53 Mon Sep 17 00:00:00 2001 From: borissedw Date: Sun, 6 Aug 2023 14:39:34 +0300 Subject: [PATCH 15/19] 0.0.43 --- templates/widgets/w_carrier_card.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index 3f223e4..9440f8e 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -42,7 +42,7 @@
-
-
-
-
-
- - Сергейко Сергей -
-
- - -
+{#
#} +{#
#} +{#
#} +{#
#} +{# #} +{# Сергейко Сергей#} +{#
#} +{#
#} +{# #} +{# #} +{#
#} +{#
#} +{#
#} +{# {% include "widgets/w_message.html" %}#} +{#
#} +{# #} +{#
#} +{#
#} +{# Пользователи#} +{#
#} +{# {% include "widgets/w_tab_user.html" %}#} +{#
#} +{#
#} +{#
#} + + +
+
+
+ + {{ ticket.manager.last_name }} {{ ticket.manager.first_name }}
-
- {% include "widgets/w_message.html" %} -
- -
- Пользователи -
- {% include "widgets/w_tab_user.html" %} + +
+ {% 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 %} +
+ + +
+
+ Неразобранные тикеты +
+ {% if tickets_wo_manager %} + {% for item in tickets_wo_manager %} + {% include "widgets/w_tab_user.html" %} + {% endfor %} + {% endif %} +
\ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index 4fb85dc..1132407 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -8,9 +8,11 @@ + - + + {% block meta %} diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index 9440f8e..b5208e2 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -43,9 +43,9 @@