{% extends "base.html" %} {% block title %}{{ workshop.title }} — Morozovka Portal{% endblock %} {% block main_class %}container{% endblock %} {% block head %} {% endblock %} {% block content %}

{{ workshop.title }}

{{ WORKSHOP_CATEGORY_LABELS[workshop.category] }} {{ WORKSHOP_DIFFICULTY_LABELS[workshop.difficulty] }} {{ WORKSHOP_STATUS_LABELS[workshop.status] }} {{ WORKSHOP_VISIBILITY_LABELS[workshop.visibility] }} {% if workshop.recurrence and RECURRENCE_LABELS.get(workshop.recurrence) %}🔁 {{ RECURRENCE_LABELS[workshop.recurrence] }}{% endif %}
{% if perms.can_manage %} ✎ Редактировать {% endif %} {% if perms.can_delete_workshop %}
{% endif %}
{% if workshop.description %}

Описание

{{ workshop.description }}
{% endif %} {% if workshop.program %}

Программа

{{ workshop.program }}
{% endif %} {% if workshop.materials_required %}

Требуемые материалы

{{ workshop.materials_required }}
{% endif %} {% if workshop.outcome %}

Что получит участник

{{ workshop.outcome }}
{% endif %}

📢 Новости {{ posts|length }}

{% if posts %} {% for p in posts %}
{% if p.is_pinned %}📌{% endif %}{{ p.title }}
{% if perms.can_manage %}
{% endif %}
{% if p.body %}
{{ p.body }}
{% endif %} {% if atts.get(p.id) %}
{% for a in atts.get(p.id) %} {% set f = posts_files.get(a.file_id) %} {% if f %} {% if f.original_name|is_image %}
{{ f.original_name }}
{{ f.original_name }} · {{ (f.size_bytes/1024)|round(1) }} КБ
{% else %}
{{ f.original_name|file_icon }} {{ f.original_name }} ({{ (f.size_bytes/1024)|round(1) }} КБ)
{% endif %} {% endif %} {% endfor %}
{% endif %} {% if perms.can_manage %} {% endif %}
{% endfor %} {% else %}
Пока нет новостей.
{% endif %} {% if perms.can_manage %}
{% endif %}

Сессии {{ sessions|length }}

{% for s in sessions %}
{{ s.start_time|msk_strftime('%d.%m.%Y') }}
{{ s.start_time|msk_strftime('%H:%M') }}–{{ s.end_time|msk_strftime('%H:%M') }}
{% if s.location_override %}📍 {{ s.location_override }}{% elif workshop.location %}📍 {{ workshop.location }}{% endif %} {% if s.note %}
{{ s.note }}
{% endif %}
{% if perms.can_manage %}
{% endif %}
{% else %}
Нет сессий.
{% endfor %} {% if perms.can_manage %}
{% endif %}

Материалы {{ materials|length }}

{% for m in materials %}
{% if m.external_url %}🔗{% elif m.file_id and material_files_map.get(m.file_id) %}{{ material_files_map[m.file_id].original_name|file_icon }}{% else %}📎{% endif %}
{{ m.title }}
{% if m.description %}
{{ m.description }}
{% endif %}
{% if m.external_url %}Открыть → {% elif m.file_id and material_files_map.get(m.file_id) %}Скачать →{% endif %} {% if perms.can_manage %}
{% endif %}
{% else %}
{% if is_registered or perms.can_manage %}Материалы появятся после публикации.{% else %}Доступны после записи.{% endif %}
{% endfor %} {% if perms.can_manage %}
{% endif %}
{% if perms.can_manage %}

Участники {{ participants|length }}

{% if participants %} {% for reg, usr in participants %}
{{ usr.full_name or usr.username }} @{{ usr.username }}
{% if reg.status == 'registered' %}Записан {% elif reg.status == 'attended' %}Посетил {% elif reg.status == 'cancelled' %}Отменил {% elif reg.status == 'no_show' %}Не пришёл {% else %}{{ reg.status }}{% endif %}
{% endfor %} {% else %}
Пока никто не записался.
{% endif %}
{% endif %}

Команда МК

{% if lead %}{{ lead.full_name or lead.username }}{% else %}—{% endif %}
@{{ lead.username if lead else '' }}
Ведущий
{% for a_obj, a_user in assistants %}
{{ a_user.full_name or a_user.username }}
@{{ a_user.username }}
Помощник {% if perms.can_manage_assistants %}
{% endif %}
{% endfor %} {% if perms.can_manage_assistants %}
{% endif %}

Детали

{% if workshop.partner %}{% endif %} {% if workshop.location %}{% endif %} {% if workshop.recurrence and RECURRENCE_LABELS.get(workshop.recurrence) %}{% endif %} {% if workshop.has_certificate %}{% endif %} {% if workshop.tags %}{% endif %}
{% if user_id %}

Подписка

{% if my_sub %} {% else %}{% endif %}
{% endif %} {% if workshop.status == 'published' %}

Регистрация

{% if not user_id %}
Войдите, чтобы записаться.
Войти {% elif is_registered %}
✅ Вы записаны.
{% elif is_full %}
⚠ Мест нет.
{% else %}
Свободно: {% if workshop.max_participants %}{{ workshop.max_participants - registered_count }}{% else %}не ограничено{% endif %}.
{% endif %}
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}