{% extends "base.html" %}
{% load uni_form_tags %}
{% load i18n %}

{% block main %}

<h1>{% trans "All published files" %}</h1>
{% if object_list %}
<table>
{% for file in object_list %}
<tr>
    <td>{{ file.id }}</td>
    <td><a href="{{ file.file.url }}">{{ file.filename }}</a></td>
    <td>{{ file.submit_date }}</td>
    <td>{% for tag in file.tags.all %}<a class="tag" href="{{ request.path_info }}/{{ tag }}">{{ tag }}</a>{% endfor %}</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>{% trans "No files matching your criteria" %}
{% endif %}

{% endblock main %}

{% block context_menu %}
{% if request.user.is_authenticated %}
<li><a href="{% url media-file-list %}">{% trans "All published files" %}</a></li>
<li><a href="{% url media-file-unpublished %}">{% trans "My unpublished files" %}</a></li>
<li><a href="{% url media-file-new %}">{% trans "Upload files" %}</a></li>
{% endif %}
{% endblock %}
