Commit afe05743 authored by Andreas Valder's avatar Andreas Valder
Browse files

now collapsing lectures without videos

parent ca4ecbc8
......@@ -167,42 +167,57 @@ $('#embedcodebtn').popover(
{% macro lecture_list_item(lecture,videos,global_permissions) %}
<li class="list-group-item" id="lecture-{{lecture.id}}">
<div class="row">
<div style="background-image: url('{{ config.VIDEOPREFIX }}/thumbnail/l_{{lecture.id}}.jpg')" class="col-sm-2 col-xs-12 thumbnailimg">
{% if not videos|length is equalto 0 %}
<a href="{{url_for('lecture', course=lecture.course.handle, id=lecture.id)}}">
<span class="glyphicon glyphicon-play-circle playpreviewbtn"></span>
</a>
{% endif %}
</div>
<ul class="list-unstyled col-sm-3 col-xs-12">
<li>{{ moderator_editor(['lectures',lecture.id,'title'], lecture.title) }}{{livelabel((lecture.live and lecture.time > datetime.now()-timedelta(days=1)), videos|selectattr("livehandle")|list|length)}}</li>
{% if lecture.speaker or ismod() %}<li>Gehalten von {{ moderator_editor(['lectures',lecture.id,'speaker'], lecture.speaker) }}</li>{% endif %}
<li>{{ moderator_editor(['lectures',lecture.id,'time'], lecture.time) }} </li>
<li>Dauer: {{ moderator_editor(['lectures',lecture.id,'duration'], lecture.duration) }} min</li>
{% if ismod() %}
<li>ID: <a href="{{url_for('course',handle=lecture.course.handle)}}#lecture-{{lecture.id}}">{{lecture.id}}</a></li>
{% endif %}
</ul>
<ul class="list-unstyled col-sm-3 col-xs-12">
<li>{{ moderator_editor(['lectures',lecture.id,'comment'], lecture.comment) }}</li>
{% if ismod() %}
<li>{{ moderator_editor(['lectures',lecture.id,'internal'], lecture.internal) }}</li>
<li>Sichtbar: {{ moderator_checkbox(['lectures',lecture.id,'visible'], lecture.visible) }}</li>
<li>Livestream geplant: {{ moderator_checkbox(['lectures',lecture.id,'live'], lecture.live) }}</li>
<li>Hörsaal: {{ moderator_editor(['lectures',lecture.id,'place'], lecture.place) }} </li>
{% if ismod() or (videos|length > 0) %}
<div style="background-image: url('{{ config.VIDEOPREFIX }}/thumbnail/l_{{lecture.id}}.jpg')" class="col-sm-2 col-xs-12 thumbnailimg">
{% if not videos|length is equalto 0 %}
<a href="{{url_for('lecture', course=lecture.course.handle, id=lecture.id)}}">
<span class="glyphicon glyphicon-play-circle playpreviewbtn"></span>
</a>
{% endif %}
</ul>
<ul class="list-inline col-sm-4 col-xs-12">
<li class="dropdown">
{{ video_download_btn(videos) }}
</li>
<li class="pull-right">
{{ moderator_permissioneditor('lecture', lecture.id, lecture.perm, global_permissions) }}
</li>
<li class="pull-right">
{{ moderator_delete(['lectures',lecture.id,'deleted']) }}
</li>
</ul>
</div>
<ul class="list-unstyled col-sm-3 col-xs-12">
<li>{{ moderator_editor(['lectures',lecture.id,'title'], lecture.title) }}{{livelabel((lecture.live and lecture.time > datetime.now()-timedelta(days=1)), videos|selectattr("livehandle")|list|length)}}</li>
{% if lecture.speaker or ismod() %}<li>Gehalten von {{ moderator_editor(['lectures',lecture.id,'speaker'], lecture.speaker) }}</li>{% endif %}
<li>{{ moderator_editor(['lectures',lecture.id,'time'], lecture.time) }} </li>
<li>Dauer: {{ moderator_editor(['lectures',lecture.id,'duration'], lecture.duration) }} min</li>
{% if ismod() %}
<li>ID: <a href="{{url_for('course',handle=lecture.course.handle)}}#lecture-{{lecture.id}}">{{lecture.id}}</a></li>
{% endif %}
</ul>
<ul class="list-unstyled col-sm-3 col-xs-12">
<li>{{ moderator_editor(['lectures',lecture.id,'comment'], lecture.comment) }}</li>
{% if ismod() %}
<li>{{ moderator_editor(['lectures',lecture.id,'internal'], lecture.internal) }}</li>
<li>Sichtbar: {{ moderator_checkbox(['lectures',lecture.id,'visible'], lecture.visible) }}</li>
<li>Livestream geplant: {{ moderator_checkbox(['lectures',lecture.id,'live'], lecture.live) }}</li>
<li>Hörsaal: {{ moderator_editor(['lectures',lecture.id,'place'], lecture.place) }} </li>
{% endif %}
</ul>
<ul class="list-inline col-sm-4 col-xs-12">
<li class="dropdown">
{{ video_download_btn(videos) }}
</li>
<li class="pull-right">
{{ moderator_permissioneditor('lecture', lecture.id, lecture.perm, global_permissions) }}
</li>
<li class="pull-right">
{{ moderator_delete(['lectures',lecture.id,'deleted']) }}
</li>
</ul>
{% else %}
<div class="col-sm-2 col-xs-12">
</div>
<ul class="list-unstyled col-sm-3 col-xs-12">
<li>{{ moderator_editor(['lectures',lecture.id,'title'], lecture.title) }}{{livelabel((lecture.live and lecture.time > datetime.now()-timedelta(days=1)), videos|selectattr("livehandle")|list|length)}}</li>
</ul>
<ul class="list-unstyled col-sm-3 col-xs-12">
<li>{{ moderator_editor(['lectures',lecture.id,'time'], lecture.time) }} </li>
<li>Dauer: {{ moderator_editor(['lectures',lecture.id,'duration'], lecture.duration) }} min</li>
</ul>
<ul class="list-inline col-sm-4 col-xs-12">
<li>{{ moderator_editor(['lectures',lecture.id,'comment'], lecture.comment) }}</li>
</ul>
{% endif %}
</div>
</li>
{% endmacro %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment