From 36ef345eb6425106f061fb866d9fa66d051e16df Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 5 Apr 2010 16:08:42 +0000 Subject: Merged 5530:5604 from 1.7 to trunk. git-svn-id: http://code.elgg.org/elgg/trunk@5622 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/pages/views/default/widgets/pages/edit.php | 24 ++++++++++++++++++++---- mod/pages/views/default/widgets/pages/view.php | 12 +++++++++--- 2 files changed, 29 insertions(+), 7 deletions(-) (limited to 'mod/pages/views/default/widgets') diff --git a/mod/pages/views/default/widgets/pages/edit.php b/mod/pages/views/default/widgets/pages/edit.php index 8fb2511f7..9504d5fdb 100644 --- a/mod/pages/views/default/widgets/pages/edit.php +++ b/mod/pages/views/default/widgets/pages/edit.php @@ -10,8 +10,24 @@ * @link http://elgg.com/ */ +if (!isset($vars['entity']->pages_num)) { + $vars['entity']->pages_num = 4; +} + +?> +

+ : + -

\ No newline at end of file + +

\ No newline at end of file diff --git a/mod/pages/views/default/widgets/pages/view.php b/mod/pages/views/default/widgets/pages/view.php index 2ca32b284..425e4f501 100644 --- a/mod/pages/views/default/widgets/pages/view.php +++ b/mod/pages/views/default/widgets/pages/view.php @@ -16,11 +16,17 @@ */ $num_display = (int) $vars['entity']->pages_num; + if (!$num_display) { + $num_display = 4; + } $pages = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => page_owner(), 'limit' => $num_display, 'full_view' => FALSE)); - $pagesurl = $vars['url'] . "pg/pages/owned/" . page_owner_entity()->username; - $pages .= "
" . elgg_echo('pages:more') . "
"; - + + if ($pages) { + $pagesurl = $vars['url'] . "pg/pages/owned/" . page_owner_entity()->username; + $pages .= "
" . elgg_echo('pages:more') . "
"; + } + echo "
" . $pages . "
"; ?> \ No newline at end of file -- cgit v1.2.3