Add link to file preview which opens the file itself

This commit is contained in:
Lukas Schulze 2023-12-10 20:22:49 +01:00
parent ee55a9ea3a
commit eee497669e

View file

@ -33,6 +33,7 @@
{% for media in medias %}
<tr id="media_{{ media.id }}" class="bulk-selector" data-id="{{ media.id }}">
<td class="text-center">
<a href="{{ urlFor('/' ~ media.user_code ~ '/' ~ media.code ~ '.' ~ media.extension) }}" target="_blank">
{% if isDisplayableImage(media.mimetype) %}
{% if media.username is not null %}
<img src="{{ urlFor('/' ~ media.user_code ~ '/' ~ media.code ~ '.' ~ media.extension ~ '/raw?width=84&height=42') }}" class="img-fluid rounded">
@ -42,6 +43,7 @@
{% else %}
<i class="far {{ mime2font(media.mimetype) }} fa-2x"></i>
{% endif %}
</a>
</td>
<td>
<span class="text-maxlen">{{ media.filename }}</span>