students.html
4.64 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
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
<!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">
${len(tags['finished'])} Terminado(s)</span>
</div>
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th>Número</th>
<th>Nome</th>
<th>Login</th>
<th>Logout</th>
<th>Nota</th>
</tr>
</thead>
<tbody>
% for r in grades:
<tr>
% if r[0] in tags['finished']:
<td>${r[0]}</td> <!-- numero -->
<td>${r[1]}</td> <!-- nome -->
<td>${r[3][:19]}</td>
<td>${r[4][:19]}</td>
<td>${r[2]}</td>
% endif
</tr>
% endfor
</tbody>
</table>
</div>
</div>
<div class="panel panel-success drop-shadow">
<div class="panel-heading">
${len(tags['online'])} Activo(s)</span>
</div>
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th>Número</th>
<th>Nome</th>
<!-- <th>Login</th> -->
</tr>
</thead>
<tbody>
% for r in students:
<tr>
% if r[0] in tags['online']:
<td>${r[0]}</td> <!-- numero -->
<td>${r[1]}</td> <!-- nome -->
% endif
</tr>
% endfor
</tbody>
</table>
</div>
</div>
<div class="panel panel-danger drop-shadow">
<div class="panel-heading">
${len(students)-len(tags['online'])} Inactivo(s)</span>
</div>
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th>Número</th>
<th>Nome</th>
<th>Password</th>
</tr>
</thead>
<tbody>
% for r in students:
<tr>
% if r[0] not in tags['online']:
<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 -->
% endif
</tr>
% endfor
</tbody>
</table>
</div>
</div>
</div> <!-- container -->
</body>
</html>