upload.unturf.com/templates/list_media.html.j2

25 lines
828 B
Django/Jinja

{% extends 'base.html.j2' %}
{% block title %}Media in {{ namespace.name }}{% endblock %}
{% block content %}
<h1>Media in Namespace: {{ namespace.name }}</h1>
{% if media_items %}
<ul>
{% for media in media_items %}
<li>
<a href="{{ request.route_url('view_media_details', namespace_short_id=namespace.short_id, media_short_id=media.short_id) }}">{{ media.title or media.filename }}</a>
({{ media.media_type }}, {{ media.size|filesizeformat }})
</li>
{% endfor %}
</ul>
{% else %}
<p>No media found in this namespace.</p>
{% endif %}
{% if request.user_namespace_role in ['owner', 'editor'] %}
<p><a href="{{ request.route_url('upload_media', namespace_short_id=namespace.short_id) }}">Upload Media</a></p>
{% endif %}
{% endblock %}