{% 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 %}

    <h1>{{ cfp.headline|default:"" }}</h1>
    {{ cfp.text|rich_text }}
    {% if request.event.settings.cfp_show_deadline %}
        <p>
            <strong>
                {% blocktrans with deadline=cfp.deadline|date:"SHORT_DATETIME_FORMAT" timezone=request.timezone trimmed %}
                    You can enter submissions until {{ deadline }} ({{ timezone }}).
                {% endblocktrans %}
            </strong>
        </p>
    {% endif %}
    <div class="row mb-4 url-links">
        <a class="btn btn-success btn-lg btn-block {% if not cfp.is_open %}disabled{% endif %}"
                href="{{ request.event.urls.submit }}">
            {% if cfp.is_open %}
                {% trans "Submit a proposal" %}
            {% else %}
                {% trans "Submissions are closed" %}
            {% endif %}
        </a>
        <a class="btn btn-info btn-lg btn-block" href="{{ request.event.urls.user_submissions }}">
            {% trans "Edit or view your submission" %}
        </a>
        {% 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 %}
