{% 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 "/components/contacts.html" as contacts %} {% block title %}Приглашения{% endblock %} {% block content %} {{ header.section(user) }}
{{ profile_card.profile_card(user) }}
{{ profile_nav.profile_nav(user, 'invitation') }}
{% for doc in data %}
{{doc.type}}

{{ doc.title }}

{% if doc.get('type_')=='paint' %} Открыть {% endif %} {% if doc.get('type') == 'Выставка' %}

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

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

С {{ ( doc.get('exhibition').datetime_start.strftime('%d.%m.%Y')) if doc.get('exhibition').datetime_start else ''}} По {{ ( doc.get('exhibition').date_finish.strftime('%d.%m.%Y')) if doc.get('exhibition').date_finish else ''}}
{% if doc.get('exhibition').get('tizer_file_id') or doc.get('exhibition').get('tizer_link') %} Релиз выставки {% endif %}

Принять условия нужно до {{doc.get('exhibition').datetime_start.strftime('%d.%m.%Y')}}

{% if doc.get('accept') == False and now < doc.get('exhibition').datetime_start %} Открыть {% else %} Условия выставки {% endif %} {% else %} {% if doc.get('type_')=='paint' %}

"{{ doc.get('item') }}"

{%else%}

"{{ doc.get('item') }}" просьба связаться с организатором для обсуждения дальнейших действий

{% endif %} {% endif %} {% set user_contact = doc.get('user') %} {{render_user_contacts(user_contact)}}

{{ (doc._id.generation_time.strftime('%d.%m.%Y')) if doc._id else ''}}

{% endfor %}
{{ footer.section(user) }} {% endblock %} {% macro render_user_contacts(user) %} {% if user %}
{{ user.username | e }}

{{ user.username | e }}

{{ contacts.details(user) }} {% endif %} {% endmacro %} {% block head %} {{ header.style() }} {{ profile_nav.style() }} {{ contacts.style() }} {{ footer.style() }} {% endblock %}