{% extends 'main/pagetemplate.html' %} {% load static %} {% block additional_css %} {% endblock %} {% block pagetitle %} Календарь {% endblock %} {% block content %}
{% if type == 'year' %}

Календарь

{{year_data.number}}

{% elif type == 'day' %}

Календарь — События

Год {{year_data.number}}, {{month_data.name}}, день {{day}}-й

{% elif type == 'error' %}

Календарь — Ошибка

{% endif %}
{% if type == 'year' %} {% for month in month_data %} {% if not month.is_leap_month or year_data.is_leap %} {% include 'faerun_calendar/month.html' with month=month calendar_data=calendar_data month_days=month_days events=events %} {% endif %} {% endfor %} {% elif type == 'day' %} {% if events.count == 0 %}

Событий нет

{% else %} {% for event in events %}
{{event.time}}
{{event.title}}

{{event.description}}

{% endfor %} {% endif %} {% elif type == 'error' %} {% if error_type == 'year' %}

Неверный год

{% elif error_type == 'month' %}

Неверный месяц

{% elif error_type == 'day' %}

Неверный день

{% endif %} {% endif %}
{% endblock %}