diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-07-15 17:59:57 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-07-15 17:59:57 +0000 |
commit | bcfbbf1b7cf2a0c96af1dfe55c919c09eceac916 (patch) | |
tree | e22653836d685eedbe81df5f4b1c118e6324c86d /mod/pages/views/default/widgets | |
parent | ff5846ea6cb4e5edc84c99c6eda7b37dccce8bf5 (diff) | |
download | elgg-bcfbbf1b7cf2a0c96af1dfe55c919c09eceac916.tar.gz elgg-bcfbbf1b7cf2a0c96af1dfe55c919c09eceac916.tar.bz2 |
First pass at standardizing pages.
git-svn-id: http://code.elgg.org/elgg/trunk@6716 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/pages/views/default/widgets')
-rw-r--r-- | mod/pages/views/default/widgets/pages/edit.php | 23 | ||||
-rw-r--r-- | mod/pages/views/default/widgets/pages/view.php | 46 |
2 files changed, 30 insertions, 39 deletions
diff --git a/mod/pages/views/default/widgets/pages/edit.php b/mod/pages/views/default/widgets/pages/edit.php index 6459a0373..4ddfec428 100644 --- a/mod/pages/views/default/widgets/pages/edit.php +++ b/mod/pages/views/default/widgets/pages/edit.php @@ -1,14 +1,9 @@ <?php - - /** - * Elgg pages widget edit - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ +/** + * Elgg pages widget edit + * + * @package ElggPages + */ if (!isset($vars['entity']->pages_num)) { $vars['entity']->pages_num = 4; @@ -16,10 +11,10 @@ if (!isset($vars['entity']->pages_num)) { ?> <p> - <?php echo elgg_echo("pages:num"); ?>: - <select name="params[pages_num]"> -<?php +<?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) { @@ -29,5 +24,5 @@ for ($i=1; $i<=10; $i++) { echo " <option value='{$i}' $selected >{$i}</option>\n"; } ?> - </select> +</select> </p> diff --git a/mod/pages/views/default/widgets/pages/view.php b/mod/pages/views/default/widgets/pages/view.php index d975dcdc0..5428b89a1 100644 --- a/mod/pages/views/default/widgets/pages/view.php +++ b/mod/pages/views/default/widgets/pages/view.php @@ -1,32 +1,28 @@ <style type="text/css"> #pages_widget .pagination { - display:none; + display:none; } </style> <?php - /** - * Elgg pages widget edit - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - - $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)); - - 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>"; - } +/** + * Elgg pages widget edit + * + * @package ElggPages + * @link http://elgg.com/ + */ - echo "<div id=\"pages_widget\">" . $pages . "</div>"; - -?> +$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)); + +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 |