paiji2_survey/templates/paiji2_survey/poll_list.html
{% extends "home/layout_three_columns.html" %}
{% load i18n %}
{% load survey %}
{% load bootstrap3 %}
{% block title %}
{% trans 'Previous surveys' %}
{% endblock %}
{% block content %}
<div class="well">
<div class="pagination-container">
{% bootstrap_pagination page_obj %}
</div>
{% for poll in polls %}
<h3>{{ poll }}</h3>
<div class="row">
<div class="col-md-6">
{% display_poll_chart poll=poll choices='choices' %}
</div>
<div class="col-md-6">
<h4>{{ _('Results')|title }}</h4>
<ul class="list-group">
{% for choice in choices|dictsortreversed:'nb_votes' %}
<li class="list-group-item">
<span class="badge">{{ choice.nb_votes }}</span>
{{ choice|safe }}
</li>
{% endfor %}
</ul>
</div>
</div>
{% if not forloop.last %}
<hr />
{% endif %}
{% endfor %}
<div class="pagination-container">
{% bootstrap_pagination page_obj %}
</div>
</div>
{% endblock %}