From e51b23cb916ae84f1a9c413ff9442271349e6d9a Mon Sep 17 00:00:00 2001 From: ArtemB Date: Mon, 19 Aug 2024 16:27:31 +0300 Subject: [PATCH 1/3] 1.2.2 upd mover search card TRI-246 --- templates/widgets/w_carrier_card.html | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index 9e66988..7439a5a 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -18,24 +18,7 @@ {% endif %}
- {% if route.owner_type == 'mover' %} -
-
- {% translate "Перевозчик:" %} -
- -
- {% if route.type_transport == 'road' %} - - {% elif route.type_transport == 'avia'%} - - {% endif %} - {{ route.get_type_transport_display }} -
-
-
- {% endif %} - {% if route.owner_type == 'customer' %} + {% if route.owner_type == 'customer' or route.owner_type == 'mover' %}
{% translate "Тип: " %}{{ route.get_cargo_type_display }} From 8a539a2868430978994b09ec2799e8f3e421d26a Mon Sep 17 00:00:00 2001 From: ArtemB Date: Tue, 20 Aug 2024 12:18:52 +0300 Subject: [PATCH 2/3] 1.2.2 limitation of color selection for 24 hours TRI-228 --- templates/widgets/routes/w_my_route.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/templates/widgets/routes/w_my_route.html b/templates/widgets/routes/w_my_route.html index d121ffb..87c5122 100644 --- a/templates/widgets/routes/w_my_route.html +++ b/templates/widgets/routes/w_my_route.html @@ -1,15 +1,16 @@ {% load static %} {% load i18n %} - {% if route.departure_DT %} {% with current_datetime=route.from_city.get_current_datetime %} {% with departure_datetime=route.departure_DT %} - {% if current_datetime|date:"Y-m-d H:i:s" > departure_datetime|date:"Y-m-d H:i:s" %} -
- {% else %} -
- {% endif %} + {% with highlight_end_DT=route.highlight_end_DT %} + {% if current_datetime|date:"Y-m-d H:i:s" > departure_datetime|date:"Y-m-d H:i:s" %} +
+ {% else %} +
current_datetime|date:"Y-m-d H:i:s" %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}"> + {% endif %} + {% endwith %} {% endwith %} {% endwith %} {% endif %} From 83aeab93414e29b5be10727e82a898a428a978a8 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Tue, 20 Aug 2024 13:27:29 +0300 Subject: [PATCH 3/3] 1.2.4 upd meta_OpenGraph_Schema.html TRI-200 --- static/js/dynamic_loading_routes.js | 2 +- templates/inter/meta_OpenGraph.html | 42 - templates/inter/meta_OpenGraph_Schema.html | 1018 ++++++++++++++++++++ templates/tb_base.html | 2 +- 4 files changed, 1020 insertions(+), 44 deletions(-) delete mode 100644 templates/inter/meta_OpenGraph.html create mode 100644 templates/inter/meta_OpenGraph_Schema.html diff --git a/static/js/dynamic_loading_routes.js b/static/js/dynamic_loading_routes.js index 718fb8b..cb6e8cf 100644 --- a/static/js/dynamic_loading_routes.js +++ b/static/js/dynamic_loading_routes.js @@ -177,7 +177,7 @@ function load_routes (el,news=null,incrase,owner_type) { } let first_block_iteration = document.querySelector(`.page_paging_elements_${paging_iterator}`) let insert_place = null - if (first_block_iteration.innerHTML){ + if (first_block_iteration && first_block_iteration.innerHTML){ paging_iterator++ let new_page_paging_elements = document.createElement('div') new_page_paging_elements.classList.add(`page_paging_elements_${paging_iterator}`) diff --git a/templates/inter/meta_OpenGraph.html b/templates/inter/meta_OpenGraph.html deleted file mode 100644 index d1aedc5..0000000 --- a/templates/inter/meta_OpenGraph.html +++ /dev/null @@ -1,42 +0,0 @@ - -{% if page.url == 'main' %} - - - -{% endif %} - - - - - -{% if page.url == 'about_service' and page.url == 'ru' %} - - - - - - - - - - - - -{% endif %} - -{% if page.url == 'about_service' and page.url == 'en' %} - - - - - - - - - - - - - - -{% endif %} \ No newline at end of file diff --git a/templates/inter/meta_OpenGraph_Schema.html b/templates/inter/meta_OpenGraph_Schema.html new file mode 100644 index 0000000..d668124 --- /dev/null +++ b/templates/inter/meta_OpenGraph_Schema.html @@ -0,0 +1,1018 @@ + +{% if page.url == 'main' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'main' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + +{% endif %} + + + +{% if page_name == 'create_route_for_mover' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page_name == 'create_route_for_mover' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + + +{% endif %} + + + + +{% if page_name == 'create_route_for_customer' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page_name == 'create_route_for_customer' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'for_customers' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + +{% endif %} + + +{% if page.url == 'for_customers' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'for_movers' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'for_movers' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'about_service' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + + +{% if page.url == 'about_service' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if articles and request.LANGUAGE_CODE == 'ru' and not page.url == 'main' %} + + + + + + + + + + + + + + + + + + + + +{% endif %} + + +{% if articles and request.LANGUAGE_CODE == 'en' and not page.url == 'main' %} + + + + + + + + + + + + + + + + + + +{% endif %} + + +{% if page.url == 'partners' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'partners' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + +{% endif %} + + +{% if page.url == 'advertisement' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'advertisement' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'customer_service' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'customer_service' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'contacts' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'contacts' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + +{% endif %} \ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index 8aacbdf..73ae945 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -18,7 +18,7 @@ - {% include "inter/meta_OpenGraph.html" %} + {% include "inter/meta_OpenGraph_Schema.html" %}