diff --git a/templates/profile/delivery_old.html b/templates/profile/delivery_old.html index a0e8048..28f80a1 100644 --- a/templates/profile/delivery_old.html +++ b/templates/profile/delivery_old.html @@ -7,130 +7,345 @@ {% block title %}Где картины{% endblock %} - {% macro render_doc(doc) %}
-
- {% if doc.status == 'Ожидает отправки' %} -
- {{doc.status}} +
+ {% if doc.status == 'Ожидает отправки' %} +
+ {{doc.status}} +
+ {% elif doc.status == 'Получено' %} +
+ {{doc.status}} +
+ {% elif doc.status == 'Ожидает получения' %} +
+ {{doc.status}} +
+ {% else %} +
+ {{doc.status}} +
+ {% endif %} + + Посмотреть историю +

{{doc.title}}

+ + {% if doc.type == 'exhibition' and doc.get('exhibition') %} +

{{doc.get('exhibition').title}}

+
+ +
+ Организатор + {{doc.receiver.username}}
- {% elif doc.status == 'Получено' %} -
- {{doc.status}} +
+ {% 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}}
- {% elif doc.status == 'Ожидает получения' %} -
- {{doc.status}} +
+ {% endif %} + + {% if doc.receiver %} +
+ +
+ Получатель + {{doc.receiver.username}} + +7 *** *** {{ doc.receiver.phone[-4:] }}
- {% else %} -
- {{doc.status}} -
- {% endif %} - Посмотреть историю -

{{doc.title}}

- {% if doc.type == 'exhibition' and doc.get('exhibition') %} -

{{doc.get('exhibition').title}}

-
- -
- Организатор - {{doc.receiver.username}} -
-
- {% 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}} -
-
- {% endif %} - {% if doc.receiver %} -
- -
- Получатель - {{doc.receiver.username}} - +7 *** *** {{ doc.receiver.phone[-4:] }} -
-
- {% endif %} - {% if doc.status in ['Ожидает отправки', 'Возврат художнику'] and user._id == doc.sender._id%} - - {% endif %} - {% if doc.status == 'Ожидает получения' and user._id == doc.receiver._id%} - - {% endif %} - {% if doc.status == 'Получено' %} - {% 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 '' }} -

-
+
+ {% endif %} + + {# Checkbox instead of per-item button #} + {% if doc.status in ['Ожидает отправки', 'Возврат художнику'] and user._id == doc.sender._id %} + + {% endif %} + + {% if doc.status == 'Ожидает получения' and user._id == doc.receiver._id %} + + {% 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 '' }} +

+
{% endmacro %} - {% block content %} {{ header.section(user) }}
-
-{{ profile_card.profile_card(user) }} -
-{{ profile_nav.profile_nav(user, 'delivery') }} -
-{% set statuses = ['Ожидает отправки', 'Возврат художнику'] %} -{% if data | selectattr('status', 'in', statuses) | list | length > 0 %} -
-
-
-

Настройки отправки

-
-

Можно менять перед каждой отправкой картины

-
-
- - -
-
- - -
-
-
-
-{% endif %} -{% for doc in data %} -{{ render_doc(doc) }} -{% endfor %} +
+ {{ profile_card.profile_card(user) }} +
+ {{ profile_nav.profile_nav(user, 'delivery') }} +
+ + {% set statuses = ['Ожидает отправки', 'Возврат художнику'] %} + {% if data | selectattr('status', 'in', statuses) | list | length > 0 %} +
+
+
+

Настройки отправки

+
+

Можно менять перед каждой отправкой картины

+
+
+ + +
+
+ + +
+
+
+
+ {% endif %} + + {% for doc in data %} + {{ render_doc(doc) }} + {% endfor %} + + {# Sticky bottom action bar #} +
+ + +
+ + -