Merge pull request #553 from lsgd/master

Add link to file preview which opens the file itself
This commit is contained in:
Sergio Brighenti 2024-01-14 14:04:28 +01:00 committed by GitHub
commit 59c6691585
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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>