mirror of
https://github.com/godotengine/godot-showreel-voting.git
synced 2025-12-31 17:49:06 +03:00
* added link to video in admin view, truncated titles that are too long * added total vote counts to admin page, removed pagination on admin page * Track skipped videos in DB * suggest skipped videos if no others left
39 lines
1.1 KiB
HTML
39 lines
1.1 KiB
HTML
<style>
|
|
.entries {
|
|
margin-top: 20px;
|
|
display: grid;
|
|
gap: 20px;
|
|
@media (min-width: 768px) {
|
|
grid-template-columns: 1fr 1fr 1fr;
|
|
}
|
|
}
|
|
.entry {
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
}
|
|
</style>
|
|
<main id="admin">
|
|
<h1 style="margin-bottom: 20px;">Vote results</h1>
|
|
<div>
|
|
<p>Total votes: <strong>{{ total_votes }}</strong></p>
|
|
<p>Positive votes: <strong>{{ positive_votes }}</strong></p>
|
|
<p>Negative votes: <strong>{{ total_votes - positive_votes }}</strong></p>
|
|
</div>
|
|
<br>
|
|
<form action="{{ url_for('votes.download_vote_results') }}" method="get" style="display:inline;">
|
|
<button type="submit" class="button primary small">Download results .csv</button>
|
|
</form>
|
|
<div>
|
|
<div class="entries">
|
|
{% for entry in vote_tally %}
|
|
<div class="entry panel padded">
|
|
<h2><a href="{{ url_for('votes.video_view', video_id=entry[0].id) }}">{{ entry[0].game }}</a></h2>
|
|
<p>Category: <strong>{{ entry[0].showreel.title }}</strong></p>
|
|
<p>Author: <strong>{{ entry[0].author_name }}</strong></p>
|
|
<p>Vote sum: <strong>{{ entry[1] }}</strong></p>
|
|
<p>Votes received: <strong>{{ entry[2] }}</strong></p>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</main> |