Skip to content
Snippets Groups Projects
Commit a4c6e2d7 authored by Andreas Valder's avatar Andreas Valder
Browse files

reded download button and video deletion/editor. closes #90

parent 989a7eae
No related branches found
No related tags found
No related merge requests found
.videopreview > li:nth-child(even) { background: #f5f5f5; }
.courses-list li:nth-child(even) { background: #fAfAfA; }
.playpreviewbtn {
text-decoration: none;
width: 100%;
left: 0px;
color: lightgrey;
position: absolute;
font-size: 3em;
text-align: center;
line-height: 130px;
}
.thumbnailimg {
height: 130px;
position: relative;
margin-bottom: 10px;
background-size: contain;
background-repeat: no-repeat;
background-position: 50% 50%;
}
@media (min-width: 767px) {
.list-group-item-condensed { padding-top: 2px !important; padding-bottom: 2px !important; }
}
......
......@@ -83,21 +83,29 @@ $('#videoplayer').css("width");
{% endmacro %}
{% 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>
<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}}">{{ moderator_checkbox(['videos',v.id,'visible'], v.visible) }} {{v.format_description}} ({{v.file_size|filesizeformat(true)}}) {{moderator_delete(['videos',v.id,'deleted'])}} </a></li>
{% endif %}
{% for v in videos|sort(attribute='prio', reverse=True) if v.downloadable%}
<li><a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.format_description}} ({{v.file_size|filesizeformat(true)}})</a></li>
{% endfor %}
</ul>
{% endif %}
{% if not ismod() %}
<noscript>
{% else %}
<span>
{% endif %}
<ul class="pull-right list-unstyled" style="margin-left:10px;">
{% for v in videos|sort(attribute='prio', reverse=True) %}
<li><a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.format_description}} ({{v.file_size|filesizeformat(true)}})</a></li>
{% for v in videos|sort(attribute='prio', reverse=True) if v.downloadable %}
<li>{{moderator_delete(['videos',v.id,'deleted'])}} {{ moderator_checkbox(['videos',v.id,'visible'], v.visible) }} <a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.format_description}} ({{v.file_size|filesizeformat(true)}})</a></li>
{% endfor %}
</ul>
{% if not ismod() %}
</noscript>
{% else %}
</span>
{% endif %}
{% endmacro %}
{%macro video_embed_btn(lectureid) %}
......@@ -119,7 +127,13 @@ $('#embedcodebtn').popover(
{% macro lecture_list_item(lecture,videos,global_permissions) %}
<li class="list-group-item" id="lecture-{{lecture.id}}">
<div class="row">
<img style="margin-bottom: 10px" class="col-sm-2 col-xs-12"src="{{ config.VIDEOPREFIX }}/{{lecture.titlefile}}" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; ">
<div style="background-image: url('{% if not lecture.titlefile %}{{url_for('static',filename='no-thumbnail.png')}}{% else %}{{ config.VIDEOPREFIX }}/{{lecture.titlefile}}'){% endif %}" class="col-sm-2 col-xs-12 thumbnailimg">
{% if not videos|length is equalto 0 %}
<a href="{{url_for('lecture', id=lecture.id)}}">
<span class="glyphicon glyphicon-play-circle playpreviewbtn"></span>
</a>
{% endif %}
</div>
<span class="col-sm-3 col-xs-12">
<ul class="list-unstyled">
<li>{{ moderator_editor(['lectures',lecture.id,'title'], lecture.title) }}</li>
......@@ -142,22 +156,16 @@ $('#embedcodebtn').popover(
</ul>
</span>
<div class="col-sm-4 col-xs-12">
<ul class="pull-right list-inline">
<ul class="list-inline">
<li class="dropdown">
{{ video_download_btn(videos) }}
</li>
<li>
<a href="{{url_for('lecture', id=lecture.id)}}" class="btn btn-default {% if videos|length is equalto 0 %}disabled{% endif %}">
<span class="glyphicon glyphicon-play"></span>
Play
</a>
<li class="pull-right">
{{ moderator_permissioneditor('lecture', lecture.id, lecture.perm, global_permissions) }}
</li>
<li>
<li class="pull-right">
{{ moderator_delete(['lectures',lecture.id,'deleted']) }}
</li>
<li>
{{ moderator_permissioneditor('lecture', lecture.id, lecture.perm, global_permissions) }}
</li>
</ul>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment