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:
@@ -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">#}
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
<span class="phones_carrier_span{% if route.owner == user %} active{% endif %} el_for_open_el"></span>
|
||||
<div class="clear_both"></div>
|
||||
</a>
|
||||
<a class="email_carrier" data-href="mailto:{{ route.owner.email }}">
|
||||
<a class="email_carrier" data-href="mailto:">
|
||||
<img class="inf_carrier_icon" src="{% static "/img/svg/email.svg" %}">
|
||||
<span class="email_carrier_span{% if route.owner == user %} active{% endif %} el_for_open_el"></span>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user