You are here

function theme_poll_results in Drupal 4

Same name and namespace in other branches
  1. 5 modules/poll/poll.module \theme_poll_results()
1 theme call to theme_poll_results()
poll_view_results in modules/poll.module
Generates a graphical representation of the results of a poll.

File

modules/poll.module, line 353
Enables your site to capture votes on different topics in the form of multiple choice questions.

Code

function theme_poll_results($title, $results, $votes, $links, $block) {
  if ($block) {
    $output .= '<div class="poll">';
    $output .= '<div class="title">' . $title . '</div>';
    $output .= $results;
    $output .= '<div class="total">' . t('Total votes: %votes', array(
      '%votes' => $votes,
    )) . '</div>';
    $output .= '</div>';
    $output .= '<div class="links">' . theme('links', $links) . '</div>';
  }
  else {
    $output .= '<div class="poll">';
    $output .= $results;
    $output .= '<div class="total">' . t('Total votes: %votes', array(
      '%votes' => $votes,
    )) . '</div>';
    $output .= '</div>';
  }
  return $output;
}