You are here

function theme_advpoll_block_latest_poll in Advanced Poll 6

Same name and namespace in other branches
  1. 5 advpoll.module \theme_advpoll_block_latest_poll()
  2. 6.3 advpoll.module \theme_advpoll_block_latest_poll()
  3. 6.2 advpoll.module \theme_advpoll_block_latest_poll()

Content of the block, as returned by advpoll_block('view').

1 theme call to theme_advpoll_block_latest_poll()
advpoll_block in ./advpoll.module
Implementation of hook_block().

File

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

Code

function theme_advpoll_block_latest_poll() {
  $node = advpoll_latest_poll();
  $output = '';
  if ($node) {
    $output .= '<h3>' . l($node->title, 'node/' . $node->nid) . '</h3>';
    $output .= drupal_render($node->content);
    if ($node->voted) {
      $output .= '<p>' . l(t('Older polls'), 'polls', array(
        'class' => 'old-polls',
        'title' => t('View the list of polls on this site.'),
      )) . '</p>';
    }
  }
  return $output;
}