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