-
Notifications
You must be signed in to change notification settings - Fork 1
/
console_groups.html
404 lines (372 loc) · 17.5 KB
/
console_groups.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
<!DOCTYPE html>
<html ng-app="myApp" lang="en">
<head>
<meta charset="utf-8">
<title>K-Sketch: The Kinetic Sketch Pad!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Google Analytics Code -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40422359-1', 'k-sketch-test.appspot.com');
ga('send', 'pageview');
</script>
<!-- Le styles -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<!-- Additional styles for individual components -->
<link href="css/additional.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="ico/favicon.png">
<!-- Code for K-Sketch App Plugin -->
<!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
<!-- BEGIN Browser History required section -->
<link rel="stylesheet" type="text/css" href="history/history.css" />
<script type="text/javascript" src="history/history.js"></script>
<!-- END Browser History required section -->
<script type="text/javascript" src="swf/swfobject.js"></script>
<script type="text/javascript" src="js/janrain/janrain_widget.js"></script>
<script type="text/javascript">
function view_sketch(id, version){
sg_upload = window.open("/app/view.html?id=" + id + "&version=" + version, "_blank");
sg_upload.focus();
}
function edit_sketch(id, version){
sg_upload = window.open("/app/sketch.html?id=" + id + "&version=" + version, "_blank");
sg_upload.focus();
}
function delete_sketch(id) {
if (parseInt(id) !== 'NaN') {
e = document.getElementById('testdiv');
scope = angular.element(e).scope();
scope.$apply(function() {
scope.delete_sketch(id);
});
}
}
</script>
</head>
<!-- body id="ksketchapp" ng-controller="LoginController" scrolling="no" -->
<body ng-controller="ConsoleController" id="ksketchapp" scrolling="no">
<!-- Loading -->
<div id="LoadingDiv" ui-if="waiting!='Ready'"></div>
<div class="modal" id="Loading" ui-if="waiting=='Loading'">
<div class="modal-body">
<span>Loading........</span>
</div>
</div>
<div class="modal" id="Loading" ui-if="waiting=='Saving'" ng-cloak>
<div class="modal-body">
<span>Saving........</span>
</div>
</div>
<div class="modal" id="Loading" ui-if="waiting=='Deleting'" ng-cloak>
<div class="modal-body">
<span>Deleting........</span>
</div>
</div>
<div class="modal" id="Message" ui-if="waiting=='Error'" ng-cloak>
<div class="modal-body">
<div class="modal-header">
<input type="submit" class="close" value="x" data-dismiss="modal" ng-click="acknowledge()"/>
<h3 id="myUploadItems">{{heading}}</h3>
</div>
<br/>
<div class="control-group">
<div class="control-label">
<span style="text-align:center">{{message}}</span>
<br/>
<br/>
<span style="text-align:center">{{submessage}}</span>
<br/>
<br/>
</div>
</div>
</div>
<div class="modal-footer">
<input type="submit" ng-click="acknowledge()" value="Ok" data-dismiss="modal"/>
</div>
</div>
<!-- Top Bar -->
<div id="topbar" class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid" ng-show="waiting=='Ready'" ng-cloak>
<!-- a class="brand" id="logo" href="#"><img style="height:36px" src="ico/KSketch-logo.png"></a -->
<a class="brand" id="logo" href=" index.html" title="Return to K-Sketch">K-Sketch</a>
<ul class="nav" ng-cloak>
<li>
<!--Username and profile link goes here.-->
<a ng-show="User.u_login" ng-cloak href="profile.html?id={{User.id}}" class="navbar-link">
<span id="heading">
Hello, {{User.u_name}}
<span ui-if="User.u_isadmin"> (Admin)</span>
!
</span>
</a>
<a ng-hide="User.u_login" ng-cloak id="heading" disabled>Hello, {{User.u_name}}!</a>
</li>
<li ng-hide="User.u_login" ng-cloak>
<a class="janrainEngage" href="#">Sign-In</a>
</li>
<li ng-show="User.u_login" ng-cloak>
<a href="/user/logout">Logout</a>
</li>
</ul>
<ul class="nav pull-right">
<li>
<a><span style="font-weight:bold">Administrator Console</span></a>
</li>
</ul>
</div>
</div>
</div>
<!-- Main Body -->
<div class="container-fluid" id="wrap">
<div class="row-fluid" id="mainbody">
<!-- Navigation Sidebar (Access separate panes). -->
<div class="span2">
<div class="well sidebar-nav sidebar-nav-fixed">
<ul class="nav nav-list">
<!--This changes depending on current logged-in status.-->
<li id="sc" ng-show="User.u_login" ng-cloak><a href="console_versions.html">Manage Versions</a></li>
<li class="active" id="cs" ng-show="User.u_login" ng-cloak><a>Manage Groups</a></li>
<li id="vs" ng-show="User.u_login" ng-cloak><a href="console_users.html">Manage Users</a></li>
</ul>
</div><!--/.well -->
</div><!--/span-->
<!-- Main Body -->
<div class="span10">
<span id="testdiv" ng-model="test"></span>
<!-- Manage Groups Pane -->
<div class="row-fluid" id="ManageGroups" ng-cloak>
<div class="container-fluid">
<div class="row-fluid" id="mainbody">
<div class="tabbable">
<div class="row-fluid">
<div class="span8">
<h3 id="Login">Admin Console - Manage Groups</h3>
</div>
<div class="span4">
<ul class="nav nav-pills" style="float:right">
<li class="active">
<a href="#CreateGroups" data-toggle="tab">Create New Group</a>
</li>
<li>
<a href="#ManageGroups" data-toggle="tab">Manage Existing Groups</a>
</li>
</ul>
</div>
</div>
<div class="tab-content" id="group-tabs">
<!-- Create Groups Sub-Pane -->
<div class="tab-pane active" id="CreateGroups">
<div class="row-fluid">
<table class="table">
<tr>
<td>
<span style="font-weight:bold">
Create New Group:
</span>
</td>
<td>
<input ng-model="new_group"/>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
<span style="font-weight:bold">
Add Member
</span>
</td>
<td>
<select ng-model="ungroupeduser" ng-options="alluserfound as alluserfound.u_name for alluserfound in allusersfound.entities" ng-cloak>
<option value="{'id': -1}">*Select a user to add*</option>
</select>
</td>
<td>
<input type="submit" class="button btn-success btn-small" ng-click="adduser(ungroupeduser)" value="Add >"/>
<br>
</td>
<td style="width:30%">
<ul ng-repeat="groupeduserfound in groupedusers">
<li>
{{groupeduserfound.u_name}}
<input type="submit" class="button btn-danger btn-small" ng-click="removeuser(groupeduserfound)" value="X"/>
</li>
</ul>
</td>
</tr>
<tr ui-if="!!groupedusers.length">
<td>
<span style="font-weight:bold">
Assign Group Leader
</span>
</td>
<td>
<select ng-model="group_leader" ng-options="groupeduserfound as groupeduserfound.u_name for groupeduserfound in groupedusers" ng-cloak>
<option value="{'id': -1}">*Select the group leader*</option>
</select>
</td>
<td>
Group Leader: {{group_leader.u_name}}
</td>
</tr>
<tr ui-if="!!verify()">
<td>
<input type="submit" class="button btn-success btn-large" value="Submit"/>
<input type="submit" class="button btn-inverse btn-large" value="Cancel"/>
</td>
</tr>
</table>
</div>
</div>
<!-- Manage Groups Sub-Pane -->
<div class="tab-pane" id="ManageGroups">
<div class="row-fluid">
<div class="row-fluid">
<div class="span10">
<table class="table table-bordered table-striped"ng-cloak>
<thead>
<th>
Version
</th>
<th>
No. of Users
</th>
<th>
No. of Original Sketches
</th>
<th>
No. of Non-Original (Edited) Sketches
</th>
</thead>
<tbody ui-if="versionsfound.entities.length" ng-cloak>
<tr ng-repeat="versions in versionsfound.entities">
<td>
{{versions.app_version.toFixed(1)}}
</td>
<td>
{{versions.user_count}}
</td>
<td>
{{versions.original_count}}
</td>
<td>
{{(versions.sketch_count - versions.original_count)}}
</td>
</tr>
<tr>
<td>
<span style="font-weight:bold">{{versionsfound.total.app_version}}
</span>
</td>
<td>
<span style="font-weight:bold">{{versionsfound.total.user_count}}
</span>
</td>
<td>
<span style="font-weight:bold">{{versionsfound.total.original_count}}
</span>
</td>
<td>
<span style="font-weight:bold">{{versionsfound.total.sketch_count - versionsfound.total.original_count}}
</span>
</td>
</tr>
</tbody>
</table>
</div>
<div class="span2">
<button class="btn btn-success btn-large" title="Refreshes version information" ng-click="versionlist()">Refresh</button>
</div>
</div>
<br>
<div class="row-fluid">
<h4>Assign Version to Group</h4>
<div class="span4">
<table class="table">
<tr>
<td>
<span style="font-weight:bold">
Version:</span>
</td>
<td>
<select ng-model="selectedversion" ng-options="versionfound.app_version as versionfound.app_version.toFixed(1) for versionfound in versionsfound.entities" ng-cloak></select>
</td>
</tr>
</table>
</div>
<div class="span7">
<table class="table">
<tr>
<td>
<span style="font-weight:bold">
Group of Users:
</span>
</td>
<td>
<textarea style="width: 200px; height: 112px;" disabled></textarea>
</td>
<td>
<button class="btn btn-success btn-large disabled" title="">Confirm</button>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<footer>
<p>This page requires JavaScript and Adobe Flash Player, and is optimized for Mozilla Firefox and Google Chrome. © Richard C. Davis 2013</p>
</footer>
</div><!--/.fluid-container-->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/d3/d3.v2.js"></script>
<script src="js/jquery/jquery.js"></script>
<script src="js/moment/moment.min.js"></script>
<script src="lib/angular/angular.min.js"></script>
<script src="lib/angular/angular-ui.min.js"></script>
<script src="lib/angular/angular-resource.min.js"></script>
<script src="js/angular/console-controller.js"></script>
<script src="js/app.js"></script>
<script src="js/bootbox/bootbox.min.js"></script>
<script src="js/bootstrap/bootstrap-transition.js"></script>
<script src="js/bootstrap/bootstrap-alert.js"></script>
<script src="js/bootstrap/bootstrap-modal.js"></script>
<script src="js/bootstrap/bootstrap-dropdown.js"></script>
<script src="js/bootstrap/bootstrap-scrollspy.js"></script>
<script src="js/bootstrap/bootstrap-tab.js"></script>
<script src="js/bootstrap/bootstrap-tooltip.js"></script>
<script src="js/bootstrap/bootstrap-popover.js"></script>
<script src="js/bootstrap/bootstrap-button.js"></script>
<script src="js/bootstrap/bootstrap-collapse.js"></script>
<script src="js/bootstrap/bootstrap-carousel.js"></script>
<script src="js/bootstrap/bootstrap-typeahead.js"></script>
</body>
</html>