1.2.2 limitation of color selection for 24 hours TRI-228

This commit is contained in:
2024-08-20 12:18:52 +03:00
parent e51b23cb91
commit 8a539a2868

View File

@@ -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" %}
<div class="carrier-card out_of_date" data-number-of-route="{{ route.id }}">
{% else %}
<div class="carrier-card {% if route.highlight_color %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}">
{% 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" %}
<div class="carrier-card out_of_date" data-number-of-route="{{ route.id }}">
{% else %}
<div class="carrier-card {% if route.highlight_color and highlight_end_DT|date:"Y-m-d H:i:s" > current_datetime|date:"Y-m-d H:i:s" %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}">
{% endif %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endif %}