course.html 3.03 KB
Newer Older
1
{% from 'macros.html' import lecture_list_item %}
2
3
4
{% from 'macros.html' import moderator_editor %}
{% from 'macros.html' import moderator_delete %}
{% from 'macros.html' import moderator_checkbox %}
5
{% from 'macros.html' import preview %}
6
{% from 'macros.html' import moderator_acleditor %}
Andreas Valder's avatar
Andreas Valder committed
7

Andreas Valder's avatar
Andreas Valder committed
8
9
{% extends "base.html" %}
{% block content %}
10
11
<div class="panel panel-default">
	<div class="panel-heading">
Andreas Valder's avatar
Andreas Valder committed
12
		<h1 class="panel-title">{{ moderator_editor(['courses',course.id,'title'], course.title)}} {% if ismod() %}<i>(<a href={{ url_for('course', id=course.id) }}>{{course.id}}</a>)</i>{% endif %}
Andreas Valder's avatar
Andreas Valder committed
13
			<ul class="pull-right list-inline">
14
15
				<li>{{ moderator_delete(['courses',course.id,'deleted']) }}</li>
				<li>{{ moderator_acleditor('course',course.id,course.auth, global_acls) }}</li>
Andreas Valder's avatar
Andreas Valder committed
16
17
			</ul>
		</h1>
Andreas Valder's avatar
Andreas Valder committed
18
	</div>
19
	<div class="row panel-body">
20
21
		<div class="col-xs-12">
			<table class="table-top-aligned table-condensed">
22
				<tbody>
23
24
25
					<tr><td>Semester:</td><td>{{ moderator_editor(['courses',course.id,'semester'], course.semester) }}</td></tr>
					<tr><td>Veranstalter:</td><td>{{ moderator_editor(['courses',course.id,'organizer'], course.organizer) }}</td></tr>
					<tr><td>Bemerkungen:</td><td>{{ moderator_editor(['courses',course.id,'description'], course.description) }}</td></tr>
Andreas Valder's avatar
Andreas Valder committed
26
27
28
29
30
				</tbody>
			</table>
		</div>
		{% if ismod() %}
		<div class="col-xs-12" style="margin-top: 20px">
31
			<table class="table-condensed table-top-aligned">
Andreas Valder's avatar
Andreas Valder committed
32
				<tbody>
33
34
35
36
37
38
39
					<tr><td>Sichtbar:</td><td>{{ moderator_checkbox(['courses',course.id,'visible'], course.visible) }}</td></tr>
					<tr><td>Gelistet:</td><td>{{ moderator_checkbox(['courses',course.id,'listed'], course.listed) }}</td></tr>
					<tr><td>Downloadable:</td><td>{{ moderator_checkbox(['courses',course.id,'downloadable'], course.downloadable) }}</td></tr>
					<tr><td>Short:</td><td>{{ moderator_editor(['courses',course.id,'short'], course.short) }}</td></tr>
					<tr><td>Handle:</td><td>{{ moderator_editor(['courses',course.id,'handle'], course.handle) }}</td></tr>
					<tr><td>Thema:</td><td>{{ moderator_editor(['courses',course.id,'subject'], course.subject) }}</td></tr>
					<tr><td>Zuständig:</td><td>{{ moderator_editor(['courses',course.id,'responsible'], course.responsible) }}</td></tr>
40
41
				</tbody>
			</table>
42
		</div>
Andreas Valder's avatar
Andreas Valder committed
43
		{% endif %}
44
45
46
47
	</div>
</div>
<div class="panel panel-default">
	<div class="panel-heading">
Julian Rother's avatar
Julian Rother committed
48
		<h1 class="panel-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', course_id=course.id, ref=request.url) }}">Neuer Termin</a><a class="btn btn-default" style="margin-right: 5px;" href="{{url_for('import_from', id=course['id'])}}">Campus Import</a>{% endif %} <a class="fa fa-rss-square pull-right" aria-hidden="true" href="{{url_for('feed', handle=course.handle)}}"></a> </h1>
49
50
51
	</div>
	<ul class="list-group lectureslist">
		{% for l in lectures %}
Andreas Valder's avatar
Andreas Valder committed
52
			{{ lecture_list_item(l,videos|selectattr('lecture_id','equalto',l.id)|list,global_acls)}}
53
54
		{% endfor %}
	</ul>
Andreas Valder's avatar
Andreas Valder committed
55
56
</div>
{% endblock %}