From 01f61367984a70dd1b29aa18cc080946c375c3ab Mon Sep 17 00:00:00 2001 From: ArtemB Date: Fri, 12 Apr 2024 15:43:09 +0300 Subject: [PATCH] 0.1.369 compare with current_date --- static/css/styles.css | 6 ++++++ .../carrier_card/inf_about_moving.html | 8 +++++++- templates/widgets/w_carrier_card.html | 13 +++++++++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index fb90a1e..ef15686 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1076,6 +1076,12 @@ input.deactive { left: 29%; } +.out_of_date{ + pointer-events: none; + filter: grayscale(100%); + opacity: 0.5; +} + .title_for_msg_by_email{ display: none; z-index: 100; diff --git a/templates/small_INCLUDES/carrier_card/inf_about_moving.html b/templates/small_INCLUDES/carrier_card/inf_about_moving.html index 6e19650..86fa698 100644 --- a/templates/small_INCLUDES/carrier_card/inf_about_moving.html +++ b/templates/small_INCLUDES/carrier_card/inf_about_moving.html @@ -4,7 +4,13 @@
{% translate "Отправка:" %}
-
{% if route.departure_DT %}{{ route.departure_DT|date:"l: d.m.Y H:i" }}{% else %}{% translate "Неизвестно" %}{% endif %}
+
+ {% if route.departure_DT %} + {{ route.departure_DT|date:"l: d.m.Y H:i" }} + {% else %} + {% translate "Неизвестно" %} + {% endif %} +
diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index 0449a71..4a72462 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -1,8 +1,17 @@ {% load static %} {% load i18n %} -
-
+{% if route.departure_DT %} + {% now 'Y-m-d H:i:s' as current_date %} + {% if route.departure_DT < current_date %} +
+ {% else %} +
+ {% endif %} +{% else %} +
+{% endif %} +
{% if route.owner_type == 'mover' %}