{% endmacro %}
{% macro create_event_link(category, type, text) -%}
{%- set title = {
'lecture': _('Create new lecture'),
'meeting': _('Create new meeting'),
'conference': _('Create new conference')
}[type] -%}
{%- set url = url_for('categories.display', category, _anchor='create-event:%s:%d'|format(type, category.id))
if category and not category.is_root
else url_for_index(_anchor='create-event:%s'|format(type)) -%}
{{ text }}
{%- endmacro %}