Skip to content
Snippets Groups Projects
Commit 27be8ca5 authored by Julian Rother's avatar Julian Rother
Browse files

Disable download button if videos not downloadable, closes #244

parent e980e03e
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,7 @@ $(function() {
{% macro video_download_btn(videos) %}
{% if not ismod() %}
<span class="btn btn-default dropdown-toggle{% if videos|length is equalto 0 %} disabled{% endif %}" type="button" data-toggle="dropdown">Download <span class="caret"></span></span>
<span class="btn btn-default dropdown-toggle{% if not videos|selectattr('downloadable')|list and not ismod() %} disabled{% endif %}" type="button" data-toggle="dropdown">Download <span class="caret"></span></span>
<ul class="dropdown-menu">
{% for v in videos|sort(attribute='prio', reverse=True) if (v.downloadable or ismod() ) %}
<li><a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.format_description}} ({{v.file_size|filesizeformat(true)}})</a></li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment