diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-05 16:08:42 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-05 16:08:42 +0000 |
commit | 36ef345eb6425106f061fb866d9fa66d051e16df (patch) | |
tree | 53fb2bd05f8b5e2010f9e3d1e93075ad7071ec1e /mod/pages | |
parent | 5571ca5b350fd1735f13af7ddfbb88afa6befb0c (diff) | |
download | elgg-36ef345eb6425106f061fb866d9fa66d051e16df.tar.gz elgg-36ef345eb6425106f061fb866d9fa66d051e16df.tar.bz2 |
Merged 5530:5604 from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@5622 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/pages')
-rw-r--r-- | mod/pages/index.php | 3 | ||||
-rw-r--r-- | mod/pages/views/default/widgets/pages/edit.php | 24 | ||||
-rw-r--r-- | mod/pages/views/default/widgets/pages/view.php | 12 |
3 files changed, 31 insertions, 8 deletions
diff --git a/mod/pages/index.php b/mod/pages/index.php index 5b31c6347..ad8aaaad2 100644 --- a/mod/pages/index.php +++ b/mod/pages/index.php @@ -24,7 +24,8 @@ if ($owner instanceof ElggUser) add_submenu_item(elgg_echo('pages:welcome'), $CONFIG->url . "pg/pages/welcome/", 'pagesactions'); } - if (is_callable('group_gatekeeper')) group_gatekeeper(); + // access check for closed groups + group_gatekeeper(); $limit = get_input("limit", 10); $offset = get_input("offset", 0); 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; +} + +?> +<p> + <?php echo elgg_echo("pages:num"); ?>: + <select name="params[pages_num]"> +<?php + +for ($i=1; $i<=10; $i++) { + $selected = ''; + if ($vars['entity']->pages_num == $i) { + $selected = "selected='selected'"; + } + + echo " <option value='{$i}' $selected >{$i}</option>\n"; +} ?> - <p> - <?php echo elgg_echo("pages:num"); ?> - <input type="text" name="params[pages_num]" value="<?php echo htmlentities($vars['entity']->pages_num); ?>" /> - </p>
\ No newline at end of file + </select> +</p>
\ 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 .= "<div class=\"pages_widget_singleitem_more\"><a href=\"{$pagesurl}\">" . elgg_echo('pages:more') . "</a></div>"; - + + if ($pages) { + $pagesurl = $vars['url'] . "pg/pages/owned/" . page_owner_entity()->username; + $pages .= "<div class=\"pages_widget_singleitem_more\"><a href=\"{$pagesurl}\">" . elgg_echo('pages:more') . "</a></div>"; + } + echo "<div id=\"pages_widget\">" . $pages . "</div>"; ?>
\ No newline at end of file |