-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
176 lines (152 loc) · 5.92 KB
/
index.html
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Backbone Routing</title>
<link type="text/css" rel="stylesheet" href="/marco/smarthome/css/style.css"/><!--Change URL to your root-->
<!-- Bootstrap core CSS -->
<link href="/marco/smarthome/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<section class="col-sm-12">
<center>
<h1 class="page-header">The info</h1>
</center>
<div id="container">
<section class="col-sm-4">
<h2 class="page-header">Users</h2>
<div id="userinfo">
<a class="btn btn-default" href="#" data-id="1" >Tim</a>
<a class="btn btn-default" href="#" data-id="2" >Marco</a>
<a class="btn btn-default" href="#" data-id="3" >Andreas</a>
<a class="btn btn-default" href="#" data-id="4" >Amber</a>
</div>
</section>
<section class="col-sm-4">
<h2 class="page-header">Networks</h2>
<div id="networkinfo">
<a class="btn btn-default" href="#" data-id="1" >TimLand</a>
<a class="btn btn-default" href="#" data-id="2" >CastleMarco</a>
<a class="btn btn-default" href="#" data-id="3" >HuislijkHuis</a>
<a class="btn btn-default" href="#" data-id="4" >Hogeschool Rotterdam</a>
</div>
</section>
<section class="col-sm-4">
<h2 class="page-header">Crownstones</h2>
<div id="crownstoneinfo">
<a class="btn btn-default" href="#" data-id="1" >Testding</a>
<a class="btn btn-default" href="#" data-id="2" >WoonkamerLamp</a>
<a class="btn btn-default" href="#" data-id="3" >Televisie</a>
<a class="btn btn-default" href="#" data-id="4" >Radio</a>
</div>
</section>
</section>
<section>
<div id="InfoBlock">
</div>
</section>
<div id="team-matches">
<!-- create error template -->
<script id="template-error" type="text/template">
</script>
<!-- create matches template -->
<script id="template-crownstones" type="text/template">
<table class="table table-striped">
<thead>
<tr>
<th>Crownstone Name</th>
<th>Network Name</th>
<th>Network URL</th>
</tr>
</thead>
<tbody>
<% _.each( rc.models, function( listItem ){%>
<tr>
<td><%= listItem.attributes.name %></td>
<td><%= listItem.attributes.network.name %></td>
<td><a href="<%= listItem.attributes.network.url %>"><%= listItem.attributes.network.url %><a/></td>
</tr>
<%});%>
</tbody>
</table>
</script>
<script id="template-users" type="text/template">
<table class="table table-striped">
<thead>
<tr>
<th>Username</th>
<th>action</th>
<th>time pref</th>
<th>date pref</th>
</tr>
</thead>
<tbody>
<% _.each( rc.models, function( listItem ){%>
<td><%= listItem.attributes.name %></td>
<td>
<ul>
<% _.each( listItem.attributes.prefs, function( prefItem ){%>
<li><%= prefItem.action %></li>
<%});%>
</ul>
</td>
<td>
<ul>
<% _.each( listItem.attributes.prefs, function( prefItem ){%>
<li><%= prefItem.time %></li>
<%});%>
</ul>
</td>
<td>
<ul>
<% _.each( listItem.attributes.prefs, function( prefItem ){%>
<li><%= prefItem.date %></li>
<%});%>
</ul>
</td>
</tr>
<%});%>
</tbody>
</table>
</script>
<script id="template-networks" type="text/template">
<table class="table table-striped">
<thead>
<tr>
<th>username</th>
<th>email</th>
<th>PhoneId</th>
<th>Role</th>
<th>Linked CrownStones</th>
</tr>
</thead>
<tbody>
<% _.each( rc.models, function( listItem ){%>
<tr>
<td><%= listItem.attributes.name %></td>
<td>
<ul><% _.each( listItem.attributes.users, function( user ){%>
<li><%= user.email %></li>
<%});%></ul></td>
<td><ul>
<% _.each( listItem.attributes.users, function( user ){%>
<li><%= user.phoneId %></li>
<%});%>
</ul></td>
<td>
<ul><% _.each( listItem.attributes.users, function( user ){%>
<li><%= user.role %></li>
<%});%></ul></td>
<td>
<%= listItem.attributes.crownstones.length %></td>
</tr>
<%});%>
</tbody>
</table>
</script>
</div>
</div>
<script src="/marco/smarthome/dist/bundle.js" type="text/javascript"></script><!--Change URL to your root-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</body>
</html>