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

{% block main %}

<h1>{% trans "All published files" %}</h1>

{% if object_list %}
<div class="compact">
{% for file in object_list %}
<h2><a href="{% url 'media-file-detail' file.id %}">{{ file.filename }}</a></h2>
<div class="metaline">{{ file.user }} {{ file.submit_date }}</div>
<div class="tagline">{% for tag in file.tags.all %}<a class="tag" href="{{ request.path_info }}/{{ tag }}">{{ tag }}</a>{% endfor %}</div>
{% endfor %}
</div>
{% 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 %}
