Commit 5db4b7a9 authored by Jannik Hellenkamp's avatar Jannik Hellenkamp

Chanhed the UI for the lecture view

parent 00aea483
......@@ -24,37 +24,34 @@
</div>
<div class="panel-body">
<div class="row" style="padding: 0px;">
<div class="col-xs-12" style="padding-bottom: 5px;">
<div class="col-xs-12" style="padding-bottom: 15px;">
<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>
</ul>
</div>
</div>
<div class="row">
<div class="col-xs-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">
<p>{{ moderator_editor(['lectures',lecture.id,'comment'], lecture.comment) }}</p>
<div class="col-xs-12" style="padding-top: 15px;">
<button class="btn btn-default" id="hintnewchapter">{% if ismod() %}Neues Kapitel{% else %}Kapitelmarker vorschlagen{% endif %}</button>
<ul class="list-inline pull-right" style="margin-bottom: 0px;">
<li>{{ video_embed_btn(lecture.id, course=course.handle) }}</li>
<li class="dropup">{{ video_download_btn(videos) }}</li>
</ul>
</div>
{% if lecture.comment or ismod() %}
<div class="col-xs-12" style="padding-top: 15px">
<h4><strong>Beschreibung:</strong></h4><p style="padding-left: 5px;padding-right: 5px"> {{ moderator_editor(['lectures',lecture.id,'comment'], lecture.comment) }}</p>
</div>
{% endif %}
{% if chapters %}
<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>
</p>
<h4><strong>Kapitel:</strong></h4>
<table class="table table-hover">
<tr>
<th style="width: 130px;">Start</th>
<th>Kapitel</th>
{% if ismod() %}
<th>Sichtbar</th>
<th></th>
{% endif %}
</tr>
{% for c in chapters|sort(attribute='time') %}
<tr>
<td>
<td style="width: 130px;">
<a class="chapterlink" href="{{url_for('lecture', course=course.handle, id=lecture.id, t=c['time'])}}" data-seek-time="{{c['time']}}">{{ c.time|time_offset }}</a>
<br>
{% if ismod() %}
......@@ -70,6 +67,7 @@
{% endfor %}
</table>
</div>
{% endif %}
</div>
</div>
</div>
......@@ -116,7 +114,7 @@ $(function() {
{
html:true,
title:'Kapitelmarkierung vorschlagen',
placement: 'bottom',
placement: 'top',
container: 'body',
content: function() {
var zeropad = function (num, places) {
......@@ -128,7 +126,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 class="needs-validation" method="post" data-url="{{ url_for('suggest_chapter', lectureid=lecture.id) }}" onSubmit="return hintchapterclick(this);"><input class="form-control" placeholder="00:00" name="time" type="text" value="'+timeasstring+'" pattern="(|[0-9]{1,2}:(|[0-9]{1,2}:))[0-9]{1,2}"><br><input class="form-control" placeholder="Titel" name="text" type="text" required><br><input type="submit" class="btn btn-default" value="{% if ismod() %}Hinzufügen{% else %}Vorschlagen{% endif %}"></form>';
return '<form class="needs-validation" method="post" data-url="{{ url_for('suggest_chapter', lectureid=lecture.id) }}" onSubmit="return hintchapterclick(this);"><input class="form-control" style="margin-top: 6px;margin-bottom: 6px;" placeholder="00:00" name="time" type="text" value="'+timeasstring+'" pattern="(|[0-9]{1,2}:(|[0-9]{1,2}:))[0-9]{1,2}"><input class="form-control" placeholder="Titel" name="text" type="text" style="margin-bottom: 15px;"required><input type="submit" class="btn btn-default" style="margin-bottom: 6px;" value="{% if ismod() %}Hinzufügen{% else %}Vorschlagen{% endif %}"></form>';
}
})
......
......@@ -201,6 +201,7 @@ $('#embedcodebtn').popover(
{
html:true,
title:'Einbettcode',
placement: 'top',
content:'<span><input type="text" onclick="this.select()" value="{{embedcode}}"></span>'
}
)
......
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