<!--
SPDX-FileCopyrightText: 2017-present Tobias Kunze
SPDX-License-Identifier: AGPL-3.0-only WITH LicenseRef-Pretalx-AGPL-3.0-Terms

This file contains Apache-2.0 licensed contributions copyrighted by the following contributors:
SPDX-FileContributor: Raphael Michel
-->

{% load event_tags %}
{% load form_media %}
{% load html_signal %}
{% load i18n %}
{% load rules %}
{% load static %}
{% load vite %}

<!DOCTYPE html>
<html lang="{{ html_locale }}"{% if rtl %} dir="rtl" class="rtl"{% endif %}>
    <head>
        <meta charset="utf-8">
        <title>{% block title %}{% block extra_title %}{% endblock extra_title %}{% if request.event %}{{ request.event.name }} :: {% endif %}{% endblock title %}pretalx</title>
        <meta name="title" content="{% block meta_title %}{% endblock meta_title %} {% if request.event %} - {{ request.event.name }} {% endif %}pretalx">
        <meta name="description" content="{% block meta_description %}{% if request.event %}Schedule, talks and talk submissions for {{ reqeuest.event.name }}{% else %}Talks and talk submissions by pretalx{% endif %}{% endblock meta_description %}">
        <meta name="application-name" content="pretalx">
        <meta name="generator" content="pretalx">
        <meta name="keywords" content="{% if request.event %}{{ request.event.name }}, {{ request.event.slug }}, {% if request.event.date_from %}{{ request.event.date_from.year }}, {% endif %}{% endif %}schedule, talks, cfp, call for papers, conference, submissions, organizer">
        <meta name="robots" content="nofollow">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="theme-color" content="#3aa57c">
        <meta name="HandheldFriendly" content="True"/>
        {% if request.event and request.event.logo %}<meta property="thumbnail" content="{{ request.event.urls.logo.full }}">{% endif %}
        {% block alternate_link %}
            <link rel="alternate" type="application/json" title="{{ request.event.name }} API" href="{{ request.event.api_urls.base.full }}" />
        {% endblock alternate_link %}

        {% include "common/includes/favicon.html" %}

        <link rel="stylesheet" type="text/css" href="{% static "vendored/font-awesome.css" %}" />
        <link rel="stylesheet" type="text/css" href="{% static "common/css/base.css" %}" />
        <link rel="stylesheet" type="text/css" href="{% static "common/css/rtl.css" %}" />
        <link rel="stylesheet" type="text/css" href="{% static "common/css/ui/dropdown.css" %}" />
        <link rel="stylesheet" type="text/css" href="{% static "common/css/ui/dialog.css" %}" />
        <link rel="stylesheet" type="text/css" href="{% static "common/css/_variables.css" %}" />

        <link rel="stylesheet" type="text/css" href="{% static "orga/css/base.css" %}" />
        <link rel="stylesheet" type="text/css" href="{% static "orga/css/rtl.css" %}" />
        <link rel="stylesheet" type="text/css" href="{% static "orga/css/ui/pagination.css" %}" />
        {% if request.event and request.event.primary_color %}<link rel="stylesheet" type="text/css" href="{{ request.event.urls.settings_css }}?target=orga" />{% endif %}
        {% block stylesheets %}{% endblock stylesheets %}
        <script src="{% static "orga/js/ui/sidebar-preload.js" %}"></script>
        <script defer src="{% static "common/js/base.js" %}"></script>
        <script defer src="{% static "orga/js/base.js" %}"></script>
        <script defer src="{% static "common/js/ui/collapse.js" %}"></script>
        <script defer src="{% static "common/js/ui/lightbox.js" %}"></script>
        {% form_media always_base=True extra_js="common/js/ui/tabs.js" extra_css="common/css/ui/tabs.css" table_media=True %}
        {% block scripts %}{% endblock scripts %}
        {{ html_head|safe }}
    </head>
    <body data-datetimeformat="{{ js_datetime_format }}" data-dateformat="{{ js_date_format }}" data-datetimelocale="{{ js_locale }}">
        <nav class="navbar">
            <ul class="navbar-nav d-block">
                <li class="nav-item">
                    <a class="nav-link" data-toggle="sidebar" href="#" id="sidebar-toggle">
                        <i class="fa fa-bars fa-lg"></i>
                    </a>
                </li>
            </ul>
            <a class="navbar-brand" href="{% url "orga:event.list" %}">
                <img loading="lazy" src="{% static "common/img/icons/icon.svg" %}" alt="{% translate "The pretalx logo" %}">
                pretalx
            </a>
            <div class="navbar-collapse" id="navbartoggle">
                <ul class="navbar-nav mr-auto flip">
                    {% if request.event %}
                        <li class="nav-item">
                            {% if request.event.custom_domain and not request.event.is_public %}
                                <form action="{{ request.event.urls.auth.full }}"
                                      method="post"
                                      target="_blank"
                                      class="mobile-navbar-view-form d-flex align-items-center">
                                    <input type="hidden" value="{{ new_session }}" name="session">
                                    <input type="hidden" value="{{ go_to_target }}" name="target">
                                    <button type="submit" class="btn btn-link navbar-toggle pl-2">
                                        <i class="fa fa-eye mr-1"></i>
                                        {% translate "View event" %}
                                    </button>
                                </form>
                            {% else %}
                                <a class="nav-link d-flex align-items-center"
                                   target="_blank"
                                   rel="noopener"
                                   href="{% if go_to_target == "schedule" %}{{ request.event.urls.schedule }}{% else %}{{ request.event.cfp.urls.public }}{% endif %}">
                                    <i class="fa fa-eye mr-2 mt-0"></i>
                                    {% translate "View event" %}
                                </a>
                            {% endif %}
                        </li>
                    {% endif %}
                </ul>
            </div>
            <ul class="navbar-nav">
                {% if warning_update_available %}
                    <li class="nav-item">
                        <a href="{% url "orga:admin.update" %}" class="text-danger nav-link">
                            <i class="fa fa-bell"></i>
                        </a>
                    </li>
                {% endif %}
                {% block navbar_right %}{% endblock navbar_right %}
                <li class="nav-item d-none d-md-block">
                    <a class="nav-link active" href="{% url "orga:user.view" %}">
                        <i class="fa fa-user"></i>
                        {{ request.user.get_display_name }}
                    </a>
                </li>
                <li class="nav-item">
                    <form action="{% url "orga:logout" %}" method="post">
                        {% csrf_token %}
                        <button class="nav-link active font-text ml-1" type="submit">
                            <i class="fa fa-sign-out"></i>
                            <span>{% trans "Log out" %}</span>
                        </button>
                    </form>
                </li>
            </ul>
        </nav>
        {% if request.user.is_superuser %}
            <div class="global-top-warning">
                <i class="fa fa-exclamation-triangle"></i>
                {% blocktranslate with link=link trimmed %}
                    You’re using pretalx as a superuser. This is not recommended.
                {% endblocktranslate %}
                <a href="{% url "orga:user.subuser" %}{% querystring next=request.path|urlencode %}">
                    {% translate "Please click here to switch to an administrator account." %}
                </a>
            </div>
        {% endif %}
        {% if warning_update_check_active %}
            <div class="global-top-warning">
                <a href="{% url "orga:admin.update" %}">
                    {% blocktranslate trimmed %}
                        Starting with version 1.1.0, pretalx automatically checks for updates in the background.
                        During this check, anonymous data is transmitted to servers operated by the pretalx
                        developers. Click on this message to find out more, disable this feature or enter your
                        email address to get notified via email if a new update arrives. This message will
                        disappear once you clicked it.
                    {% endblocktranslate %}
                </a>
            </div>
        {% endif %}
        <div id="page-wrapper">
            {% if not request.user.is_anonymous %}<aside class="nav flex-column sidebar">
                <details class="dropdown nav-link p-0" id="nav-search-wrapper">
                    <summary id="nav-search" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <span id="search-context-icon" class="fa-stack fa-lg">
                            <i class="fa fa-circle fa-stack-2x"></i>
                            <i class="fa fa-{% if request.event %}calendar{% elif request.organiser %}group{% else %}user{% endif %} fa-stack-1x fa-inverse"></i>
                        </span>
                        <div id="search-context-text">
                            {% if request.event %}
                                <span class="context-name">{{ request.event.name }}</span>
                                <span class="context-meta">{{ request.event.get_date_range_display }}</span>
                            {% elif request.organiser %}
                                <span class="context-name">{{ request.organiser.name }}</span>
                                <span class="context-meta">{% translate "Organiser account" %}</span>
                            {% else %}
                                <span class="context-name">{{ request.user.get_display_name }}</span>
                            {% endif %}
                        </div>
                        <div class="arrow">
                            <i class="fa fa-angle-down"></i>
                        </div>
                    </summary>
                    <div id="nav-search-input-wrapper" class="dropdown-content dropdown-menu dropdown-menu-left" aria-labelledby="nav-search" data-source="{% url "orga:nav.typeahead" %}" data-event-typeahead data-organiser="{% if request.event %}{{ request.event.organiser.pk }}{% elif request.organiser %}{{ request.organiser.pk }}{% endif %}">
                        <div class="query-holder">
                            <div class="form-box">
                                <input type="search" class="form-control" placeholder="{% translate "Search" %} (Alt + k)" data-typeahead-query>
                            </div>
                        </div>
                        <ul id="search-results">
                        </ul>
                    </div>
                </details>
                {% if request.event %}
                    {% has_perm "event.orga_access_event" request.user request.event as can_see_orga_area %}
                    {% has_perm "submission.orga_update_submission" request.user request.event as can_see_orga_exclusive %}
                    {% has_perm "event.update_team" request.user request.event as can_change_teams %}
                    {% has_perm "event.update_event" request.user request.event as can_change_settings %}
                    {% has_perm "person.orga_list_speakerprofile" request.user request.event as can_view_speakers %}
                    {% if can_see_orga_area %}
                        <a class="nav-link {% if url_name == "event.dashboard" %}active{% endif %}" href="{{ request.event.orga_urls.base }}">
                            <i class="fa fa-tachometer"></i>
                            <span class="sidebar-text">{% translate "Dashboard" %}</span>
                        </a>
                    {% endif %}
                    {% if can_see_orga_exclusive %}
                        {% if can_change_settings %}
                            <div class="nav-fold">
                                <span class="has-children">
                                    <a href="{{ request.event.orga_urls.settings }}" class="nav-link nav-link-inner">
                                        <i class="fa fa-wrench"></i>
                                        <span class="sidebar-text">{% translate "Settings" %}</span>
                                    </a>
                                    <a class="arrow nav-link" data-toggle="collapse" data-target="#collapseSettings" aria-controls="collapseSettings">
                                        <i class="fa fa-angle-down"></i>
                                    </a>
                                </span>
                                <div class="collapse in{% if "settings." in url_name %} show{% elif nav_settings_expanded %} show{% endif %}" aria-expand="true" id="collapseSettings">
                                    <a href="{{ request.event.orga_urls.settings }}" class="nav-link nav-link-second-level{% if "settings.event." in url_name %} active{% endif %}">
                                        <span>{{ phrases.base.general }}</span>
                                    </a>
                                    {% if can_change_teams %}
                                        <a href="{{ request.event.organiser.orga_urls.teams }}" class="nav-link nav-link-second-level{% if "settings.team." in url_name %} active{% endif %}">
                                            <span>{% translate "Teams" %}</span>
                                        </a>
                                    {% endif %}
                                    <a href="{{ request.event.orga_urls.review_settings }}" class="nav-link nav-link-second-level{% if "settings.review" in url_name %} active{% endif %}">
                                        <span>{% translate "Review" %}</span>
                                    </a>
                                    <a href="{{ request.event.orga_urls.mail_settings }}" class="nav-link nav-link-second-level{% if "settings.mail" in url_name %} active{% endif %}">
                                        <span>{% translate "Email" %}</span>
                                    </a>
                                    <a href="{{ request.event.orga_urls.widget_settings }}" class="nav-link nav-link-second-level{% if "settings.widget" in url_name %} active{% endif %}">
                                        <span>{% translate "Widget" %}</span>
                                    </a>
                                    <a href="{{ request.event.orga_urls.plugins }}" class="nav-link nav-link-second-level{% if "settings.plugins.select" in url_name %} active{% endif %}">
                                        <span>{% translate "Plugins" %}</span>
                                    </a>
                                    {% for plugin_setting in nav_settings %}
                                        <a href="{{ plugin_setting.url }}" class="nav-link nav-link-second-level{% if plugin_setting.active %} active{% endif %}">
                                            <span>{{ plugin_setting.label }}</span>
                                        </a>
                                    {% endfor %}
                                </div>
                            </div>
                            <div class="nav-fold">
                                <span class="has-children">
                                    <a class="nav-link nav-link-inner" href="{{ request.event.cfp.urls.text }}">
                                        <i class="fa fa-bullhorn"></i>
                                        <span class="sidebar-text">{% translate "Call for Proposals" %}</span>
                                    </a>
                                    <a class="arrow nav-link" data-toggle="collapse" data-target="#collapseCfP" aria-controls="collapseCfP">
                                        <i class="fa fa-angle-down"></i>
                                    </a>
                                </span>
                                <div class="collapse in{% if "cfp." in url_name %} show{% endif %}" aria-expand="true" id="collapseCfP">
                                    <a href="{{ request.event.cfp.urls.text }}" class="nav-link nav-link-second-level{% if "cfp.text" in url_name %} active{% endif %}">
                                        <span>{% translate "Content" %}</span>
                                    </a>
                                    <a href="{{ request.event.cfp.urls.editor }}" class="nav-link nav-link-second-level{% if "cfp.flow" in url_name %} active{% endif %}">
                                        <span>{% translate "Editor" %}</span>
                                    </a>
                                    <a href="{{ request.event.cfp.urls.questions }}" class="nav-link nav-link-second-level{% if "cfp.question" in url_name %} active{% endif %}">
                                        <span>{{ phrases.cfp.custom_fields }}</span>
                                    </a>
                                    {% if request.event|get_feature_flag:"use_tracks" %}
                                        <a href="{{ request.event.cfp.urls.tracks }}" class="nav-link nav-link-second-level{% if "cfp.track" in url_name %} active{% endif %}">
                                            <span>{% translate "Tracks" %}</span>
                                        </a>
                                    {% endif %}
                                    <a href="{{ request.event.cfp.urls.types }}" class="nav-link nav-link-second-level{% if "cfp.type" in url_name %} active{% endif %}">
                                        <span>{% translate "Session types" %}</span>
                                    </a>
                                    <a href="{{ request.event.cfp.urls.access_codes }}" class="nav-link nav-link-second-level{% if "cfp.access_code" in url_name %} active{% endif %}">
                                        <span>{% translate "Access codes" %}</span>
                                    </a>
                                </div>
                            </div>
                        {% endif %}
                    {% endif %}
                    {% if can_see_orga_area %}
                        <div class="nav-fold">
                            <span class="has-children">
                                <a class="nav-link nav-link-inner" href="{{ request.event.orga_urls.submissions }}">
                                    <i class="fa fa-sticky-note-o"></i>
                                    <span class="sidebar-text">{{ phrases.schedule.sessions }}</span>
                                </a>
                                <a class="arrow nav-link" data-toggle="collapse" data-target="#collapseSubmissions" aria-controls="collapseSubmissions">
                                    <i class="fa fa-angle-down"></i>
                                </a>
                            </span>
                            <div class="collapse in{% if "submissions." in url_name|slice:":13" %} show{% endif %}" aria-expand="true" id="collapseSubmissions">
                                <a href="{{ request.event.orga_urls.submissions }}" class="nav-link nav-link-second-level{% if "submissions." in url_name and "submissions.statistics" not in url_name and "submissions.feedback" not in url_name and "submissions.tag" not in url_name %} active{% endif %}">
                                    <span>{{ phrases.schedule.sessions }}</span>
                                </a>
                                <a href="{{ request.event.orga_urls.tags }}" class="nav-link nav-link-second-level{% if "submissions.tag" in url_name %} active{% endif %}">
                                    <span>{% translate "Tags" %}</span>
                                </a>
                                <a href="{{ request.event.orga_urls.stats }}" class="nav-link nav-link-second-level{% if "submissions.statistics" in url_name %} active{% endif %}">
                                    <span>{% translate "Statistics" %}</span>
                                </a>
                                {% if request.event|get_feature_flag:"use_feedback" %}
                                    <a href="{{ request.event.orga_urls.feedback }}" class="nav-link nav-link-second-level{% if "submissions.feedback" in url_name %} active{% endif %}">
                                        <span>{% translate "Feedback" %}</span>
                                    </a>
                                {% endif %}
                                {% if can_change_settings %}
                                    <a href="{{ request.event.orga_urls.schedule_export }}" class="nav-link nav-link-second-level">
                                        <span>{% translate "Export" %}</span>
                                    </a>
                                {% endif %}
                            </div>
                        </div>
                        {% if can_change_settings %}
                            <div class="nav-fold">
                                <span class="has-children">
                                    <a class="nav-link nav-link-inner" href="{% url "orga:reviews.dashboard" event=request.event.slug %}">
                                        <i class="fa fa-eye"></i>
                                        <span class="sidebar-text">{% translate "Review" %}</span>
                                    </a>
                                    <a class="arrow nav-link" data-toggle="collapse" data-target="#collapseReviews" aria-controls="collapseReviews">
                                        <i class="fa fa-angle-down"></i>
                                    </a>
                                </span>
                                <div class="collapse in{% if "reviews." in url_name|slice:":9" %} show{% endif %}" aria-expand="true" id="collapseReviews">
                                    <a href="{% url "orga:reviews.dashboard" event=request.event.slug %}" class="nav-link nav-link-second-level{% if "reviews.dashboard" in url_name %} active{% endif %}">
                                        <span>{% translate "Review" %}</span>
                                    </a>
                                    <a href="{% url "orga:reviews.assign" event=request.event.slug %}" class="nav-link nav-link-second-level{% if "reviews.assign" in url_name %} active{% endif %}">
                                        <span>{% translate "Assign reviewers" %}</span>
                                    </a>
                                    <a href="{% url "orga:reviews.export" event=request.event.slug %}" class="nav-link nav-link-second-level{% if "reviews.export" in url_name %} active{% endif %}">
                                        <span>{% translate "Export reviews" %}</span>
                                    </a>
                                </div>
                            </div>
                        {% else %}
                            <a class="nav-link {% if "reviews." in url_name %}active{% endif %}" href="{% url "orga:reviews.dashboard" event=request.event.slug %}">
                                <i class="fa fa-eye"></i>
                                <span class="sidebar-text">{% translate "Review" %}</span>
                            </a>
                        {% endif %}
                        {% if can_view_speakers %}
                            <div class="nav-fold">
                                <span class="has-children">
                                    <a class="nav-link nav-link-inner" href="{{ request.event.orga_urls.speakers }}">
                                        <i class="fa fa-address-card-o"></i>
                                        <span class="sidebar-text">{{ phrases.schedule.speakers }}</span>
                                    </a>
                                    <a class="arrow nav-link" data-toggle="collapse" data-target="#collapseSpeakers" aria-controls="collapseSpeakers">
                                        <i class="fa fa-angle-down"></i>
                                    </a>
                                </span>
                                <div class="collapse in{% if "speakers." in url_name|slice:":9" %} show{% endif %}" aria-expand="true" id="collapseSpeakers">
                                    <a href="{{ request.event.orga_urls.speakers }}" class="nav-link nav-link-second-level{% if "speakers.list" in url_name or "speakers.view" in url_name %} active{% endif %}">
                                        <span>{{ phrases.schedule.speakers }}</span>
                                    </a>
                                    {% if can_see_orga_exclusive %}
                                        <a href="{{ request.event.orga_urls.information }}" class="nav-link nav-link-second-level{% if "speakers.information" in url_name %} active{% endif %}">
                                            <span>{% translate "Speaker Information" %}</span>
                                        </a>
                                    {% endif %}
                                    {% if can_change_settings %}
                                        <a href="{{ request.event.orga_urls.speakers }}export/" class="nav-link nav-link-second-level{% if "speakers.export" in url_name %} active{% endif %}">
                                            <span>{% translate "Export" %}</span>
                                        </a>
                                    {% endif %}
                                </div>
                            </div>
                        {% endif %}
                    {% endif %}
                    {% if can_see_orga_exclusive %}

                        <div class="nav-fold">
                            <span class="has-children">
                                <a class="nav-link nav-link-inner" href="{{ request.event.orga_urls.schedule }}">
                                    <i class="fa fa-calendar-o"></i>
                                    <span class="sidebar-text">
                                        {{ phrases.schedule.schedule }}
                                        {% if request.event.has_unreleased_schedule_changes %}
                                            <span class="sidebar-notification small" title="{% translate "Unreleased schedule changes" %}">&nbsp;</span>
                                        {% endif %}
                                    </span>
                                </a>
                                <a class="arrow nav-link" data-toggle="collapse" data-target="#collapseSchedule" aria-controls="collapseSchedule">
                                    <i class="fa fa-angle-down"></i>
                                </a>
                            </span>
                            <div class="collapse in{% if "schedule." in url_name %} show{% endif %}" aria-expand="true" id="collapseSchedule">
                                <a href="{{ request.event.orga_urls.schedule }}" class="nav-link nav-link-second-level{% if "schedule.main" in url_name %} active{% endif %}">
                                    <span>{% translate "Editor" %}</span>
                                </a>
                                <a href="{{ request.event.orga_urls.room_settings }}" class="nav-link nav-link-second-level{% if "schedule.rooms." in url_name %} active{% endif %}">
                                    <span>{% translate "Rooms" %}</span>
                                </a>
                                <a href="{{ request.event.orga_urls.schedule_export }}" class="nav-link nav-link-second-level{% if "schedule.export" in url_name %} active{% endif %}">
                                    <span>{% translate "Export" %}</span>
                                </a>
                            </div>
                        </div>

                        <div class="nav-fold">
                            <span class="has-children">
                                <a class="nav-link nav-link-inner" href="{{ request.event.orga_urls.outbox }}">
                                    <i class="fa fa-envelope"></i>
                                    <span class="sidebar-text">
                                        {% translate "Mails" %}
                                        {% if request.event.pending_mails %}<span class="sidebar-notification">{{ request.event.pending_mails }}</span>{% endif %}
                                    </span>
                                </a>
                                <a class="arrow nav-link" data-toggle="collapse" data-target="#collapseMails" aria-controls="collapseMails">
                                    <i class="fa fa-angle-down"></i>
                                </a>
                            </span>
                            <div class="collapse in{% if "mails." in url_name %} show{% endif %}" aria-expand="true" id="collapseMails">
                                <a href="{{ request.event.orga_urls.outbox }}" class="nav-link nav-link-second-level{% if "mails.outbox" in url_name %} {% if not form or not form.instance.sent %}active{% endif %}{% endif %}">
                                    <span>{% translate "Outbox" %}</span>
                                </a>
                                <a href="{% if can_change_teams %}{{ request.event.orga_urls.compose_mails }}{% else %}{{ request.event.orga_urls.compose_mails_sessions }}{% endif %}" class="nav-link nav-link-second-level{% if "mails.compose" in url_name %} active{% endif %}">
                                    <span>{% translate "Compose emails" %}</span>
                                </a>
                                <a href="{{ request.event.orga_urls.sent_mails }}" class="nav-link nav-link-second-level{% if "mails.sent" in url_name %} active{% elif url_name == "mails.outbox.mail.view" and form.instance.sent %} active{% endif %}">
                                    <span>{% translate "Sent emails" %}</span>
                                </a>
                                <a href="{{ request.event.orga_urls.mail_templates }}" class="nav-link nav-link-second-level{% if "mails.templates" in url_name %} active{% endif %}">
                                    <span>{% translate "Templates" %}</span>
                                </a>
                            </div>
                        </div>
                    {% endif %}
                    {% for nav_element in nav_event %}
                        {% include "orga/includes/sidebar_nav.html" %}
                    {% endfor %}
                {% elif request.organiser %}  {# if request.event #}
                    <a class="nav-link {% if url_name == "organiser.dashboard" %} active{% endif %}" href="{{ request.organiser.orga_urls.base }}">
                        <i class="fa fa-tachometer"></i>
                        <span>{% translate "Dashboard" %}</span>
                    </a>
                    <a class="nav-link {% if "/settings/" in request.path %} active{% endif %}" href="{{ request.organiser.orga_urls.settings }}">
                        <i class="fa fa-cog"></i>
                        <span>{% translate "Settings" %}</span>
                    </a>
                    {% has_perm "event.update_team" request.user request.organiser as can_change_teams %}
                    {% has_perm "event.view_organiser" request.user request.organiser as can_view_speakers %}
                    {% if can_change_teams %}
                        <a class="nav-link {% if "/teams/" in request.path %} active{% endif %}" href="{% url "orga:organiser.teams.list" organiser=request.organiser.slug %}">
                            <i class="fa fa-users"></i>
                            <span>{% translate "Teams" %}</span>
                        </a>
                    {% endif %}
                    {% if can_view_speakers %}
                        <a class="nav-link {% if "/speakers/" in request.path %} active{% endif %}" href="{% url "orga:organiser.speakers" organiser=request.organiser.slug %}">
                            <i class="fa fa-address-card-o"></i>
                            <span>{% translate "Speakers" %}</span>
                        </a>
                    {% endif %}
                    {% for nav_element in nav_global %}
                        {% include "orga/includes/sidebar_nav.html" %}
                    {% endfor %}
                {% else %}  {# elif request.organiser #}
                    {% has_perm "event.view_any_organiser" request.user request as can_see_organiser_lists %}
                    {% if can_see_organiser_lists %}
                        <a class="nav-link {% if request.path == "/orga/event/" %} active{% endif %}" href="{% url "orga:event.list" %}">
                            <i class="fa fa-calendar-o"></i>
                            <span>{% translate "Events" %}</span>
                        </a>
                        <a class="nav-link {% if "/orga/organiser/" in request.path %} active{% endif %}" href="{% url "orga:organiser.list" %}">
                            <i class="fa fa-users"></i>
                            <span>{% translate "Organisers" %}</span>
                        </a>
                    {% endif %}
                    {% if request.user.is_administrator %}
                        <div class="nav-fold">
                            <span class="has-children">
                                <a class="nav-link nav-link-inner" href="{% url "orga:admin.dashboard" %}">
                                    <i class="fa fa-cogs"></i>
                                    <span class="sidebar-text">
                                        {% translate "Administration" %}
                                    </span>
                                </a>
                                <a class="arrow nav-link" data-toggle="collapse" data-target="#collapseAdmin" aria-controls="collapseAdmin">
                                    <i class="fa fa-angle-down"></i>
                                </a>
                            </span>
                            <div class="collapse in{% if "/orga/admin/" in request.path %} show{% endif %}" aria-expand="true" id="collapseAdmin">
                                <a class="nav-link nav-link-second-level {% if "/orga/admin/" == request.path %} active{% endif %}" href="{% url "orga:admin.dashboard" %}">
                                    <span>{% translate "Admin information" %}</span>
                                </a>
                                <a href="{% url "orga:admin.user.list" %}" class="nav-link nav-link-second-level{% if "/orga/admin/users" in request.path %} active{% endif %}">
                                    <span>{% translate "Users" %}</span>
                                </a>
                            </div>
                        </div>
                    {% endif %}
                    {% for nav_element in nav_global %}
                        {% include "orga/includes/sidebar_nav.html" %}
                    {% endfor %}
                {% endif %}  {# if request.event #}
            </aside>{% endif %}  {# if not request.user.is_anonymous #}
            <div id="page-content">
                <main>
                    {% if messages %}
                        {% for message in messages %}
                            <div class="alert alert-{{ message.tags }}">
                                {{ message }}
                            </div>
                        {% endfor %}
                    {% endif %}

                    {% html_signal "pretalx.orga.signals.html_above_orga_page" sender=request.event request=request %}
                    {% block content %}
                    {% endblock content %}
                    {% html_signal "pretalx.orga.signals.html_below_orga_page" sender=request.event request=request %}
                </main>
                <footer>
                    {% include "common/powered_by.html" %}
                    {% if development_mode %}
                        <span class="text-warning">· {% translate "running in development mode" %}</span>
                    {% endif %}
                    {% if pretalx_version %}
                        <span>·
                            {% if development_mode %}<a href="https://github.com/pretalx/pretalx/tree/{{ pretalx_version }}/">{{ pretalx_version }}</a>
                            {% else %}v{{ pretalx_version }}{% endif %}
                        </span>
                    {% endif %}
                </footer>
            </div>
        </div>
        {% include "common/includes/modals.html" %}
    </body>
</html>
