stats.html 2.38 KB
Newer Older
Andreas Valder's avatar
Andreas Valder committed
1
2
{% extends "base.html" %}
{% block content %}
3
4
	<div class="card">
		<div class="card-header">
5
			<span class="card-title">Gesamt</span>
Andreas Valder's avatar
Andreas Valder committed
6
		</div>
7
		<div class="card-body">
8
			<div class="row col-xs-12">
Andreas Valder's avatar
Andreas Valder committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
				<div class="col-xs-12 col-md-6">
					<p class="text-center">Veranstaltungen pro Semester</p>
					<div class="plot-view" data-url="{{url_for('stats_generic', req="course_count")}}"></div>
				</div>
				<div class="col-xs-12 col-md-6">
					<p class="text-center">Vorlesungen pro Semester</p>
					<div class="plot-view" data-url="{{url_for('stats_generic', req="lectures_count")}}"></div>
				</div>
				<div class="col-xs-12 col-md-6">
					<p class="text-center">Veranstaltungen pro Kategorie</p>
					<div class="plot-view" data-type="pie" data-url="{{url_for('stats_generic', req="categories_courses")}}"></div>
				</div>
				<div class="col-xs-12 col-md-6">
					<p class="text-center">Vorlesungen pro Kategorie</p>
					<div class="plot-view" data-type="pie" data-url="{{url_for('stats_generic', req="categories_lectures")}}"></div>
				</div>
				<!--<div class="col-xs-12 col-md-12 plot-view" style="height: 1200px;" data-type="pie" data-url="{{url_for('stats_generic', req="organizer_courses")}}"></div>!-->
26
27
28
			</div>
		</div>
	</div>
29
30
31
	<div class="card">
		<div class="card-header">
			<span class="card-title"><a name="semesterstats"></a>Semester <select id="semesterselect" name="semester"><option value="">alle</option></select></span>
32
		</div>
33
		<div class="card-body" >
Andreas Valder's avatar
Andreas Valder committed
34
35
36
37
38
39
40
			<div class=col-xs-12">
				<p class="text-center">Zuschauer pro Veranstaltung</p>
				<div class="plot-view" data-url="{{url_for('stats_viewsperday', req="courses", filter=filter)}}"></div>
			</div>
			<div class=col-xs-12">
				<p class="text-center">Zuschauer pro Format</p>
				<div class="plot-view" data-url="{{url_for('stats_viewsperday', req="global", filter=filter)}}"></div>
41
			</div>
42
		</div>
Andreas Valder's avatar
Andreas Valder committed
43
	</div>
44
45
46
47
48
<script>
$( document ).ready(function () {
	{% for s in semester if s.semester != '' %}
	$("#semesterselect").append('<option value="{{ s.from.timestamp()|int }}-{{ s.to.timestamp()|int }}">{{ s.semester }}</option>');
	{% endfor %}
49
	{% if filter %}
50
	$("#semesterselect").val("{{ filter }}")
51
52
53
	{% else %}
	$("#semesterselect").val("")
	{% endif %}
54
55
56
57
	$("#semesterselect").on("change", function () {
		window.location.href="{{ url_for('stats') }}?filter="+$("#semesterselect").val()+"#semesterstats";
	});
});
58
</script>
Andreas Valder's avatar
Andreas Valder committed
59
{% endblock %}