Commit e80fd7fa authored by merlinofchaos's avatar merlinofchaos

Updates to theme code for views statistics blocks

parent a70bdf06
......@@ -243,7 +243,7 @@ function statistics_views_default_views() {
return $views;
}
function theme_views_view_popular_recent($view, $type, $nodes) {
function theme_views_view_list_popular_recent($view, $nodes, $type) {
if ($type == 'block') {
$fields = _views_get_fields();
......@@ -259,17 +259,16 @@ function theme_views_view_popular_recent($view, $type, $nodes) {
$items[] = $item;
}
$output = theme('item_list', $items);
if ($view->block_more && count($nodes) >= $view->nodes_per_block)
$output .= theme('views_more', $view->real_url);
return "<div class='view' id='view-$view->name'>$output</div>\n";
if ($items) {
return theme('item_list', $items);
}
}
else {
return theme('views_view', $view, $type, $nodes);
return theme('views_view', $view, $nodes, $type);
}
}
function theme_views_view_popular_alltime($view, $type, $nodes) {
function theme_views_view_list_popular_alltime($view, $nodes, $type) {
if ($type == 'block') {
$fields = _views_get_fields();
......@@ -285,10 +284,11 @@ function theme_views_view_popular_alltime($view, $type, $nodes) {
$items[] = $item;
}
$output = theme('item_list', $items);
return "<div class='view' id='view-$view->name'>$output</div>\n";
if ($items) {
return theme('item_list', $items);
}
}
else {
return theme('views_view', $view, $type, $nodes);
return theme('views_view', $view, $nodes, $type);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment