1.1.50 add pagination for b_my_routes.html && upd conditional rendering for carrier card based on departure date

This commit is contained in:
2024-07-29 19:32:13 +03:00
parent d37b694d5a
commit b905fab6c5
3 changed files with 26 additions and 4 deletions

View File

@@ -2,7 +2,17 @@
{% load i18n %}
<div class="carrier-card {% if route.highlight_color %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}">
{% 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 %}
{% endwith %}
{% endwith %}
{% endif %}
{#<div class="carrier-card"{% if route.highlight_color %} style="border: 5px solid {{ route.highlight_color }};"{% endif %} data-number-of-route="{{ route.id }}">#}
<div class="left-part-carrier-card">
{# <div class="first-line-card-carrier">#}