{% from 'events/management/_create_event_button.html' import create_event_button %}
{% if category.is_root or category.attachment_count or category.can_manage(session.user) %} {% set category_title_classes = 'sidebar-padding' %} {% endif %}

{% block title %} {% if category.is_root and category.children %} {% trans %}Main categories{% endtrans %} {% elif category.is_root %} {% trans %}All events{% endtrans %} {% else %} {{ category.title }} {% endif %} {% endblock %}

{{ create_event_button(category, classes="highlight", text=_("Create event"), with_tooltip=false) }}
{% if not category.is_root %} {% trans %}Parent category{% endtrans %} {% endif %} {% with item=category, ics_url=url_for('categories.export_ical', category) -%} {% include 'categories/category_export_ical.html' %} {%- endwith %} {% if category.can_manage(session.user) %} {% endif %}
{% if session.user and not category.is_root %}
{% endif %}
{% if self.sidebar() %}
{% block sidebar %}{% endblock %}
{% endif %}
{% include 'flashed_messages.html' %} {% block content %}{% endblock %}