summaryrefslogtreecommitdiffstats
path: root/modules-available/exams/templates/page-exams.html
diff options
context:
space:
mode:
authorChristian Klinger2016-06-15 13:04:15 +0200
committerChristian Klinger2016-06-15 13:04:15 +0200
commita0139c37aaafa845157335627ece7a5a88f4085f (patch)
treeed4319e1651533e1dcb2bb014e77caceb5aae762 /modules-available/exams/templates/page-exams.html
parentAdded date and time pickers. (diff)
downloadslx-admin-a0139c37aaafa845157335627ece7a5a88f4085f.tar.gz
slx-admin-a0139c37aaafa845157335627ece7a5a88f4085f.tar.xz
slx-admin-a0139c37aaafa845157335627ece7a5a88f4085f.zip
First version of a visualization.
Diffstat (limited to 'modules-available/exams/templates/page-exams.html')
-rw-r--r--modules-available/exams/templates/page-exams.html101
1 files changed, 73 insertions, 28 deletions
diff --git a/modules-available/exams/templates/page-exams.html b/modules-available/exams/templates/page-exams.html
index 6c67fa2c..8758b408 100644
--- a/modules-available/exams/templates/page-exams.html
+++ b/modules-available/exams/templates/page-exams.html
@@ -1,32 +1,77 @@
+<div class="container-fluid">
+ <h1>All Exams</h1>
-<h1>All Exams</h1>
-
-<table class="table">
- <tr>
- <th>ID</th>
- <th>Location</th>
- <th>Begin</th>
- <th>End</th>
- <th>Actions</th>
- </tr>
- {{#exams}}
+ <table class="table">
<tr>
- <td>{{examid}}</td>
- <td>
- <a href="?do=baseconfig&module=locations&locationid={{locationid}}"> {{locationname}} </a>
- </td>
- <td>{{starttime}}</td>
- <td>{{endtime}}</td>
- <td>
- <form method="POST" action="?do=exams&action=delete"
- onsubmit="return confirm('delete really?');">
- <input type="hidden" name="token" value="{{token}}"/>
- <input type="hidden" name="examid" value="{{examid}}"/>
- <input type="submit" value="Delete" class="btn btn-sm" />
- </form>
- </td>
+ <th>ID</th>
+ <th>Location</th>
+ <th>Begin</th>
+ <th>End</th>
+ <th>Actions</th>
</tr>
- {{/exams}}
+ {{#exams}}
+ <tr>
+ <td>{{examid}}</td>
+ <td>
+ <a href="?do=baseconfig&module=locations&locationid={{locationid}}"> {{locationname}} </a>
+ </td>
+ <td>{{starttime}}</td>
+ <td>{{endtime}}</td>
+ <td>
+ <form method="POST" action="?do=exams&action=delete"
+ onsubmit="return confirm('delete really?');">
+ <input type="hidden" name="token" value="{{token}}"/>
+ <input type="hidden" name="examid" value="{{examid}}"/>
+ <input type="submit" value="Delete" class="btn btn-sm" />
+ </form>
+ </td>
+ </tr>
+ {{/exams}}
-</table>
-<a href="?do=exams&action=add" class="btn btn-success">Add Exam </a>
+ </table>
+ <a href="?do=exams&action=add" class="btn btn-success">Add Exam </a>
+
+ <div id="timeline"> </div>
+
+</div>
+<script type="application/javascript"><!--
+
+
+function customOrder(a, b) {
+ console.log("a is ");
+ console.log(a);
+ console.log("b is ");
+ console.log(b);
+ return 1000;
+}
+
+document.addEventListener("DOMContentLoaded", function () {
+ var container = document.getElementById('timeline');
+ var groups_plain = JSON.parse('{{{rooms_json}}}');
+ var items_plain = JSON.parse('{{{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 groups = new vis.DataSet([
+ // { id: 1, content:'RZ -101' },
+ // { id: 2, content:'RZ -104' }
+ // ]);
+ // var items = new vis.DataSet([
+ // { id: 1, group: 1, content: 'Bio 1', start: '2016-06-15 10:30', end : '2016-06-15 14:45'},
+ // { id: 2, group: 1, content: 'Bio 2', start: '2016-06-15 10:45', end : '2016-06-15 15:00'},
+ // { id: 3, group: 2, content: 'Englisch', start: '2016-06-15 16:00', end : '2016-06-15 17:15'},
+ // { id: 4, group: 1, content: 'BACKGROUND', start: '2016-06-15-11:00', end: '2016-06-15 18:00', type: 'background'}
+ // ]);
+
+ var options = {
+ 'start' : '{{{vis_begin}}}',
+ 'end' : '{{{vis_end}}}',
+ 'stack' : false,
+ 'order' : customOrder
+ };
+
+ var timeline = new vis.Timeline(container, items, groups, options);
+}, false);
+
+// --></script>