summaryrefslogtreecommitdiff
path: root/modules/poll/poll-bar-block.tpl.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-08-02 10:46:53 +0000
committerDries Buytaert <dries@buytaert.net>2007-08-02 10:46:53 +0000
commitd31f65a93c78ef1269991af293e835a3bbd0870d (patch)
tree1d8febcbf83fd05bfffd00658a67d22e35b510a4 /modules/poll/poll-bar-block.tpl.php
parent79d8390f9041a4ac992924a5d0b99315f2366dc8 (diff)
downloadbrdo-d31f65a93c78ef1269991af293e835a3bbd0870d.tar.gz
brdo-d31f65a93c78ef1269991af293e835a3bbd0870d.tar.bz2
- Patch #162871 by merlinofchaos: poll module cleanup + tplified the module.
Diffstat (limited to 'modules/poll/poll-bar-block.tpl.php')
-rw-r--r--modules/poll/poll-bar-block.tpl.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/poll/poll-bar-block.tpl.php b/modules/poll/poll-bar-block.tpl.php
new file mode 100644
index 000000000..9f303eccd
--- /dev/null
+++ b/modules/poll/poll-bar-block.tpl.php
@@ -0,0 +1,25 @@
+<?php
+// $Id$
+/**
+ * @file poll-bar-block.tpl.php
+ * 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 template_preprocess_poll_bar()
+ */
+?>
+
+<div class="text"><?php print $title; ?></div>
+<div class="bar">
+ <div style="width: <?php print $percentage; ?>%;" class="foreground"></div>
+</div>
+<div class="percent">
+ <?php print $percentage; ?>%
+</div>