{% for route in routes %}

    {% load static %}
    {% load i18n %}


<div class="carrier-card" data-number-of-route="{{ route.id }}">
    <div class="left-part-carrier-card">
{#        <div class="first-line-card-carrier">#}
{#            <div class="carrier-title">#}
{#                Перевозчик:#}
{#            </div>#}
{#            <div class="type_transportation_carrier">#}
{#                {{ route.get_type_transport_display }}#}
{#            </div>#}
{#            <div class="clear_both"></div>#}
{#        </div>#}
                    <div class="route_info_about">
                    <span>
                        Тип:{{ route.get_cargo_type_display }}
                    </span>

                    <span>
                       Вес:{{ route.weight }} кг
                    </span>

                    <span>

                        {{ route.get_type_transport_display }}
                    </span>

                </div>
        <div class="from-to-country-container-carrier">
            <div class="from-to-country-text left fl-left txt-al-right" title="{{ route.from_country_n_city_str }}">
                {{ route.from_country_n_city_str }}
            </div>
            <div class="splitter-from-to-country"></div>
            <div class="from-to-country-text right fl-right txt-al-left" title="{{ route.to_country_n_city_str }}">
                {{ route.to_country_n_city_str }}
            </div>
        </div>
        {% include "small_INCLUDES/carrier_card/inf_about_moving.html" %}

    </div>

    <div class="inf_carrier_container">
        <div class="title_container_inf_carrier">
            {% translate 'Контакты' %}
            {% if route.owner_type == 'mover' %}
                {% translate "перевозчика" %}
                <img class="inf_carrier_icon" src="{% static "/img/svg/mover.svg" %}"/>
            {% elif route.owner_type == 'customer'%}
                {% translate "отправителя" %}
                <img class="inf_carrier_icon" src="{% static "/img/svg/cargo.svg" %}"/>
            {% endif %}
        </div>
        <div>
            <img src="{% static "/delete_later/Avatar.png" %}">
            <span class="name_carrier">{{ route.owner.last_name }} {{ route.owner.first_name }}</span>
        </div>
        <div name="form_carrier">
            <div class="inf_carrier">
                <a class="phones_carrier" href="tel:{{ route.phone }}">
                    <img class="inf_carrier_icon" src="{% static "/img/svg/phone.svg" %}"/>
                    <span class="phones_carrier_span{% if route.owner == user %} active{% endif %} el_for_open_el">{{ route.phone }}</span>
                    <input value="{{ route.phone }}">
                    <div class="clear_both"></div>
                </a>
                <a class="email_carrier" href="mailto:{{ route.owner.email }}">
                    <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">{{ route.owner.email }}</span>
                    <input value="{{ route.owner.email }}">
                    <div class="clear_both"></div>
                </a>

             <div class="button_edit_route">
                    <button onclick="editRoute({{ route.id }})"
                            id="edit_route">
                            Редактировать
                    </button>
                </div>
                <div class="button_remove_route">
                     <button
                             onclick="confirmRemove(this)"
                            id="remove_route">
                            Удалить
                    </button>
                </div>
            </div>
            {% if route.owner != user %}
                <button class="open_chat_carrier" onclick="open_chat({{ route.owner_id }})">
                    <img src="{% static "img/svg/Logo.svg" %}" width="30px">
                    <span >Написать сообщение</span>
                    <img src="{% static "/img/svg/email.svg" %}" width="25px" style="position:relative;left: 3px;">
                </button>
                <button class="open_inf_carrier" onclick="show_inf_carrier(this)">Открыть контакт</button>
            {% endif %}
        </div>


    </div>
    <div class="clear_both"></div>

</div>

{% endfor %}


{#<div class="my_route">#}
{#            <div class="route_info">#}
{#                <div class="route_info_about">#}
{#                    <span>#}
{#                        Тип:{{ route.get_cargo_type_display }}#}
{#                    </span>#}
{##}
{#                    <span>#}
{#                       Вес:{{ route.weight }} кг#}
{#                    </span>#}
{##}
{#                    <span>#}
{##}
{#                        {{ route.get_type_transport_display }}#}
{#                    </span>#}
{##}
{#                </div>#}
{##}
{#                <div class="route_info_point">#}
{##}
{#                    <div>#}
{#                        <div>#}
{#                             <span>#}
{#                           {{ route.from_country.name }}/{{ route.from_city.name }}#}
{#                            </span>#}
{##}
{#                            <div></div>#}
{#                        </div>#}
{##}
{##}
{#                        <span>#}
{#                             {{ route.to_country.name }}/{{ route.to_city.name }}#}
{#                        </span>#}
{#                    </div>#}
{#                </div>#}
{##}
{#                <div class="route_info_date">#}
{#                   Отправка: {{route.departure_DT  }}#}
{#                   Прибытие: {{route.arrival_DT  }}#}
{#                </div>#}
{##}
{#                <div class="route_info_ft_place">#}
{#                    Откуда заберёт:{{ route.from_place }}#}
{#                    Куда доставит:{{ route.to_place }}#}
{#                </div>#}
{##}
{#            </div>#}
{##}
{#            #}
{#            <div class="route_contact">#}
{##}
{#                <h2>Контакты перевозчика:</h2>#}
{##}
{#                <div class="route_contact_name">#}
{#                    {{ route.owner.last_name }} {{ route.owner.first_name }}#}
{#                </div>#}
{##}
{#                <div class="route_contact_phone_email">#}
{#                    {{ route.phone }}#}
{#                    <br>#}
{#                    {{ route.extra_phone }}#}
{#                    <br>#}
{#                    {{ route.owner.email }}#}
{#                </div>#}
{#                <div class="button_edit_route">#}
{#                    <button onclick="editRoute({{ route.id }})"#}
{#                            id="edit_route">#}
{#                            Редактировать#}
{#                    </button>#}
{#                </div>#}
{#                <div class="button_remove_route">#}
{#                     <button#}
{#                             onclick="confirmRemove(this)"#}
{#                            id="remove_route">#}
{#                            Удалить#}
{#                    </button>#}
{#                </div>#}
{##}
{#            </div>#}
{#        </div>#}















