From aeb15dea3fed5c7812a3e87b1637ef77be5e47b2 Mon Sep 17 00:00:00 2001 From: Julian Rother <julianr@fsmpi.rwth-aachen.de> Date: Sun, 9 Oct 2016 02:01:07 +0200 Subject: [PATCH] Hide chapter list if not logged in --- templates/lecture.html | 44 ++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/templates/lecture.html b/templates/lecture.html index 84d07c6..76a4580 100644 --- a/templates/lecture.html +++ b/templates/lecture.html @@ -30,27 +30,29 @@ <div class="col-xs-12" style="padding: 0px"> {{ 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='time') %} - <tr onclick="videojs('videoplayer').currentTime({{c['time']}})"> - <td>{{ loop.index }}</td> - <td>{{ vtttime(c['time']) }}</td> - <td>{{ moderator_editor(['chapters',c.id,'text'],c['text']) }}</td> - <td>{{ moderator_checkbox(['chapters',c.id,'visible'], c.visible) }}</td> - <td>{{ moderator_delete(['chapters',c.id,'deleted']) }}</td> - </tr> - {% endfor %} - </table> - </div> + {% if ismod() %} + <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='time') %} + <tr onclick="videojs('videoplayer').currentTime({{c['time']}})"> + <td>{{ loop.index }}</td> + <td>{{ vtttime(c['time']) }}</td> + <td>{{ moderator_editor(['chapters',c.id,'text'],c['text']) }}</td> + <td>{{ moderator_checkbox(['chapters',c.id,'visible'], c.visible) }}</td> + <td>{{ moderator_delete(['chapters',c.id,'deleted']) }}</td> + </tr> + {% endfor %} + </table> + </div> + {% endif %} </div> </div> </div> -- GitLab