|
@@ -0,0 +1,82 @@
|
|
|
+{% load i18n %}
|
|
|
+<div class="panel-body">
|
|
|
+ <h2>{{ poll.question }}</h2>
|
|
|
+ {% include "misago/poll/info.html" %}
|
|
|
+
|
|
|
+ <ul class="list-unstyled poll-choices-bars">
|
|
|
+ {% for choice in poll.view_choices %}
|
|
|
+ <li>
|
|
|
+ <ul class="list-unstyled list-inline poll-chart">
|
|
|
+ <li class="poll-char-label">
|
|
|
+ <strong>{{ choice.label }}</strong>
|
|
|
+ </li>
|
|
|
+ <li class="poll-chart-votes">
|
|
|
+ {% blocktrans trimmed count votes=choice.votes with proc=choice.proc %}
|
|
|
+ {{ votes }} vote, {{ proc }}% of total.
|
|
|
+ {% plural %}
|
|
|
+ {{ votes }} votes, {{ proc }}% of total.
|
|
|
+ {% endblocktrans %}
|
|
|
+ </li>
|
|
|
+ {% if choice.selected %}
|
|
|
+ <li class="poll-chart-selected">
|
|
|
+ <span class="material-icon">
|
|
|
+ check_circle
|
|
|
+ </span> {% trans "Your choice." %}
|
|
|
+ </li>
|
|
|
+ {% endif %}
|
|
|
+ </ul>
|
|
|
+ <div class="progress">
|
|
|
+ <div
|
|
|
+ class="progress-bar"
|
|
|
+ role="progressbar"
|
|
|
+ aria-valuenow={proc}
|
|
|
+ aria-valuemin="0"
|
|
|
+ aria-valuemax="100"
|
|
|
+ style="width: {{ choice.proc }}%""
|
|
|
+ >
|
|
|
+ <span class="sr-only">
|
|
|
+ {% blocktrans trimmed count votes=choice.votes with proc=choice.proc %}
|
|
|
+ {{ votes }} vote, {{ proc }}% of total.
|
|
|
+ {% plural %}
|
|
|
+ {{ votes }} votes, {{ proc }}% of total.
|
|
|
+ {% endblocktrans %}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ {% endfor %}
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ {% if poll.acl.can_vote or poll.acl.can_see_votes or poll.acl.can_edit or poll.acl.can_delete %}
|
|
|
+ <ul class="list-unstyled list-inline poll-options">
|
|
|
+ {% if poll.acl.can_vote %}
|
|
|
+ <li>
|
|
|
+ <button class="btn btn-default" disabled>
|
|
|
+ {% trans "Vote" %}
|
|
|
+ </button>
|
|
|
+ </li>
|
|
|
+ {% endif %}
|
|
|
+ {% if poll.acl.can_see_votes %}
|
|
|
+ <li>
|
|
|
+ <button class="btn btn-default" disabled>
|
|
|
+ {% trans "See votes" %}
|
|
|
+ </button>
|
|
|
+ </li>
|
|
|
+ {% endif %}
|
|
|
+ {% if poll.acl.can_see_votes %}
|
|
|
+ <li>
|
|
|
+ <button class="btn btn-default" disabled>
|
|
|
+ {% trans "Edit" %}
|
|
|
+ </button>
|
|
|
+ </li>
|
|
|
+ {% endif %}
|
|
|
+ {% if poll.acl.can_see_votes %}
|
|
|
+ <li>
|
|
|
+ <button class="btn btn-default" disabled>
|
|
|
+ {% trans "Delete" %}
|
|
|
+ </button>
|
|
|
+ </li>
|
|
|
+ {% endif %}
|
|
|
+ </ul>
|
|
|
+ {% endif %}
|
|
|
+</div>
|