Commit 4ee42afd authored by merlinofchaos's avatar merlinofchaos
Browse files

Updates to theme code for views_statistics blocks

parent b4f15f71
...@@ -243,7 +243,7 @@ function statistics_views_default_views() { ...@@ -243,7 +243,7 @@ function statistics_views_default_views() {
return $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') { if ($type == 'block') {
$fields = _views_get_fields(); $fields = _views_get_fields();
...@@ -259,17 +259,16 @@ function theme_views_view_popular_recent($view, $type, $nodes) { ...@@ -259,17 +259,16 @@ function theme_views_view_popular_recent($view, $type, $nodes) {
$items[] = $item; $items[] = $item;
} }
$output = theme('item_list', $items); if ($items) {
if ($view->block_more && count($nodes) >= $view->nodes_per_block) return theme('item_list', $items);
$output .= theme('views_more', $view->real_url); }
return "<div class='view' id='view-$view->name'>$output</div>\n";
} }
else { else {
return theme('views_view', $view, $type, $nodes); return theme('views_view_list', $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') { if ($type == 'block') {
$fields = _views_get_fields(); $fields = _views_get_fields();
...@@ -285,10 +284,11 @@ function theme_views_view_popular_alltime($view, $type, $nodes) { ...@@ -285,10 +284,11 @@ function theme_views_view_popular_alltime($view, $type, $nodes) {
$items[] = $item; $items[] = $item;
} }
$output = theme('item_list', $items); if ($items) {
return "<div class='view' id='view-$view->name'>$output</div>\n"; return theme('item_list', $items);
}
} }
else { 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