videos.html 2.13 KB
Newer Older
1
2
3
4
{% from 'macros.html' import course_list_item %}
{% set active_page = 'videos' -%}
{% set groupedby = groupedby|default('semester', true) -%}

Andreas Valder's avatar
Andreas Valder committed
5
6
7
{% extends "base.html" %}
{% block content %}
<div class="container-fluid">
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
	<div class="row">
		<div class="col-xs-12 dropdown">
		  <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Grupierung
		  <span class="caret"></span></button>
		  <ul class="dropdown-menu">
		    <li><a href="?groupedby=semester">Semester</a></li>
		    <li><a href="?groupedby=courses">Veranstaltungen</a></li>
		    <li><a href="?groupedby=organizer">Dozenten</a></li>
		  </ul>
		</div>
	</div>
	<div class="row"><div class="col-xs-offset-1 col-xs-10">
	{% if groupedby == 'semester' %}
		{% for g in courses|groupby('semester')|reverse %}
			<div class="row panel-group">
				<div class="col-xs-12"><div class="panel panel-default">
					<div class="panel-heading">
						<h1 class="panel-title">{{g.grouper}}</h1>
					</div>
					<ul class="courses-list list-group">
						{% for i in g.list %}
						{{ course_list_item(i) }}
						{% endfor %}
					</ul>
				</div></div>
			</div>
		{% endfor %}
	{% endif %}
	
	{% if groupedby == 'courses' %}
		{% for g in courses|groupby('title')|reverse %}
		<div class="row panel-group">
			<div class="col-xs-12"><div class="panel panel-default">
				<div class="panel-heading">
					<h1 class="panel-title">{{g.grouper}}</h1>
				</div>
				<ul class="courses-list list-group">
					{% for i in g.list|sort(attribute='semester') %}
					{{ course_list_item(i,true) }}
					{% endfor %}
				</ul>
			</div></div>
		</div>
		{% endfor %}
	{% endif %}
	
	{% if groupedby == 'organizer' %}
		{% for g in courses|groupby('organizer')|reverse %}
		<div class="row panel-group">
			<div class="col-xs-12"><div class="panel panel-default">
				<div class="panel-heading">
					<h1 class="panel-title">{{g.grouper}}</h1>
				</div>
				<ul class="courses-list list-group">
					{% for i in g.list|sort(attribute='semester') %}
					{{ course_list_item(i,true) }}
					{% endfor %}
				</ul>
			</div></div>
		</div>
		{% endfor %}
	{% endif %}
	</div></div>

Andreas Valder's avatar
Andreas Valder committed
72
73
</div>
{% endblock %}