You are here

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.

File

templates/poll-results.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display the poll results in a block.
  5. *
  6. * Variables available:
  7. * - title: The title of the poll.
  8. * - results: The results of the poll.
  9. * - votes: The total results in the poll.
  10. * - links: Links in the poll.
  11. * - pid: The pid of the poll
  12. * - cancel_form: A form to cancel the user's vote, if allowed.
  13. * - raw_links: The raw array of links.
  14. * - vote: The choice number of the current user's vote.
  15. *
  16. * @see template_preprocess_poll_results()
  17. *
  18. * @ingroup themeable
  19. */
  20. #}
  21. <div class="poll">
  22. {% if show_question %}
  23. <h3 class="poll-question">{{ question }}</h3>
  24. {% else %}
  25. <h3 class="poll-results-title">{{ results_title }}</h3>
  26. {% endif %}
  27. <dl>
  28. {{ results }}
  29. </dl>
  30. <div class="total">
  31. {% trans %}Total votes: {{ votes }}{% endtrans %}
  32. </div>
  33. </div>