Mercurial > defr > drupal > core
diff modules/poll/poll-bar.tpl.php @ 1:c1f4ac30525a 6.0
Drupal 6.0
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:28:28 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/modules/poll/poll-bar.tpl.php Tue Dec 23 14:28:28 2008 +0100 @@ -0,0 +1,26 @@ +<?php +// $Id: poll-bar.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $ + +/** + * @file poll-bar.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; ?>% (<?php print format_plural($votes, '1 vote', '@count votes'); ?>) +</div>