{% extends "orga/schedule/base.html" %}
{% load i18n %}
{% block schedule_content %}
<legend>{% trans "HTML Export" %}</legend>

<p>
{% blocktrans trimmed %}
The event schedule can be exported to a static HTML dump, so you can upload it
to a normal file-serving webserver like nginx. This is done automatically on
schedule release, but you can also trigger that action here.
{% endblocktrans %}
</p>

<a href='{{ request.event.orga_urls.schedule_export_download }}' class="btn btn-primary">
    <i class="fa fa-download"></i>
    {% trans "Download ZIP" %}
</a>
<form action="{{ request.event.orga_urls.schedule_export_trigger }}" method="POST" class="d-inline-block">
    {% csrf_token %}
    <button type="submit" class="btn btn-secondary">
        <i class="fa fa-refresh"></i>
        {% trans "Regenerate Export" %}
    </button>
</form>

<p></p>
<legend>{% trans "Data Export" %}</legend>
<ul>
    {% for exporter in exporters %}
    <li>
        <a href="{{ request.event.urls.export }}?exporter={{ exporter.identifier|iriencode }}">
            {% if exporter.icon|slice:":3" == "fa-" %}
                <span class="fa {{ exporter.icon }}"></span>
            {% else %}
                {{ exporter.icon }}
            {% endif %}
            {{ exporter.verbose_name }}
        </a>
    </li>
    {% endfor %}
</ul>

<p></p>
<legend>{% trans "API" %}</legend>

{% trans "You can also use the API to export or use data." %}

<a class="btn btn-xs btn-primary" href="{{ request.event.api_urls.base }}">
    {% trans "Go to API" %}
</a>
<a class="btn btn-xs btn-secondary" href="https://docs.pretalx.org/en/latest/api/index.html">
    <span class="fa fa-book"></span>
    {% trans "Documentation" %}
</a>

{% endblock %}
