function theme_views_view_list_popular_alltime in Views (for Drupal 7) 5
File
- modules/
views_statistics.inc, line 270
Code
function theme_views_view_list_popular_alltime($view, $nodes, $type) {
if ($type == 'block') {
$fields = _views_get_fields();
foreach ($nodes as $node) {
foreach ($view->field as $field) {
if ($field['fullname'] == 'node.title') {
$item = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
}
if ($field['fullname'] == 'node_counter.totalcount') {
$item .= ' <span class="popular-content-count">(' . views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view) . ')</span>';
}
}
$items[] = $item;
}
if ($items) {
return theme('item_list', $items);
}
}
else {
return theme('views_view', $view, $nodes, $type);
}
}