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

{% block title %}{{ request.event }}{% endblock %}

{% block content %}{% with cfp=request.event.cfp %}
{% has_perm 'agenda.view_schedule' request.user request.event as can_view_schedule %}

    {% if request.event.landing_page_text %}
        {{ request.event.landing_page_text|rich_text }}
    {% endif %}

    <div class="row mb-4 url-links">
        {% if cfp.is_open %}
            <a class="btn btn-success btn-lg btn-block" href="{{ request.event.cfp.urls.public }}">
                {% trans "Submit a proposal" %}
            </a>
        {% endif %}
        {% if not request.user.is_anonymous and request.user.submissions.all.exists %}
            <a class="btn btn-info btn-lg btn-block" href="{{ request.event.urls.user_submissions }}">
                {% trans "Edit or view your submission" %}
            </a>
        {% endif %}
        {% if can_view_schedule %}
            <a class="btn btn-info btn-lg btn-block" href="{{ request.event.urls.schedule }}">
                {% trans "View conference schedule" %}
            </a>
        {% endif %}
    </div>
{% endwith %}
{% endblock %}
