-
Notifications
You must be signed in to change notification settings - Fork 3
/
admin.html
118 lines (109 loc) · 3.71 KB
/
admin.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Linguistics Department Workstations</title>
<link rel="stylesheet" type="text/css" href="static/site.css" media="all" />
<script src="static/lib/underscore.min.js"></script>
<script src="static/lib/angular.min.js"></script>
<script src="static/lib/ngStorage.min.js"></script>
<script src="static/lib/url.js"></script>
<script src="static/app.js"></script>
</head>
<body ng-app="app" ng-controller="AdminCtrl" class="admin">
<header>
<table>
<tr>
<td>Format:</td>
<td>
<select ng-model="$storage.contact_format">
<option value="name">name</option>
<option value="email">email</option>
<option value="both">"name" <email>,</option>
<option value="workstation">name (workstation)</option>
</select>
</td>
</tr>
<tr>
<td>Number of workstations:</td>
<td><input ng-model="$storage.nworkstations" /></td>
</tr>
</table>
</header>
<section ng-if="all">
<header>
<h3>All students</h3>
<p>all active students</p>
</header>
<!-- <students ng-model="" where="{}" /> -->
<contacts ng-model="students"></contacts>
</section>
<section>
<header>
<h3>Incumbents</h3>
<p>all students with a workstation</p>
</header>
<contacts ng-model="students" where="{incumbent:true}" format="$storage.contact_format"></contacts>
</section>
<section>
<header>
<h3>Privileged</h3>
<p>students who need workstations</p>
</header>
<textarea separator="'\n'" ng-model="$storage.privileged" style="height: 400px" placeholder="One full name per line"></textarea>
<div ng-show="privileged_missing">
<p>names that don't match any of the existing students in <code>people.tsv</code></p>
<ul>
<li ng-repeat="name in privileged_missing track by $index">{{name}}</li>
</ul>
</div>
</section>
<section>
<h3>➔</h3>
</section>
<section>
<header>
<h3>Residents</h3>
<p>will stay in their current place</p>
</header>
<contacts ng-model="students" where="{resident:true}" format="$storage.contact_format"></contacts>
<!-- <h3>Itinerants</h3>
<p>may need to move out</p>
<contacts ng-model="students" where="{itinerant:true}" format="$storage.contact_format"></contacts> -->
</section>
<section>
<header>
<h3>Homeless</h3>
<p>unprivileged (must apply for workstations)</p>
</header>
<contacts ng-model="students" where="{homeless:true}" format="$storage.contact_format"></contacts>
<h3>Winners</h3>
<p>{{$storage.nworkstations}} workstations - {{$storage.privileged.length}} privileged =
space for {{$storage.nworkstations - $storage.privileged.length}} winner(s).</p>
<textarea separator="'\n'" ng-model="$storage.winners" style="height: 100px"></textarea>
<div ng-show="winners_missing">
<p>names that don't match up</p>
<ul>
<li ng-repeat="name in winners_missing track by $index">{{name}}</li>
</ul>
</div>
</section>
<section>
<header>
<h3>Evictions</h3>
<p>need to move out (were not awarded workstation via application)</p>
</header>
<contacts ng-model="students" where="{itinerant:true,winner:false}" format="$storage.contact_format"></contacts>
<h3>Incoming</h3>
<p>moving in</p>
<contacts ng-model="students" where="{incoming:true}" format="$storage.contact_format"></contacts>
</section>
<footer>
<h5>
<a ng-href="?privileged={{$storage.privileged.join('\n') | encode}}&winners={{$storage.winners.join('\n') | encode}}">
Link to current values
</a>
</h5>
</footer>
</body>
</html>