-
Notifications
You must be signed in to change notification settings - Fork 2
/
statistics.html
153 lines (148 loc) · 4.38 KB
/
statistics.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
{% extends "base.html" %}
{% block main_content %}
<!-- User statics -->
<div class="row">
<div class="col-md-10 offset-md-1">
<div class="card mb-3">
<div class="card-header">
<i class="fa fa-table"></i>
Score for user {{ user_name | title }}</div>
<div class="card-body">
{% if finished_games %}
<div class="table-responsive">
<table class="table table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th>User / Profile</th>
<th>Questions</th>
<th class="text-green">Correct</th>
<th class="text-red">Wrong</th>
<th class="text-yellow">Skipped</th>
<th class="text-red">Deleted</th>
<th>Categories</th>
<th>Mod</th>
<th>Tries Left</th>
<th>Started with</th>
</tr>
</thead>
<tfoot>
<tr>
<th>User / Profile</th>
<th>Questions</th>
<th class="text-green">Correct</th>
<th class="text-red">Wrong</th>
<th class="text-yellow">Skipped</th>
<th class="text-red">Deleted</th>
<th>Categories</th>
<th>Mod</th>
<th>Tries Left</th>
<th>Started with</th>
</tr>
</tfoot>
<tbody>
{% for profile in finished_games %}
<tr>
<td>{{ profile.id | title }} / {{ profile.player_name | title }}</td>
<td>{{ profile.questions_in_total }}</td>
<td>{{ profile.right_answers }}</td>
<td>{{ profile.wrong_answers }}</td>
<td>{{ profile.skipped_questions }}</td>
<td>{{ profile.deleted_questions }}</td>
<td>{{ profile.categories | title }}</td>
{% if profile.mods == 'endless' %}
<td class="text-green">{{ profile.mods | title }}</td>
<td>N/A</td>
<td>N/A</td>
{% else %}
<td class="text-red">{{ profile.mods | title }}</td>
<td>{{ profile.tries }}</td>
<td>{{ profile.tries_in_total }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<h3 class="text-center"> No score to show</h3>
<br>
<div class="row justify-content-center">
<a href="/{{user_name}}/riddle-g-setting" class="btn btn-success">Play the game</a>
</div>
{% endif %}
</div>
</div>
</div>
</div>
<!-- Top 10 -->
<div class="row">
<div class="col-md-10 offset-md-1">
<div class="card mb-3">
<div class="card-header">
<i class="fa fa-table"></i>
Top 10</div>
<div class="card-body">
{% if statistics %}
<div class="table-responsive">
<table class="table table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th>User / Profile</th>
<th>Questions</th>
<th class="text-green">Correct</th>
<th class="text-red">Wrong</th>
<th class="text-yellow">Skipped</th>
<th class="text-red">Deleted</th>
<th>Categories</th>
<th>Mod</th>
<th>Tries Left</th>
<th>Started with</th>
</tr>
</thead>
<tfoot>
<tr>
<th>User / Profile</th>
<th>Questions</th>
<th class="text-green">Correct</th>
<th class="text-red">Wrong</th>
<th class="text-yellow">Skipped</th>
<th class="text-red">Deleted</th>
<th>Categories</th>
<th>Mod</th>
<th>Tries Left</th>
<th>Started with</th>
</tr>
</tfoot>
<tbody>
{% for profile in statistics %}
<tr>
<td>{{ profile.id | title }} / {{ profile.player_name | title }}</td>
<td>{{ profile.questions_in_total }}</td>
<td>{{ profile.right_answers }}</td>
<td>{{ profile.wrong_answers }}</td>
<td>{{ profile.skipped_questions }}</td>
<td>{{ profile.deleted_questions }}</td>
<td>{{ profile.categories | title }}</td>
{% if profile.mods == 'endless' %}
<td class="text-green">{{ profile.mods | title }}</td>
<td>N/A</td>
<td>N/A</td>
{% else %}
<td class="text-red">{{ profile.mods | title }}</td>
<td>{{ profile.tries }}</td>
<td>{{ profile.tries_in_total }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<h3 class="text-center"> No statistics to show</h3>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock main_content %}
{% block alert_box %}{% endblock alert_box %}