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:
@@ -1,3 +1,15 @@
|
|||||||
<div>
|
{% load static %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
<div class="page_paging_elements_1">
|
||||||
{% include 'blocks/routes/b_my_routes_list.html' %}
|
{% include 'blocks/routes/b_my_routes_list.html' %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if last_block == False and next_page_els_count %}
|
||||||
|
<div class="text-align-center">
|
||||||
|
<button class="button-find-more-routes" id="{{ last_el }}" onclick="load_routes(this,null,{{ next_page_els_count }},'{{ owner_type }}')">{% trans "Показать ещё" %}<span class="col_vo_els_f_load"> {{ next_page_els_count }}</span></button>
|
||||||
|
<div class="width-100 text-align-center mb-10">
|
||||||
|
<img class="loader_f_loading_routes" src="{% static "img/svg/loader.svg" %}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
@@ -2,7 +2,17 @@
|
|||||||
{% load i18n %}
|
{% 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="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="left-part-carrier-card">
|
||||||
{# <div class="first-line-card-carrier">#}
|
{# <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>
|
<span class="phones_carrier_span{% if route.owner == user %} active{% endif %} el_for_open_el"></span>
|
||||||
<div class="clear_both"></div>
|
<div class="clear_both"></div>
|
||||||
</a>
|
</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" %}">
|
<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>
|
<span class="email_carrier_span{% if route.owner == user %} active{% endif %} el_for_open_el"></span>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user