You are here

function theme_advpoll_bar in Advanced Poll 6.2

Same name and namespace in other branches
  1. 5 advpoll.module \theme_advpoll_bar()
  2. 6.3 advpoll.module \theme_advpoll_bar()
  3. 6 advpoll.module \theme_advpoll_bar()
2 theme calls to theme_advpoll_bar()
advpoll_view_results_binary in modes/binary.inc
advpoll_view_results_ranking in modes/ranking.inc

File

./advpoll.module, line 1234
Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.

Code

function theme_advpoll_bar($title, $percentage, $votes, $choice = NULL) {
  $output = '<div class="text">' . $title . ($choice && $choice['writein'] ? ' ' . t('(write-in)') : '') . '</div>';
  $output .= '<div class="bar"><div style="width: ' . $percentage . '%;" class="foreground"></div></div>';
  $output .= '<div class="percent">' . $percentage . '% <span class="votes">(' . $votes . ')</span></div>';
  return $output;
}