students.html
2.92 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> List of students </title>
<link rel="icon" href="favicon.ico">
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-theme.min.css"> <!-- optional -->
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<style>
/* Fixes navigation panel overlaying content */
body {
padding-top: 80px;
background: #aaa;
}
.drop-shadow {
-webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .5);
box-shadow: 0px 2px 10px 3px rgba(0, 0, 0, .2);
border-radius:5px;
}
</style>
</head>
<!-- ===================================================================== -->
<body>
<div class="container">
<div class="panel panel-default drop-shadow">
<div class="panel-heading">
<span class="badge">${len(tags['online'])} online</span> <span class="badge">${len(tags['finished'])} finished</span>
</div>
<!-- <div class="panel-body"> -->
<table class="table">
<thead>
<tr>
<th>Tags</th>
<th>Número</th>
<th>Nome</th>
<th>Password</th>
</tr>
</thead>
<tbody>
% for r in students:
<tr>
<td>
% if r[0] in tags['online']:
<span class="label label-primary">online</span>
% endif
% if r[0] in tags['finished']:
<span class="label label-success">finished</span>
% endif
</td>
<td>${r[0]}</td> <!-- numero -->
<td>${r[1]}</td> <!-- nome -->
<td class="col-sm-3">
<form action="/students/" method="post" id="${r[0]}">
<div class="input-group">
<input type="password" class="form-control" placeholder="${r[2][:8]}" name="${r[0]}">
<span class="input-group-btn">
<button form="${r[0]}" type="submit" value="submit" class="btn btn-danger">reset</button>
</span>
</div><!-- /input-group -->
</form>
</td> <!-- password -->
</tr>
% endfor
</tbody>
</table>
</div> <!-- panel -->
</div> <!-- container -->
</body>
</html>