Only list images for possible covers

This commit is contained in:
Baptiste Gelez
2018-10-31 14:40:31 +01:00
parent f593ce40af
commit 25b7399e7f
2 changed files with 11 additions and 5 deletions
+5 -3
View File
@@ -39,9 +39,11 @@
<select id="cover" name="cover">
<option value="none" {% if form is undefined or form.cover is undefined %}selected{% endif %}>{{ "None" | _ }}</option>
{% for media in medias %}
<option value="{{ media.id }}" {% if form is defined and form.cover is defined and form.cover == media.id %}selected{% endif %}>
{{ media.alt_text | default(value=media.content_warning) }}
</option>
{% if media.category == "image" %}
<option value="{{ media.id }}" {% if form is defined and form.cover is defined and form.cover == media.id %}selected{% endif %}>
{{ media.alt_text | default(value=media.content_warning) }}
</option>
{% endif %}
{% endfor %}
</select>