{% extends "base.html" %} {% import "/components/header.html" as header %} {% import "/components/footer.html" as footer %} {% import "components/profile_card.html" as profile_card %} {% import "components/profile_nav.html" as profile_nav %} {% import "competition/list.html" as competition %} {% import "/components/contacts.html" as contacts %} {% block title %}Где картины{% endblock %} {% block content %} {{ header.section(user) }}
{{ profile_card.profile_card(user) }}
{{ profile_nav.profile_nav(user, 'delivery') }} {% set doc=data[0] %}

{{doc.title}}

{% for doc in data %}
{% if doc.status == 'Ожидает отправки' %}
Запрос на отправку
{% elif Получено' in (doc.status or '') %}
{{doc.status}}
{% elif doc.status == 'Ожидает получения' %}
Отправлено
{% else %}
{{doc.status}}
{% endif %} {% if doc.type == 'exhibition' and doc.get('exhibition') or doc.status == 'Продано' %}

{{doc.exhibition.title}}

Место проведения: {{ doc.exhibition.get('place') }}

Организатор {{doc.receiver.username}}
{% if doc.get('user') and user._id == doc.user._id%} {{ contacts.details(doc.receiver) }} {% endif %} {% if doc.get('user') %}
Художник {{doc.user.username}}
{% if user._id != doc.user._id%} {{ contacts.details(doc.user) }} {% endif %} {% endif %} {% else %} {% if doc.address %}

Адрес: {{doc.address}}

{% endif %} {% if doc.back_address %}

Адрес для возврата: {{doc.back_address}}

{% endif %} {% if doc.delivery_type %}

Способ доставки: {{doc.delivery_type}}

{% endif %} {% if doc.track %}

Трек-номер: {{doc.track}}

{% endif %} {% if doc.sender %}
Отправитель {{doc.sender.username}}
{% if user._id != doc.sender._id%} {{ contacts.details(doc.sender) }} {% endif %} {% endif %} {% if doc.receiver %}
Получатель {{doc.receiver.username}} +7 *** *** {{ doc.receiver.phone[-4:] }}
{% if user._id != doc.receiver._id%} {{ contacts.details(doc.receiver) }} {% endif %} {% endif %} {% endif %}

{{ (doc._id.generation_time.strftime('%d.%m.%Y')) if doc._id else ''}} {{ '%02d' % ((doc._id.generation_time.hour + 3) % 24) if doc._id else '' }}:{{ '%02d' % doc._id.generation_time.minute if doc._id else '' }}

{% endfor %}
{{ footer.section(user) }} {% endblock %} {% block head %} {{ header.style() }} {{ competition.style() }} {{ profile_nav.style() }} {{ contacts.style() }} {{ footer.style() }} {% endblock %}