function poll_view
Same name and namespace in other branches
- 6.x drupal-6.x/modules/poll/poll.module \poll_view()
Implements hook_view().
Archivo
- drupal-7.x/
modules/ poll/ poll.module, line 676 - Enables your site to capture votes on different topics in the form of multiple choice questions.
Código
function poll_view($node, $view_mode) {
global $user;
$output = '';
if (!empty($node->allowvotes) && empty($node->show_results)) {
$node->content['poll_view_voting'] = drupal_get_form('poll_view_voting', $node);
}
else {
$node->content['poll_view_results'] = array('#markup' => poll_view_results($node, $view_mode));
}
return $node;
}