{% extends "cfp/event/base.html" %}
{% load i18n %}
{% load rich_text %}
{% load rules %}

{% block content %}{% with cfp=request.event.cfp %}
{% has_perm 'agenda.view_schedule' request.user request.event as can_view_schedule %}
{% has_perm 'agenda.view_sneak_peek' request.user request.event as can_view_sneak_peek %}
    {% if request.event.landing_page_text %}
        {{ request.event.landing_page_text|rich_text }}
    {% endif %}
    <div class="row mb-4 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 }}">
                    {% trans "Edit or view your submissions" %}
                </a>
            {% endif %}
        {% endif %}
        {% if can_view_schedule %}
            <a class="btn btn-success btn-lg btn-block" href="{{ request.event.urls.schedule }}">
                {% trans "View conference schedule" %}
            </a>
        {% elif can_view_sneak_peek and has_sneak_peek %}
            <a class="btn btn-info btn-lg btn-block" href="{{ request.event.urls.sneakpeek }}">
                {% trans "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 }}">
                {% trans "Go to CfP" %}
            </a>
        {% endif %}
    </div>
{% endwith %}{% endblock %}
