From cff53c3045e0c4c44375496bdb0531812aff7b6a Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 26 Jan 2011 12:13:37 +0000 Subject: added edit views for admin widgets git-svn-id: http://code.elgg.org/elgg/trunk@7939 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/widgets/content_stats/content.php | 11 +++++++++-- views/default/widgets/content_stats/edit.php | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 views/default/widgets/content_stats/edit.php (limited to 'views/default/widgets/content_stats') diff --git a/views/default/widgets/content_stats/content.php b/views/default/widgets/content_stats/content.php index b5ea00e18..568ebeeff 100644 --- a/views/default/widgets/content_stats/content.php +++ b/views/default/widgets/content_stats/content.php @@ -3,16 +3,23 @@ * Content stats widget */ -$max = 5; +$max = $vars['entity']->num_display; $entity_stats = get_entity_statistics(); $object_stats = $entity_stats['object']; arsort($object_stats); $object_stats = array_slice($object_stats, 0, $max); -echo ''; +echo '
'; +echo ''; +echo ''; foreach ($object_stats as $subtype => $num) { $name = elgg_echo("item:object:$subtype"); echo ""; } echo '
' . elgg_echo('widget:content_stats:type') . '' . elgg_echo('widget:content_stats:number') . '
$name$num
'; + +echo elgg_view('output/url', array( + 'href' => 'pg/admin/statistics/overview', + 'text' => 'more', +)); diff --git a/views/default/widgets/content_stats/edit.php b/views/default/widgets/content_stats/edit.php new file mode 100644 index 000000000..681a96d48 --- /dev/null +++ b/views/default/widgets/content_stats/edit.php @@ -0,0 +1,23 @@ +num_display)) { + $vars['entity']->num_display = 8; +} + +$params = array( + 'internalname' => 'params[num_display]', + 'value' => $vars['entity']->num_display, + 'options' => array(5, 8, 10, 12, 15, 20), +); +$dropdown = elgg_view('input/pulldown', $params); + +?> +

+ : + +

-- cgit v1.2.3