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

{% extends "cfp/event/base.html" %}

{% load event_tags %}
{% load i18n %}
{% load rich_text %}
{% load rules %}

{% block content %}
    {% with cfp=request.event.cfp %}
        {% has_perm "submission.list_featured_submission" request.user request.event as can_view_featured_submissions %}
        {% if request.event.landing_page_text %}{{ request.event.landing_page_text|rich_text }}{% endif %}
        <div class="url-links">
            {% if has_submissions or request.user.is_anonymous %}
                {% if not is_html_export %}
                    <a class="btn btn-info btn-lg btn-block" href="{{ request.event.urls.user_submissions }}">
                        {{ phrases.agenda.view_own_submissions }}
                    </a>
                {% endif %}
            {% endif %}
            {% if request.event.current_schedule and request.event|get_feature_flag:"show_schedule" %}
                <a class="btn btn-success btn-lg btn-block" href="{{ request.event.urls.schedule }}">
                    {{ phrases.agenda.view_schedule }}
                </a>
            {% elif can_view_featured_submissions and has_featured %}
                <a class="btn btn-info btn-lg btn-block" href="{{ request.event.urls.featured }}">
                    {{ phrases.agenda.view_schedule_preview }}
                </a>
            {% endif %}
            {% if cfp.is_open and not is_html_export %}
                <a class="btn btn-info btn-lg btn-block" href="{{ request.event.cfp.urls.public }}{{ submit_qs }}">
                    {{ phrases.cfp.go_to_cfp }}
                </a>
            {% endif %}
            {% if can_see_orga_area %}
                <a class="btn btn-info btn-lg btn-block" href="{{ request.event.orga_urls.base }}">
                    {% translate "Go To Organiser Area" %}
                </a>
            {% endif %}
        </div>
    {% endwith %}
{% endblock content %}
