1
2
3
4
5
6
7
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
72
73
74
75
76
77
78
79
|
<div class="container-fluid">
<h1>{{lang_allExamPeriods}}</h1>
<div class="row">
<table class="table">
<tr>
<th>{{lang_id}}</th>
<th>{{lang_locations}}</th>
<th>{{lang_begin}}</th>
<th>{{lang_end}}</th>
<th>{{lang_actions}}</th>
</tr>
{{#exams}}
<tr>
<td>{{examid}}</td>
<td>{{locationnames}} </td>
<td>{{starttime}}</td>
<td>{{endtime}}</td>
<td>
<div class="btn-toolbar" role="toolbar">
<div class="btn-group">
<a href="?do=exams&action=edit&examid={{examid}}" class="btn btn-default btn-sm" >{{lang_edit}}</a>
</div>
<div class="btn-group">
<form method="POST" action="?do=exams&action=delete" onsubmit="return confirm('{{lang_deleteConfirmation}}');">
<input type="hidden" name="token" value="{{token}}"/>
<input type="hidden" name="examid" value="{{examid}}"/>
<input type="submit" value="{{lang_delete}}" class="btn btn-default btn-sm" />
</form>
</div>
</div>
</td>
</tr>
{{/exams}}
</table>
<div class="btn-toolbar" role="toolbar">
<div class="btn-group" role="group">
<a href="?do=exams&action=add" class="btn btn-success">{{lang_addExam}}</a>
</div>
</div>
</div>
<div class="row" style="margin-top: 2em">
<div id="timeline"></div>
</div>
</div>
<script type="application/javascript"><!--
function customOrder(a, b) {
return 1000; // just in order of appeareance
}
document.addEventListener("DOMContentLoaded", function () {
var container = document.getElementById('timeline');
var groups_plain = {{{rooms_json}}};
var items_plain = {{{exams_json}}};
console.log(groups_plain);
console.log(items_plain);
var groups = new vis.DataSet(groups_plain);
var items = new vis.DataSet(items_plain);
var options = {
'start' : {{vis_begin}},
'end' : {{vis_end}},
'stack' : false,
'editable' : false,
'min' : {{vis_begin}},
'max' : {{vis_max_date}},
'order' : customOrder,
'moment' : function(date) { return vis.moment(date).utc(); }
};
var timeline = new vis.Timeline(container, items, groups, options);
}, false);
// --></script>
|