Added a new UI feature which now shows all of the event results (once decrypted) in a basic but easy to read table which can be enhanced at a later point
This commit is contained in:
parent
0ff10474c4
commit
33398b9993
8 changed files with 79 additions and 25 deletions
28
allauthdemo/templates/polls/event_results.html
Normal file
28
allauthdemo/templates/polls/event_results.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
{% extends "polls/event_detail_base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block event_nav_results %}active{% endblock %}
|
||||
{% block event_content %}
|
||||
{% for poll_result in event_results %}
|
||||
<div class="form-group">
|
||||
<h3 class="marginTopResultTable">{{ poll_result.name }}</h3>
|
||||
<table id="results-table-{{ forloop.counter }}" class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="resultsCol text-center">Option</th>
|
||||
<th class="resultsCol text-center">Votes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for option in poll_result.options %}
|
||||
<tr>
|
||||
<td class="resultsCol text-center">{{ option.option }}</td>
|
||||
<td class="resultsCol text-center">{{ option.votes }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
Reference in a new issue