Commit 9b980036 authored by Andreas Valder's avatar Andreas Valder
Browse files

fixed course and player page for bootstrap4

parent d46a6326
......@@ -7,9 +7,9 @@
left: 0px;
color: lightgrey;
position: absolute;
font-size: 3em;
font-size: 3em !important;
text-align: center;
line-height: 130px;
line-height: 130px !important;
text-shadow: 0 0 2px black;
}
......
......@@ -65,11 +65,11 @@
</div>
{% if ismod() %}
<div class="panel panel-default">
<div class="panel-heading">
<a data-toggle="collapse" href="#statspanel" class="plotlyresize"><h1 class="panel-title">Statistiken</h1></a>
<div class="card">
<div class="card-header">
<a data-toggle="collapse" href="#statscard" class="plotlyresize"><h1 class="card-title">Statistiken</h1></a>
</div>
<div class="row panel-body collapse out panel-collapse" id="statspanel">
<div class="row card-body collapse out card-collapse" id="statscard">
<div class="col-md-6 col-xs-12">
<p class="text-center">Zuschauer pro Tag</p>
<div class="plot-view" data-url="{{url_for('stats_viewsperday', req="course", param=course.id)}}"></div>
......@@ -82,12 +82,12 @@
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h1 class="panel-title">Videos
<div class="card">
<div class="card-header">
<h1 class="card-title">Videos
{% if ismod() %}
<a class="btn btn-default" style="margin-right: 5px;" href="{{ url_for('create', table='lectures', time=datetime.now(), title='Noch kein Titel', visible='0', course_id=course.id, ref=url_for('course', id=course.id)) }}">Neuer Termin</a>
<a class="btn btn-default" style="margin-right: 5px;" href="{{url_for('list_import_sources', id=course['id'])}}">Campus Import</a>
<a class="btn btn-light" style="margin-right: 5px;" href="{{ url_for('create', table='lectures', time=datetime.now(), title='Noch kein Titel', visible='0', course_id=course.id, ref=url_for('course', id=course.id)) }}">Neuer Termin</a>
<a class="btn btn-light" style="margin-right: 5px;" href="{{url_for('list_import_sources', id=course['id'])}}">Campus Import</a>
{% endif %}
<ul class="list-inline pull-right">
<li>
......
......@@ -18,22 +18,22 @@
<meta property="og:description" content="{{ lecture.comment }}" />
{% endblock %}
{% block content %}
<div class="panel panel-default">
<div class="panel-heading">
<span class="panel-title"><strong><a href="{{url_for('course', handle=course.handle)}}#lecture-{{lecture.id}}">{{ course.title }}</a></strong>: {{ lecture.title}}</span>
<div class="card">
<div class="card-header">
<span class="card-title"><strong><a href="{{url_for('course', handle=course.handle)}}#lecture-{{lecture.id}}">{{ course.title }}</a></strong>: {{ lecture.title}}</span>
</div>
<div class="panel-body">
<div class="card-body">
<div class="row" style="padding: 0px;">
<div class="col-xs-12" style="padding-bottom: 5px;">
<a href="{{url_for('course', handle=course.handle)}}#lecture-{{lecture.id}}" class="btn btn-default" ><span class="fa fa-chevron-circle-left" aria-hidden="true"></span> Zur Veranstaltungsseite</a>
<ul class="list-inline pull-right">
<li>{{ video_embed_btn(lecture.id, course=course.handle) }}</li>
<li class="dropdown">{{ video_download_btn(videos) }}</li>
<div class="col-12" style="padding-bottom: 5px;">
<a href="{{url_for('course', handle=course.handle)}}#lecture-{{lecture.id}}" class="btn btn-secondary" ><span class="fa fa-chevron-circle-left" aria-hidden="true"></span> Zur Veranstaltungsseite</a>
<ul class="list-inline float-right">
<li class="list-inline-item">{{ video_embed_btn(lecture.id, course=course.handle) }}</li>
<li class="dropdown list-inline-item">{{ video_download_btn(videos) }}</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-xs-12" style="padding: 0px">
<div class="col-12" style="padding: 0px">
{{ player(lecture, videos, get_flashed_messages(category_filter=['player']), seek=seek) }}
</div>
<div class="col-xs-12" style="padding-top: 20px">
......@@ -41,7 +41,7 @@
</div>
<div class="col-xs-12 table-responsive" style="padding-top: 10px;">
<p>Kapitel:
<button class="btn btn-default" id="hintnewchapter">{% if ismod() %}Neues Kapitel{% else %}Kapitelmarker vorschlagen{% endif %}</button>
<button class="btn btn-secondary" id="hintnewchapter">{% if ismod() %}Neues Kapitel{% else %}Kapitelmarker vorschlagen{% endif %}</button>
</p>
<table class="table table-hover">
<tr>
......@@ -75,18 +75,20 @@
</div>
{% if ismod() %}
<div class="panel panel-default">
<div class="panel-heading">
<a data-toggle="collapse" href="#statspanel" class="plotlyresize"><h1 class="panel-title">Statistiken</h1></a>
<div class="card">
<div class="card-header">
<a data-toggle="collapse" href="#statscard" class="plotlyresize"><h1 class="card-title">Statistiken</h1></a>
</div>
<div class="row panel-body collapse out panel-collapse" id="statspanel">
<div class="col-md-6 col-xs-12">
<p class="text-center">Zuschauer pro Tag</p>
<div class="plot-view" data-url="{{url_for('stats_viewsperday', req="lecture", param=lecture.id)}}"></div>
</div>
<div class="col-md-6 col-xs-12">
<p class="text-center">Zuschauer im Livestream</p>
<div class="plot-view" data-url="{{url_for('stats_generic', req="live_views", param=lecture.id)}}" data-reload="60000"></div>
<div class="ard-body collapse out card-collapse" id="statscard">
<div class="row m-1">
<div class="col-6 col-xs-12">
<p class="text-center">Zuschauer pro Tag</p>
<div class="plot-view" data-url="{{url_for('stats_viewsperday', req="lecture", param=lecture.id)}}"></div>
</div>
<div class="col-6 col-xs-12">
<p class="text-center">Zuschauer im Livestream</p>
<div class="plot-view" data-url="{{url_for('stats_generic', req="live_views", param=lecture.id)}}" data-reload="60000"></div>
</div>
</div>
</div>
</div>
......@@ -128,7 +130,7 @@ $(function() {
var m = zeropad( Math.trunc((timestamp%3600)/60),2);
var s = zeropad( Math.trunc(timestamp%60),2);
var timeasstring = h+':'+m+':'+s;
return '<form method="post" data-url="{{ url_for('suggest_chapter', lectureid=lecture.id) }}" onSubmit="return hintchapterclick(this);"><input class="form-control" placeholder="00:00.000" name="time" type="text" value="'+timeasstring+'"><br><input class="form-control" placeholder="Kapitel" name="text" type="text"><br><input type="submit" class="btn btn-default" value="{% if ismod() %}Hinzufügen{% else %}Vorschlagen{% endif %}"></form>';
return '<form method="post" data-url="{{ url_for('suggest_chapter', lectureid=lecture.id) }}" onSubmit="return hintchapterclick(this);"><input class="form-control" placeholder="00:00.000" name="time" type="text" value="'+timeasstring+'"><br><input class="form-control" placeholder="Kapitel" name="text" type="text"><br><input type="submit" class="btn btn-secondary" value="{% if ismod() %}Hinzufügen{% else %}Vorschlagen{% endif %}"></form>';
}
})
......
......@@ -174,14 +174,14 @@ $(function() {
<button class="btn btn-secondary 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">
{% 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 class="dropdown-item"><a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a></li>
{% endfor %}
</ul>
{% endif %}
{% if not ismod() %}
<noscript>
{% endif %}
<ul class="pull-right list-unstyled" style="margin-left:10px;">
<ul class="float-right list-unstyled" style="margin-left:10px;">
{% for v in videos|sort(attribute='formats.prio', reverse=True) if (v.downloadable or ismod() ) %}
<li>{{moderator_delete(['videos',v.id,'deleted'])}} {{ moderator_checkbox(['videos',v.id,'visible'], v.visible) }} <a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a></li>
{% endfor %}
......@@ -214,7 +214,7 @@ $('#embedcodebtn').popover(
<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>
<span class="fa fa-play-circle playpreviewbtn"></span>
</a>
{% endif %}
</div>
......@@ -254,16 +254,16 @@ $('#embedcodebtn').popover(
<li class="dropdown">
{{ video_download_btn(videos) }}
</li>
<li class="pull-right">
<li class="float-right">
{{ moderator_permissioneditor('lecture', lecture.id, lecture.perm, global_permissions) }}
</li>
<li class="pull-right">
<li class="float-right">
{{ moderator_delete(['lectures',lecture.id,'deleted']) }}
</li>
</ul>
</li>
{% if ismod() %}
<li class="pull-right">
<li class="float-right">
<p>Abrufe: <span data-lectureid="{{ lecture.id }}" data-lecturedate="{{ lecture.time }}" class="viewcounter">loading...</span></p>
</li>
{% endif %}
......
Markdown is supported
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