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

started acl editor

parent 83d411d4
......@@ -3,11 +3,18 @@
{% from 'macros.html' import valuedeletebtn %}
{% from 'macros.html' import valuecheckbox %}
{% from 'macros.html' import preview %}
{% from 'macros.html' import editacl %}
{% extends "base.html" %}
{% block content %}
<div class="panel panel-default">
<div class="panel-heading">
<h1 class="panel-title">{{ valueeditor(['courses',course.id,'title'], course.title)}}<span class="pull-right">{{ valuedeletebtn(['courses',course.id,'deleted']) }}</span></h1>
<h1 class="panel-title">{{ valueeditor(['courses',course.id,'title'], course.title)}}
<ul class="pull-right list-inline">
<li>{{ valuedeletebtn(['courses',course.id,'deleted']) }}</li>
<li>{{ editacl([]) }}</li>
</ul>
</h1>
</div>
<div class="row panel-body">
<div class="col-xs-12">
......
......@@ -136,7 +136,7 @@ $('#embedcodebtn').popover(
{% endif %}
</ul>
</span>
<span class="col-sm-4 col-xs-12">
<span class="col-sm-3 col-xs-12">
<ul class="list-unstyled">
<li>{{ valueeditor(['lectures',lecture.id,'comment'], lecture.comment) }}</li>
{% if ismod() %}
......@@ -146,19 +146,22 @@ $('#embedcodebtn').popover(
{% endif %}
</ul>
</span>
<div class="col-sm-3 col-xs-12">
<div class="col-sm-4 col-xs-12">
<ul class="pull-right list-inline">
<li class="dropdown">
{{ video_download_btn(videos) }}
{{ video_download_btn(videos) }}
</li>
<li>
<a href="{{url_for('lecture', id=lecture.id)}}" class="btn btn-default {% if videos|length is equalto 0 %}disabled{% endif %}">
<span class="glyphicon glyphicon-play"></span>
Play
</a>
</li>
<li>
<a href="{{url_for('lecture', id=lecture.id)}}" class="btn btn-default {% if videos|length is equalto 0 %}disabled{% endif %}">
<span class="glyphicon glyphicon-play"></span>
Play
</a>
{{ valuedeletebtn(['lectures',lecture.id,'deleted']) }}
</li>
<li>
{{ valuedeletebtn(['lectures',lecture.id,'deleted']) }}
{{ editacl([]) }}
</li>
</ul>
</div>
......@@ -182,10 +185,34 @@ $('#embedcodebtn').popover(
{% macro valuedeletebtn (path) %}
{% if ismod() %}
<button data-path="{{path|join('.')}}" onclick="moderatorinterface.delete(this)">
<span class="glyphicon glyphicon-trash"></span>
</button>
<button class="btn btn-default" style="background-color: red;" data-path="{{path|join('.')}}" onclick="moderatorinterface.delete(this)">
<span class="glyphicon glyphicon-trash"></span>
</button>
{% endif %}
{% endmacro %}
{% macro editacl(acl) %}
{% if not acl %}
{% if ismod() %}
<button class="btn btn-default" onclick="">
<span class="fa fa-unlock" aria-hidden="true" style="color: green;"></span>
</button>
{% endif %}
{% else %}
{% if ismod() %}
<button class="btn btn-default" onclick="">
{% else %}
<a>
{% endif %}
<span class="fa fa-lock" aria-hidden="true" style="color: red;"></span>
{% if ismod() %}
</button>
{% else %}
</a>
{% endif %}
{% endif %}
{% endmacro %}
{% macro vtttime(time) %}{{ '%02d:%02d:%02d.000'|format( time//3600, (time//60)%60, time%60) }}{% 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