function theme_poll_bar in Drupal 5        
                          
                  
                        Same name and namespace in other branches
- 4 modules/poll.module \theme_poll_bar()
 
 
1 theme call to theme_poll_bar()
  - poll_view_results in modules/poll/poll.module
 
  - Generates a graphical representation of the results of a poll.
 
 
File
 
   - modules/poll/poll.module, line 454
 
  - Enables your site to capture votes on different topics in the form of multiple
choice questions.
 
Code
function theme_poll_bar($title, $percentage, $votes, $block) {
  if ($block) {
    $output = '<div class="text">' . $title . '</div>';
    $output .= '<div class="bar"><div style="width: ' . $percentage . '%;" class="foreground"></div></div>';
    $output .= '<div class="percent">' . $percentage . '%</div>';
  }
  else {
    $output = '<div class="text">' . $title . '</div>';
    $output .= '<div class="bar"><div style="width: ' . $percentage . '%;" class="foreground"></div></div>';
    $output .= '<div class="percent">' . $percentage . '% (' . $votes . ')</div>';
  }
  return $output;
}