-
Notifications
You must be signed in to change notification settings - Fork 0
/
student_list.html
231 lines (182 loc) · 10.4 KB
/
student_list.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Olympia</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- MetisMenu CSS -->
<link href="css/plugins/metisMenu/metisMenu.min.css" rel="stylesheet">
<!-- Google Font CSS -->
<link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic' rel='stylesheet' type='text/css'>
<!-- Custom CSS -->
<link href="css/sb-admin-2.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!--Parse JS-->
<script type="text/javascript" src="http://www.parsecdn.com/js/parse-1.3.4.min.js"></script>
<script src = "js/main.js" type = "text/javascript"></script>
<!--Login Verify -->
<script type = "text/javascript">
window.onload = verify();
</script>
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<!-- Title -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">OLYMPIA</a>
</div>
<!-- Portal Top Bar -->
<ul class="nav navbar-top-links navbar-right">
<!-- User Management -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
</li>
<li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>
</li>
<li class="divider"></li>
<li><a href="login.html"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
</li>
</ul>
<!-- /.dropdown-user -->
</li>
</ul>
<!-- Portal Side Bar -->
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li><a href="dashboard.html"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a></li>
<li>
<a href="#"><i class="fa fa-group fa-fw"></i> Student List<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="#">View</a></li>
<li><a href="#">Upload</a></li>
<li><a href="#">Export</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-book fa-fw"></i> Events<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="#">Add</a></li>
<li><a href="#">View</a></li>
<li><a href="#">Export PDF</a></li>
<li><a href="#">View Rulebook <i class="fa fa-external-link fa-fw"></i></a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> Scores<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="#">Add</a></li>
<li><a href="#">View</a></li>
<li><a href="#">Score Board <i class="fa fa-external-link fa-fw"></i></a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-arrows-h fa-fw"></i> Substitutions<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="#">Status</a></li>
<li><a href="#">Request</a></li>
<li><a href="#">Request Queue</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-key fa-fw"></i> Administration<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="#">New Account</a></li>
<li><a href="#">Manage Account</a></li>
<li><a href="#">Account List</a></li>
<li><a href="#">System Settings</a></li>
</ul>
</li>
</ul>
</div>
<!-- /.sidebar-collapse -->
</div>
<!-- /.navbar-static-side -->
</nav>
<!-- Page Content -->
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1 >Student List</h1>
<br />
<div id="dataTables-example_wrapper" class="dataTables_wrapper form-inline" role="grid"><div class="row"><div class="col-sm-6"><div class="dataTables_length" id="dataTables-example_length"><label></div></div></div><table class="table table-striped table-bordered table-hover dataTable no-footer" id="table" aria-describedby="dataTables-example_info">
<thead>
<tr role="row"><th class="sorting_asc" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column ascending" style="width: 225px;">Name</th><th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 314px;">Student Number</th><th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 278px;">Events</th><th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" style="width: 193px;">M/F </th><th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 141px;">Eligible</th></tr>
</thead>
<tbody>
<script type="text/javascript" src = "js/main.js"></script>
<script type = "text/javascript">
var user = Parse.User.current(),
grade = user.get('role');
var query = new Parse.Query("Student");
query.limit(1000);
query.equalTo('GR', grade);
query.find({
success: function(result) {
for(var i = 0; i < result.length; i++){
student = result[i];
var table = document.getElementById('table').getElementsByTagName('tbody')[0];
var row = table.insertRow(i);
row.id = student.get('ID');
row.onclick = function(){
window.location = "student_view.html?student=" + this.id;
}
row.style.cursor = "pointer";
var firstName = row.insertCell(0);
firstName.innerHTML = student.get('firstName') + " " + student.get('lastName');
var num = row.insertCell(1);
num.innerHTML = student.get("ID");
var events = row.insertCell(2);
events.innerHTML = (student.get("events") == undefined) ? "None" : student.get("events")[0];
var gender = row.insertCell(3);
gender.innerHTML = student.get("Gen");
var eligible = row.insertCell(4);
eligible.innerHTML = "Yes";
}
},
error: function(error) {
alert(error);
}
});
</script>
</tbody>
</table>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="js/plugins/metisMenu/metisMenu.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="js/sb-admin-2.js"></script>
</body>
</html>