diff --git a/templates/chapters.srt b/templates/chapters.srt index 0f2f3bca97db7e9c1e9a2a91840ecbd0a386009f..cf76270a6df2c250e5c50e2dee412851b6c181ea 100644 --- a/templates/chapters.srt +++ b/templates/chapters.srt @@ -2,13 +2,14 @@ WEBVTT - - {% for c in chapters|sort(attribute='start') %} {{ loop.index }} {# time format is 'minutes:seconds.ms' we expect full seconds #} {{ vtttime(c['start']) }} --> {{ vtttime(c['end']) }} {{ c['text'] }} -{% else $} +{% else %} +00:00:00.000 --> 23:59:59.999 +Video + {% endfor %} diff --git a/templates/lecture.html b/templates/lecture.html index ab0fc0df65140229855ba4ac917fad39f8743598..13088a409d321a5d067bb98fd98a76b86da417bf 100644 --- a/templates/lecture.html +++ b/templates/lecture.html @@ -1,6 +1,10 @@ {% from 'macros.html' import player %} {% from 'macros.html' import video_download_btn %} {% from 'macros.html' import video_embed_btn %} +{% from 'macros.html' import vtttime %} +{% from 'macros.html' import valueeditor %} +{% from 'macros.html' import valuedeletebtn %} +{% from 'macros.html' import valuecheckbox %} {% set page_border = 0 -%} {% extends "base.html" %} @@ -27,6 +31,25 @@ {{ player(lecture, videos) }} </div> <div class="col-xs-12" style="padding-top: 10px;"> + <p>Kapitel:</p> + <table class="table table-hover"> + <tr> + <th>Index</th> + <th>Start</th> + <th>Kapitel</th> + <th>Sichtbar</th> + <th></th> + </tr> + {% for c in chapters|sort(attribute='start') %} + <tr onclick=" $('.player video')[0].setCurrentTime({{c['time']}})"> + <td>{{ loop.index }}</td> + <td>{{ vtttime(c['time']) }}</td> + <td>{{ valueeditor(['chapters',c.id,'text'],c['text']) }}</td> + <td>{{ valuecheckbox(['chapters',c.id,'visible'], c.visible) }}</td> + <td>{{ valuedeletebtn(['chapters',c.id,'deleted']) }}</td> + </tr> + {% endfor %} + </table> </div> </div> </div>