{% extends 'base.html' %}

{% load i18n %}

{% block title %}
    {% if mediafile %}
        {% trans "Edit file" %}
    {% else %}
        {% trans "New file" %}
    {% endif %}
    – {{ block.super }}
{% endblock %}

{% block content %}
    <h1>
        {% if mediafile %}
            {% trans "Edit file" %}
        {% else %}
            {% trans "New file" %}
        {% endif %}
        <small class="pull-right">
        <a href="{% url 'mediafile_list' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
        </small>
    </h1>
    <form action="" method="post" enctype="multipart/form-data">{% csrf_token %}
        {% include "form.html" %}
        <p>
            {% if perms.mediafile.can_manage %}
                {% include "formbuttons_saveapply.html" %}
            {% else %}
                {% include "formbuttons_save.html" %}
            {% endif %}
        <a href="{% url 'mediafile_list' %}" class="btn">{% trans 'Cancel' %}</a>
        </p>
        <small>* {% trans "required" %}</small>
    </form>
{% endblock %}
