poll-results.html.twig in Poll 8
Default theme implementation to display the poll results in a block.
Variables available:
- title: The title of the poll.
- results: The results of the poll.
- votes: The total results in the poll.
- links: Links in the poll.
- pid: The pid of the poll
- cancel_form: A form to cancel the user's vote, if allowed.
- raw_links: The raw array of links.
- vote: The choice number of the current user's vote.
See also
1 theme call to poll-results.html.twig
- PollViewForm::showPollResults in src/
Form/ PollViewForm.php - Display a themed poll results.
File
templates/poll-results.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display the poll results in a block.
- *
- * Variables available:
- * - title: The title of the poll.
- * - results: The results of the poll.
- * - votes: The total results in the poll.
- * - links: Links in the poll.
- * - pid: The pid of the poll
- * - cancel_form: A form to cancel the user's vote, if allowed.
- * - raw_links: The raw array of links.
- * - vote: The choice number of the current user's vote.
- *
- * @see template_preprocess_poll_results()
- *
- * @ingroup themeable
- */
- #}
- <div class="poll">
- {% if show_question %}
- <h3 class="poll-question">{{ question }}</h3>
- {% else %}
- <h3 class="poll-results-title">{{ results_title }}</h3>
- {% endif %}
- <dl>
- {{ results }}
- </dl>
- <div class="total">
- {% trans %}Total votes: {{ votes }}{% endtrans %}
- </div>
- </div>