refactor: move results to own page
This commit is contained in:
1 parent
3f62e4e2d2
commit
ea7cef7f3b
4 files changed
+127
-112
No files matched your search
@@ -0,0 +1,62 @@
|
||||
{% extends "admin.html" %}
|
||||
{% block admin_content %}
|
||||
|
||||
<a class="button" href="{{ url_for('main.admin_export') }}">CSV exportieren</a>
|
||||
|
||||
<div class="stats">
|
||||
<div class="stat"><span class="stat-value">{{ stats.people }}</span><span class="stat-label">Teilnehmer</span></div>
|
||||
<div class="stat"><span class="stat-value">{{ stats.guesses }}</span><span class="stat-label">Bewertungen</span></div>
|
||||
<div class="stat">
|
||||
<span class="stat-value">{{ stats.quote ~ ' %' if stats.quote is not none else '–' }}</span>
|
||||
<span class="stat-label">Original gewählt</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if not rows %}
|
||||
<p class="empty">Noch keine Ergebnisse vorhanden.</p>
|
||||
{% else %}
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th><th>Gestartet</th>
|
||||
<th class="num">Bewertungen</th><th class="num">Original gewählt</th><th class="num">Quote</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in rows %}
|
||||
<tr>
|
||||
<td>{{ r.name }}</td>
|
||||
<td class="muted">{{ r.started }}</td>
|
||||
<td class="num">{{ r.total }}</td>
|
||||
<td class="num">{{ r.right }}</td>
|
||||
<td class="num">{{ r.quote }} %</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h3>Einzelergebnisse</h3>
|
||||
{% for r in rows %}
|
||||
<details class="person">
|
||||
<summary>{{ r.name }} <span class="muted">({{ r.right }}/{{ r.total }}, {{ r.started }})</span></summary>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead><tr><th>Song</th><th>Original gewählt</th><th>Wahl</th><th>Bearbeitung</th></tr></thead>
|
||||
<tbody>
|
||||
{% for g in r.guesses %}
|
||||
<tr>
|
||||
<td>{{ songs.get(g.song_id, g.song_id) }}</td>
|
||||
<td>{{ 'ja' if g.right else 'nein' }}</td>
|
||||
<td>{{ g.choice }}</td>
|
||||
<td>{{ g.edit }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user