poll-bar.tpl.php

  1. cis7 modules/poll/poll-bar.tpl.php
  2. cis7 sites/all/themes/ulmus/corolla/templates/poll-bar.tpl.php
  3. cle7 modules/poll/poll-bar.tpl.php
  4. cle7 sites/all/themes/ulmus/corolla/templates/poll-bar.tpl.php
  5. ecd7 modules/poll/poll-bar.tpl.php
  6. ecd7 sites/all/themes/ulmus/corolla/templates/poll-bar.tpl.php
  7. elmsmedia7 modules/poll/poll-bar.tpl.php
  8. elmsmedia7 sites/all/themes/ulmus/corolla/templates/poll-bar.tpl.php
  9. harmony7 modules/poll/poll-bar.tpl.php
  10. harmony7 sites/all/themes/ulmus/corolla/templates/poll-bar.tpl.php
  11. icor7 modules/poll/poll-bar.tpl.php
  12. icor7 sites/all/themes/ulmus/corolla/templates/poll-bar.tpl.php
  13. meedjum_blog7 modules/poll/poll-bar.tpl.php
  14. meedjum_blog7 sites/all/themes/ulmus/corolla/templates/poll-bar.tpl.php
  15. mooc7 modules/poll/poll-bar.tpl.php
  16. mooc7 sites/all/themes/ulmus/corolla/templates/poll-bar.tpl.php

Default theme implementation to display the bar for a single choice in a poll.

Variables available:

  • $title: The title of the poll.
  • $votes: The number of votes for this choice
  • $total_votes: The number of votes for this choice
  • $percentage: The percentage of votes for this choice.
  • $vote: The choice number of the current user's vote.
  • $voted: Set to TRUE if the user voted for this choice.

See also

template_preprocess_poll_bar()

1 theme call to poll-bar.tpl.php
poll_view_results in modules/poll/poll.module
Generates a graphical representation of the results of a poll.
4 string references to the theme hook from poll-bar.tpl.php

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

poll_theme in modules/poll/poll.module
Implements hook_theme().
poll_theme in modules/poll/poll.module
Implements hook_theme().
poll_view_results in modules/poll/poll.module
Generates a graphical representation of the results of a poll.
template_preprocess_poll_bar in modules/poll/poll.module
Preprocess the poll_bar theme hook.

File

modules/poll/poll-bar.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to display the bar for a single choice in a
  5. * poll.
  6. *
  7. * Variables available:
  8. * - $title: The title of the poll.
  9. * - $votes: The number of votes for this choice
  10. * - $total_votes: The number of votes for this choice
  11. * - $percentage: The percentage of votes for this choice.
  12. * - $vote: The choice number of the current user's vote.
  13. * - $voted: Set to TRUE if the user voted for this choice.
  14. *
  15. * @see template_preprocess_poll_bar()
  16. */
  17. ?>
  18. <div class="text"><?php print $title; ?></div>
  19. <div class="bar">
  20. <div style="width: <?php print $percentage; ?>%;" class="foreground"></div>
  21. </div>
  22. <div class="percent">
  23. <?php print $percentage; ?>% (<?php print format_plural($votes, '1 vote', '@count votes'); ?>)
  24. </div>
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.