Skip to content
Snippets Groups Projects
Commit 3dac91ef authored by Magnus Giesbert's avatar Magnus Giesbert
Browse files

add download attribute to downloadbutton macro

parent be7f82cb
Branches
No related tags found
1 merge request!39Add download attribute to video_download_btn macro
...@@ -194,7 +194,7 @@ $(function() { ...@@ -194,7 +194,7 @@ $(function() {
<button 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></button> <button 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></button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{% for v in videos|sort(attribute='formats.prio', reverse=True) if (v.downloadable or ismod() ) %} {% for v in videos|sort(attribute='formats.prio', reverse=True) if (v.downloadable or ismod() ) %}
<li><a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a></li> <li><a href="{{ config.VIDEOPREFIX }}/{{v.path}}" download>{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
...@@ -206,7 +206,7 @@ $(function() { ...@@ -206,7 +206,7 @@ $(function() {
<li> <li>
{{moderator_delete(['videos',v.id,'deleted'])}} {{moderator_delete(['videos',v.id,'deleted'])}}
{{ moderator_checkbox(['videos',v.id,'visible'], v.visible) }} {{ moderator_checkbox(['videos',v.id,'visible'], v.visible) }}
<a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a> <a href="{{ config.VIDEOPREFIX }}/{{v.path}}" download>{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a>
{% if v.source %} {% if v.source %}
<a href="{{url_for('add_reencode_job', ref=request.url, videoid=v.id)}}" class="btn btn-default" data-toggle="tooltip" title="Video neu transcoden"> <a href="{{url_for('add_reencode_job', ref=request.url, videoid=v.id)}}" class="btn btn-default" data-toggle="tooltip" title="Video neu transcoden">
<span class="glyphicon glyphicon-refresh"></span> <span class="glyphicon glyphicon-refresh"></span>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment