
{% load i18n %}


<div class="panel panel-default-dark">
    <div class="panel-heading">
        <h3 class="panel-title pull-left">
            {{ poll.question }}
        </h3>
        {% if not is_poll_voted %}
            <a href="#poll-form" aria-controls="poll-form" role="tab" data-toggle="tab"
               class="btn btn-default btn-xs pull-right">
                <i class="fa fa-remove"></i>
            </a>
        {% endif %}
    </div>
    <div class="panel-body">
        {% for choice in poll.choices.all %}
            <h3 class="heading-xs">
                {{ choice.value }} - {{ choice.votes }} ({{ choice.percent }}%)
            </h3>
            <div class="progress progress-sm">
                <div class="progress-bar progress-bar-blue" role="progressbar"
                     aria-valuenow="{{ choice.percent }}" aria-valuemin="0" aria-valuemax="100"
                     style="width: {{ choice.percent }}%">
                </div>
            </div>
        {% endfor %}
    </div>
    <div class="panel-footer text-center">
        {% trans 'Total votes' %}: {{ poll.votes }}
    </div>
</div>
