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 | |
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')
30 files changed, 627 insertions, 662 deletions
diff --git a/mod/pages/views/default/annotation/icon.php b/mod/pages/views/default/annotation/icon.php index 3e0195e5f..42d32b021 100644 --- a/mod/pages/views/default/annotation/icon.php +++ b/mod/pages/views/default/annotation/icon.php @@ -1,30 +1,24 @@ <?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ +/** + * @todo What is this doing here? + * + * @package ElggPages + */ +$annotation = $vars['annotation']; +$entity = get_entity($annotation->entity_guid); + +// Get size +if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar'))) + $vars['size'] = "medium"; + +// Get any align and js +if (!empty($vars['align'])) { + $align = " align=\"{$vars['align']}\" "; +} else { + $align = ""; +} - $annotation = $vars['annotation']; - $entity = get_entity($annotation->entity_guid); - - // Get size - if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar'))) - $vars['size'] = "medium"; - - // Get any align and js - if (!empty($vars['align'])) { - $align = " align=\"{$vars['align']}\" "; - } else { - $align = ""; - } - - ?> <div class="groupicon"> diff --git a/mod/pages/views/default/annotation/page.php b/mod/pages/views/default/annotation/page.php index ecfd0a302..c59c80567 100644 --- a/mod/pages/views/default/annotation/page.php +++ b/mod/pages/views/default/annotation/page.php @@ -1,40 +1,34 @@ <?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - - $annotation = $vars['annotation']; - $entity = get_entity($annotation->entity_guid); - - $icon = elgg_view( - "annotation/icon", array( +/** + * Default page listing? + * + * @package ElggPages + */ + +$annotation = $vars['annotation']; +$entity = get_entity($annotation->entity_guid); + +$icon = elgg_view( + "annotation/icon", array( 'annotation' => $vars['annotation'], 'size' => 'small', - ) - ); - - $owner_guid = $annotation->owner_guid; - $owner = get_entity($owner_guid); - - $rev = sprintf(elgg_echo('pages:revision'), - friendly_time($annotation->time_created), - - "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>" - ); - - $link = $entity->getURL() . "?rev=" . $annotation->id; - - $info = <<< END - + ) +); + +$owner_guid = $annotation->owner_guid; +$owner = get_entity($owner_guid); + +$rev = sprintf(elgg_echo('pages:revision'), + friendly_time($annotation->time_created), + "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>" +); + +$link = $entity->getURL() . "?rev=" . $annotation->id; + +$info = <<< END + <div><a href="$link">{$entity->title}</a></div> <div>$rev</div> END; - echo elgg_view_listing($icon, $info); -?> +echo elgg_view_listing($icon, $info); diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php index 2ad454073..2095e4fd8 100644 --- a/mod/pages/views/default/forms/pages/edit.php +++ b/mod/pages/views/default/forms/pages/edit.php @@ -1,106 +1,100 @@ <?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ +/** + * Page edit form. + * + * @package ElggPages + */ - $parent_guid = get_input('parent_guid'); - $container_guid = get_input('container_guid'); - if (!$container_guid) $container_guid = page_owner(); - - $new_page = false; - if (!$vars['entity']) { - $new_page = true; - - // bootstrap the access permissions in the entity array so we can use defaults - if (defined('ACCESS_DEFAULT')) { - $vars['entity']->access_id = ACCESS_DEFAULT; - $vars['entity']->write_access_id = ACCESS_DEFAULT; - } else { - $vars['entity']->access_id = 0; - $vars['entity']->write_access_id = 0; - } +$parent_guid = get_input('parent_guid'); +$container_guid = get_input('container_guid'); +if (!$container_guid) { + $container_guid = page_owner(); +} - // pull in sticky values from session - if (isset($_SESSION['page_description'])) { - $vars['entity']->description = $_SESSION['page_description']; - $vars['entity']->tags = $_SESSION['page_tags']; - $vars['entity']->access_id = $_SESSION['page_read_access']; - $vars['entity']->write_access_id = $_SESSION['page_write_access']; +$new_page = false; +if (!$vars['entity']) { + $new_page = true; - // clear them - unset($_SESSION['page_description']); - unset($_SESSION['page_tags']); - unset($_SESSION['page_read_access']); - unset($_SESSION['page_write_access']); - } + // bootstrap the access permissions in the entity array so we can use defaults + if (defined('ACCESS_DEFAULT')) { + $vars['entity']->access_id = ACCESS_DEFAULT; + $vars['entity']->write_access_id = ACCESS_DEFAULT; + } else { + $vars['entity']->access_id = 0; + $vars['entity']->write_access_id = 0; + } + + // pull in sticky values from session + if (isset($_SESSION['page_description'])) { + $vars['entity']->description = $_SESSION['page_description']; + $vars['entity']->tags = $_SESSION['page_tags']; + $vars['entity']->access_id = $_SESSION['page_read_access']; + $vars['entity']->write_access_id = $_SESSION['page_write_access']; + + // clear them + unset($_SESSION['page_description']); + unset($_SESSION['page_tags']); + unset($_SESSION['page_read_access']); + unset($_SESSION['page_write_access']); } +} ?> <div class="contentWrapper"> <form action="<?php echo $vars['url']; ?>action/pages/edit" method="post"> <?php - echo elgg_view('input/securitytoken'); - if (is_array($vars['config']->pages) && sizeof($vars['config']->pages) > 0) - foreach($vars['config']->pages as $shortname => $valtype) { - - $disabled = ""; - - if (!$new_page && ($shortname == 'title')) - { - $disabled = true; - } +echo elgg_view('input/securitytoken'); +if (is_array($vars['config']->pages) && sizeof($vars['config']->pages) > 0) { + foreach($vars['config']->pages as $shortname => $valtype) { + $disabled = ""; + + if (!$new_page && ($shortname == 'title')) { + $disabled = true; + } ?> - <p> - <label> - <?php echo elgg_echo("pages:{$shortname}") ?><br /> - <?php echo elgg_view("input/{$valtype}",array( - 'internalname' => $shortname, - 'value' => $vars['entity']->$shortname, - 'disabled' => $disabled - )); ?> - </label> - </p> +<p> + <label> + <?php echo elgg_echo("pages:{$shortname}") ?><br /> + <?php echo elgg_view("input/{$valtype}",array( + 'internalname' => $shortname, + 'value' => $vars['entity']->$shortname, + 'disabled' => $disabled + )); ?> + </label> +</p> <?php - - } - $cats = elgg_view('categories',$vars); - if (!empty($cats)) { - + + } +} + +$cats = elgg_view('categories', $vars); +if (!empty($cats)) { ?> - <p> - <?php - echo $cats; - ?> - </p> +<p> + <?php + echo $cats; + ?> +</p> <?php - - } + } + +?> +<p> +<?php +if (!$new_page) { + ?><input type="hidden" name="pages_guid" value="<?php echo $vars['entity']->getGUID(); ?>" /><?php +} + +if ($container_guid) { + ?><input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" /><?php +} ?> - <p> - <?php - if (!$new_page) - { - ?><input type="hidden" name="pages_guid" value="<?php echo $vars['entity']->getGUID(); ?>" /><?php - } - ?> - <?php - if ($container_guid) - { - ?><input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" /><?php - } - ?> - <input type="hidden" name="parent_guid" value="<?php if (!$new_page) echo $vars['entity']->parent_guid; else echo $parent_guid; ?>" /> - <input type="hidden" name="owner_guid" value="<?php if (!$new_page) echo $vars['entity']->owner_guid; else echo page_owner(); ?>" /> - <input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" /> - </p> + <input type="hidden" name="parent_guid" value="<?php if (!$new_page) echo $vars['entity']->parent_guid; else echo $parent_guid; ?>" /> + <input type="hidden" name="owner_guid" value="<?php if (!$new_page) echo $vars['entity']->owner_guid; else echo page_owner(); ?>" /> + <input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" /> +</p> </form> -</div> +</div>
\ No newline at end of file diff --git a/mod/pages/views/default/forms/pages/editwelcome.php b/mod/pages/views/default/forms/pages/editwelcome.php index 39d8d05ca..41721484b 100644 --- a/mod/pages/views/default/forms/pages/editwelcome.php +++ b/mod/pages/views/default/forms/pages/editwelcome.php @@ -1,59 +1,55 @@ <?php - /** - * Elgg Pages Edit welcome page - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - - //set some variables - if($vars['entity']){ - foreach($vars['entity'] as $welcome){ - $current_message = $welcome->description; - $object_guid = $welcome->guid; - $access_id = $welcome->access_id; - } - }else{ - $current_message = ''; - $object_guid = ''; - $access_id = ACCESS_PRIVATE; - } - - $page_owner = $vars['owner']->guid; - +/** + * Welcome page edit form + * + * @package ElggPages + */ + +//set some variables +if($vars['entity']) { + foreach($vars['entity'] as $welcome) { + $current_message = $welcome->description; + $object_guid = $welcome->guid; + $access_id = $welcome->access_id; + } +} else { + $current_message = ''; + $object_guid = ''; + $access_id = ACCESS_PRIVATE; +} + +$page_owner = $vars['owner']->guid; + ?> <form action="<?php echo $vars['url']; ?>action/pages/editwelcome" method="post"> - <p class="longtext_inputarea"> - <label> - <?php echo elgg_view("input/longtext",array( - 'internalname' => "pages_welcome", - 'value' => $current_message, - 'disabled' => $disabled - )); ?> - </label> - </p> - <p> - <label> - <?php echo elgg_echo('access'); ?><br /> - <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?> - </label> - </p> - <input type="hidden" name="owner_guid" value="<?php echo $page_owner; ?>" /> - - <?php - echo elgg_view('input/securitytoken'); + <p class="longtext_inputarea"> + <label> + <?php echo elgg_view("input/longtext",array( + 'internalname' => "pages_welcome", + 'value' => $current_message, + 'disabled' => $disabled + )); ?> + </label> +</p> +<p> + <label> + <?php echo elgg_echo('access'); ?><br /> + <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?> + </label> +</p> +<input type="hidden" name="owner_guid" value="<?php echo $page_owner; ?>" /> + +<?php + echo elgg_view('input/securitytoken'); + + //if it is editing, include the object guid + if ($object_guid != ''){ + ?> + <input type="hidden" name="object_guid" value="<?php echo $object_guid; ?>" /> +<?php + } + ?> - //if it is editing, include the object guid - if($object_guid != ''){ - ?> - <input type="hidden" name="object_guid" value="<?php echo $object_guid; ?>" /> - <?php - } - ?> - - <input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" /> +<input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" /> </form> diff --git a/mod/pages/views/default/icon/object/page/medium.php b/mod/pages/views/default/icon/object/page/medium.php index 1e5c1538e..bb81a9653 100644 --- a/mod/pages/views/default/icon/object/page/medium.php +++ b/mod/pages/views/default/icon/object/page/medium.php @@ -1,3 +1,8 @@ <?php - echo $vars['url'] . "mod/pages/images/pages_lrg.gif"; -?> +/** + * Page icon override medium + * + * @package ElggPages + */ + +echo $vars['url'] . "mod/pages/images/pages_lrg.gif"; diff --git a/mod/pages/views/default/icon/object/page/small.php b/mod/pages/views/default/icon/object/page/small.php index 3ccc859f3..55466f539 100644 --- a/mod/pages/views/default/icon/object/page/small.php +++ b/mod/pages/views/default/icon/object/page/small.php @@ -1,3 +1,8 @@ <?php - echo $vars['url'] . "mod/pages/images/pages.gif"; -?> +/** + * Page icon override small + * + * @package ElggPages + */ + +echo $vars['url'] . "mod/pages/images/pages.gif";
\ No newline at end of file diff --git a/mod/pages/views/default/icon/object/page_top/medium.php b/mod/pages/views/default/icon/object/page_top/medium.php index 1e5c1538e..bb5c367b2 100644 --- a/mod/pages/views/default/icon/object/page_top/medium.php +++ b/mod/pages/views/default/icon/object/page_top/medium.php @@ -1,3 +1,9 @@ <?php - echo $vars['url'] . "mod/pages/images/pages_lrg.gif"; +/** + * Top page icon override medium + * + * @package ElggPages + */ + +echo $vars['url'] . "mod/pages/images/pages_lrg.gif"; ?> diff --git a/mod/pages/views/default/icon/object/page_top/small.php b/mod/pages/views/default/icon/object/page_top/small.php index 3ccc859f3..5be6e578d 100644 --- a/mod/pages/views/default/icon/object/page_top/small.php +++ b/mod/pages/views/default/icon/object/page_top/small.php @@ -1,3 +1,8 @@ <?php - echo $vars['url'] . "mod/pages/images/pages.gif"; -?> +/** + * Top Page icon override small + * + * @package ElggPages + */ + +echo $vars['url'] . "mod/pages/images/pages.gif"; diff --git a/mod/pages/views/default/object/page.php b/mod/pages/views/default/object/page.php index 843209609..5b4af5198 100644 --- a/mod/pages/views/default/object/page.php +++ b/mod/pages/views/default/object/page.php @@ -1,21 +1,16 @@ <?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ +/** + * Page view + * + * @package ElggPages + */ - if ($vars['full']) { - echo elgg_view("pages/pageprofile",$vars); +if ($vars['full']) { + echo elgg_view("pages/pageprofile", $vars); +} else { + if (get_input('search_viewtype') == "gallery") { + echo elgg_view('pages/pagegallery', $vars); } else { - if (get_input('search_viewtype') == "gallery") { - echo elgg_view('pages/pagegallery',$vars); - } else { - echo elgg_view("pages/pagelisting",$vars); - } + echo elgg_view("pages/pagelisting", $vars); } -?> +}
\ No newline at end of file diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php index 843209609..6922118c1 100644 --- a/mod/pages/views/default/object/page_top.php +++ b/mod/pages/views/default/object/page_top.php @@ -1,21 +1,16 @@ <?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ +/** + * View for page object + * + * @package ElggPages + */ - if ($vars['full']) { - echo elgg_view("pages/pageprofile",$vars); +if ($vars['full']) { + echo elgg_view("pages/pageprofile", $vars); +} else { + if (get_input('search_viewtype') == "gallery") { + echo elgg_view('pages/pagegallery', $vars); } else { - if (get_input('search_viewtype') == "gallery") { - echo elgg_view('pages/pagegallery',$vars); - } else { - echo elgg_view("pages/pagelisting",$vars); - } + echo elgg_view("pages/pagelisting", $vars); } -?> +}
\ No newline at end of file diff --git a/mod/pages/views/default/pages/breadcrumbs.php b/mod/pages/views/default/pages/breadcrumbs.php index a6626ca39..868a3eeb5 100644 --- a/mod/pages/views/default/pages/breadcrumbs.php +++ b/mod/pages/views/default/pages/breadcrumbs.php @@ -1,28 +1,30 @@ <?php +/** + * Breadcrumbs for pages. + * + * @package ElggPages + */ - $page_owner = $vars['page_owner']; - $parent = $vars['parent']; +$page_owner = $vars['page_owner']; +$parent = $vars['parent']; - $breadcrumbs = ''; - - $owner_url = $CONFIG->wwwroot . "pg/pages/owned/" . get_entity($page_owner)->username; - echo "<div id='breadcrumbs'><b><a href=\"{$owner_url}\">" . elgg_echo('pages:user') . "</a></b>"; - - //see if the new page's parent has a parent - $getparent = get_entity($parent->parent_guid); - while ($getparent instanceof ElggObject){ - - $breadcrumbs = " > <a href=\"{$getparent->getURL()}\">$getparent->title</a>" . $breadcrumbs; - $getparent = get_entity($getparent->parent_guid); - - } - - echo $breadcrumbs; - //if it is adding a page, make the last page a link, otherwise, don't - if($vars['add']){ - echo " > <a href=\"{$parent->getURL()}\">$parent->title</a></div>"; - }else{ - echo " > $parent->title</div>"; - } +$breadcrumbs = ''; -?> +$owner_url = $CONFIG->wwwroot . "pg/pages/owned/" . get_entity($page_owner)->username; +echo "<div id='breadcrumbs'><b><a href=\"{$owner_url}\">" . elgg_echo('pages:user') . "</a></b>"; + +//see if the new page's parent has a parent +$getparent = get_entity($parent->parent_guid); +while ($getparent instanceof ElggObject){ + $breadcrumbs = " > <a href=\"{$getparent->getURL()}\">$getparent->title</a>" . $breadcrumbs; + $getparent = get_entity($getparent->parent_guid); +} + +echo $breadcrumbs; + +//if it is adding a page, make the last page a link, otherwise, don't +if ($vars['add']){ + echo " > <a href=\"{$parent->getURL()}\">$parent->title</a></div>"; +} else { + echo " > $parent->title</div>"; +}
\ No newline at end of file diff --git a/mod/pages/views/default/pages/css.php b/mod/pages/views/default/pages/css.php index c396d45f7..78298c6a1 100644 --- a/mod/pages/views/default/pages/css.php +++ b/mod/pages/views/default/pages/css.php @@ -1,15 +1,12 @@ <?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ +/** + * Elgg Pages CSS + * + * @package ElggPages + */ ?> -.treeview, .treeview ul { +.treeview, .treeview ul { padding: 0; margin: 0; list-style: none; @@ -34,7 +31,7 @@ float:none; } -.treeview li { +.treeview li { margin: 0; padding: 3px 0pt 3px 16px; } @@ -53,23 +50,23 @@ .treeview .expandable-hitarea { background-position: -80px -3px; } .treeview li.last { background-position: 0 -1766px } -.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-default.gif); } +.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-default.gif); } .treeview li.lastCollapsable { background-position: 0 -111px } .treeview li.lastExpandable { background-position: -32px -67px } .treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; } .treeview-red li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-red-line.gif); } -.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-red.gif); } +.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-red.gif); } .treeview-black li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-black-line.gif); } -.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-black.gif); } +.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-black.gif); } .treeview-gray li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-gray-line.gif); } -.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-gray.gif); } +.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-gray.gif); } .treeview-famfamfam li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-famfamfam-line.gif); } -.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-famfamfam.gif); } +.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-famfamfam.gif); } .filetree li { padding: 3px 0 2px 16px; } @@ -84,19 +81,19 @@ } #pages_page .strapline { - text-align:right; - border-top:1px solid #efefef; - margin:10px 0 10px 0; - color:#666666; + text-align:right; + border-top:1px solid #efefef; + margin:10px 0 10px 0; + color:#666666; } #pages_page .categories { - border:none !important; - padding:0 !important; + border:none !important; + padding:0 !important; } #pages_page .tags { - padding:0 0 0 16px; - margin:10px 0 4px 0; + padding:0 0 0 16px; + margin:10px 0 4px 0; background:transparent url(<?php echo $vars['url']; ?>_graphics/icon_tag.gif) no-repeat scroll left 2px; } @@ -115,10 +112,10 @@ #sidebar_page_tree { background:white; - -webkit-border-radius: 8px; + -webkit-border-radius: 8px; -moz-border-radius: 8px; - padding:10px; - margin:0 10px 10px 10px; + padding:10px; + margin:0 10px 10px 10px; } #sidebar_page_tree h3 { background: none; @@ -139,8 +136,6 @@ padding:5px; display:block; background:white; - -webkit-border-radius: 8px; - -moz-border-radius: 8px; -} - - + -webkit-border-radius: 8px; + -moz-border-radius: 8px; +}
\ No newline at end of file diff --git a/mod/pages/views/default/pages/groupprofile_pages.php b/mod/pages/views/default/pages/groupprofile_pages.php index 006a05877..17c1d87ed 100644 --- a/mod/pages/views/default/pages/groupprofile_pages.php +++ b/mod/pages/views/default/pages/groupprofile_pages.php @@ -1,27 +1,28 @@ <?php - - // pages on the group index page - - //check to make sure this group forum has been activated - if($vars['entity']->pages_enable != 'no'){ +/** + * Page icon override medium + * + * @package ElggPages + */ +//check to make sure this group forum has been activated +if ($vars['entity']->pages_enable != 'no') { ?> <div id="group_pages_widget"> <h2><?php echo elgg_echo("pages:groupprofile"); ?></h2> <?php - $objects = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => page_owner(), 'limit' => 5, 'full_view' => FALSE)); - - if($objects) + $objects = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => page_owner(), 'limit' => 5, 'full_view' => FALSE)); + + if($objects) echo $objects; else echo "<div class=\"forum_latest\">" . elgg_echo("pages:nogroup") . "</div>"; - + ?> <br class="clearfloat" /> </div> <?php - } -?> + } diff --git a/mod/pages/views/default/pages/metatags.php b/mod/pages/views/default/pages/metatags.php index 82b291e2c..b803a32a5 100644 --- a/mod/pages/views/default/pages/metatags.php +++ b/mod/pages/views/default/pages/metatags.php @@ -1,22 +1,27 @@ <?php +/** + * Metatag extended view. + * + * @package ElggPages + */ - $treeguid = get_input('treeguid'); - if (empty($treeguid)) { - $treeguid = get_input('page_guid'); - } +$treeguid = get_input('treeguid'); +if (empty($treeguid)) { + $treeguid = get_input('page_guid'); +} ?> - <script type="text/javascript" src="<?php echo $vars['url']; ?>mod/pages/javascript/jquery.treeview.js" ></script> - <script type="text/javascript" src="<?php echo $vars['url']; ?>mod/pages/javascript/jquery.treeview.async.js" ></script> - <script type="text/javascript"> - - $(document).ready( function() { - - $("#pagesTree").treeview({ - url: "<?php echo $vars['url']; ?>mod/pages/pagesTree.php", - currentpage: "<?php echo get_input('page_guid'); ?>" - }, "<?php echo $treeguid; ?>") - - }); - </script> +<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/pages/javascript/jquery.treeview.js" ></script> +<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/pages/javascript/jquery.treeview.async.js" ></script> +<script type="text/javascript"> + + $(document).ready( function() { + + $("#pagesTree").treeview({ + url: "<?php echo $vars['url']; ?>mod/pages/pagesTree.php", + currentpage: "<?php echo get_input('page_guid'); ?>" + }, "<?php echo $treeguid; ?>") + + }); +</script> diff --git a/mod/pages/views/default/pages/pagegallery.php b/mod/pages/views/default/pages/pagegallery.php index 1ff32016d..0dadb63c2 100644 --- a/mod/pages/views/default/pages/pagegallery.php +++ b/mod/pages/views/default/pages/pagegallery.php @@ -1,37 +1,31 @@ <?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ +/** + * Elgg Pages gallery listing. + * + * @package ElggPages + */ - $icon = elgg_view( - "graphics/icon", array( - 'entity' => $vars['entity'], - 'size' => 'medium', - ) - ); +$icon = elgg_view( + "graphics/icon", array( + 'entity' => $vars['entity'], + 'size' => 'medium', + ) +); - $info = "<div><p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->title . "</a></b></p></div>"; +$info = "<div><p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->title . "</a></b></p></div>"; - - $latest = $vars['entity']->getAnnotations('page', 1, 0, 'desc'); - if ($latest) { - $latest = $latest[0]; - - $time_updated = $latest->time_created; - $owner_guid = $latest->owner_guid; - $owner = get_entity($owner_guid); - - - $info .= "<br /><div>". - strip_tags(substr($latest->value, 0, 100)) - . "</div>"; - } +$latest = $vars['entity']->getAnnotations('page', 1, 0, 'desc'); +if ($latest) { + $latest = $latest[0]; - echo elgg_view_listing($icon, $info); -?> + $time_updated = $latest->time_created; + $owner_guid = $latest->owner_guid; + $owner = get_entity($owner_guid); + + + $info .= "<br /><div>". + strip_tags(substr($latest->value, 0, 100)) + . "</div>"; +} + +echo elgg_view_listing($icon, $info);
\ No newline at end of file diff --git a/mod/pages/views/default/pages/pagelisting.php b/mod/pages/views/default/pages/pagelisting.php index 4da9fd4a2..4dc5dc3b3 100644 --- a/mod/pages/views/default/pages/pagelisting.php +++ b/mod/pages/views/default/pages/pagelisting.php @@ -1,38 +1,32 @@ <?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ +/** + * Elgg Pages flat listing + * + * @package ElggPages + */ - $icon = elgg_view( - "graphics/icon", array( - 'entity' => $vars['entity'], - 'size' => 'small', - ) - ); +$icon = elgg_view( + "graphics/icon", array( + 'entity' => $vars['entity'], + 'size' => 'small', + ) + ); - $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->title . "</a></b></p>"; +$info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->title . "</a></b></p>"; - - $latest = $vars['entity']->getAnnotations('page', 1, 0, 'desc'); - if ($latest) { - $latest = $latest[0]; - - $time_updated = $latest->time_created; - $owner_guid = $latest->owner_guid; - $owner = get_entity($owner_guid); - - - $info .= "<p class=\"owner_timestamp\">".sprintf(elgg_echo("pages:strapline"), - friendly_time($time_updated), - "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>" - ) . "</p>"; - } - - echo elgg_view_listing($icon, $info); -?> +$latest = $vars['entity']->getAnnotations('page', 1, 0, 'desc'); +if ($latest) { + $latest = $latest[0]; + + $time_updated = $latest->time_created; + $owner_guid = $latest->owner_guid; + $owner = get_entity($owner_guid); + + + $info .= "<p class=\"owner_timestamp\">".sprintf(elgg_echo("pages:strapline"), + friendly_time($time_updated), + "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>" + ) . "</p>"; +} + +echo elgg_view_listing($icon, $info); diff --git a/mod/pages/views/default/pages/pageprofile.php b/mod/pages/views/default/pages/pageprofile.php index b1081d9f7..cc3113b4e 100644 --- a/mod/pages/views/default/pages/pageprofile.php +++ b/mod/pages/views/default/pages/pageprofile.php @@ -1,83 +1,74 @@ <?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - - // Output body - $entity = $vars['entity']; - - $rev = (int)get_input('rev'); - - if ($rev) - { - $latest = get_annotation($rev); - } - else - { - $latest = $entity->getAnnotations('page', 1, 0, 'desc'); - if ($latest) $latest = $latest[0]; - } - -?> - <div class="contentWrapper"> +/** + * Elgg Pages profile + * + * @package ElggPages + */ + +// Output body +$entity = $vars['entity']; + +$rev = (int)get_input('rev'); + +if ($rev) { + $latest = get_annotation($rev); +} else { + $latest = $entity->getAnnotations('page', 1, 0, 'desc'); + if ($latest) $latest = $latest[0]; +} +?> +<div class="contentWrapper"> <div id="pages_page"> - -<?php - if ($entity) - { + + <?php + if ($entity) { echo elgg_view('output/longtext', array('value' => /*$entity->description*/ $latest->value)); - + $tags = $vars['entity']->tags; if (!empty($tags)) { - -?> + + ?> <!-- display tags --> <p class="tags"> <?php echo elgg_view('output/tags', array('tags' => $tags)); - + ?> </p> - -<?php + + <?php } $cats = elgg_view('categories/view',$vars); if (!empty($cats)) { - -?> + + ?> <p class="categories"> <?php echo $cats; ?> </p> -<?php - + <?php + } } // last edit & by whome -?> + ?> <p class="strapline"> <?php - + $time_updated = $latest->time_created; $owner_guid = $latest->owner_guid; $owner = get_entity($owner_guid); - + echo sprintf(elgg_echo("pages:strapline"), friendly_time($time_updated), "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>" ); - + ?> </p> -</div> + </div> </div> diff --git a/mod/pages/views/default/pages/sidebar/sidebarthis.php b/mod/pages/views/default/pages/sidebar/sidebarthis.php index 1c8b77848..173ddb91a 100644 --- a/mod/pages/views/default/pages/sidebar/sidebarthis.php +++ b/mod/pages/views/default/pages/sidebar/sidebarthis.php @@ -1,92 +1,88 @@ [<?php - /** - * Elgg Pages - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - - global $CONFIG; - $entity = $vars['entity']; - $parent = $vars['entity']->parent_guid; - - $currentpage = (int) get_input('currentpage'); - if ($currentpage) { - - $path = pages_get_path($currentpage); - $pathstring = implode(',',$path); - - } else { - $path = array(); - } - - function pages_draw_child($childentity, $path) { - - $child = "\n\t\t{\n"; - $child .= "\t\t\t\"text\": \"<a href=\\\"{$childentity->getURL()}\\\">" . addslashes($childentity->title) . "</a>\"\n"; - - $extras = ""; - $haschild = elgg_get_entities_from_metadata(array('metadata_name' => 'parent_guid', 'metadata_value' => $childentity->guid, 'limit' => 9999)); - if ($haschild) { - if (in_array($childentity->guid,$path)) { - $extras .= "\t\t\t,\"expanded\": true"; - $extras .= "\t\t\t,\"children\": [\n"; - - $childstring = ""; - foreach($haschild as $subchild) { - $childstringtemp = pages_draw_child($subchild,$path); - if (!empty($childstringtemp)) { - if (!empty($childstring)) $childstring .= ", "; - $childstring .= $childstringtemp; - } +/** + * Side bar page tree. + * + * @package ElggPages + */ + +global $CONFIG; +$entity = $vars['entity']; +$parent = $vars['entity']->parent_guid; + +$currentpage = (int) get_input('currentpage'); +if ($currentpage) { + + $path = pages_get_path($currentpage); + $pathstring = implode(',',$path); + +} else { + $path = array(); +} + +function pages_draw_child($childentity, $path) { + + $child = "\n\t\t{\n"; + $child .= "\t\t\t\"text\": \"<a href=\\\"{$childentity->getURL()}\\\">" . addslashes($childentity->title) . "</a>\"\n"; + + $extras = ""; + $haschild = elgg_get_entities_from_metadata(array('metadata_name' => 'parent_guid', 'metadata_value' => $childentity->guid, 'limit' => 9999)); + if ($haschild) { + if (in_array($childentity->guid,$path)) { + $extras .= "\t\t\t,\"expanded\": true"; + $extras .= "\t\t\t,\"children\": [\n"; + + $childstring = ""; + foreach($haschild as $subchild) { + $childstringtemp = pages_draw_child($subchild,$path); + if (!empty($childstringtemp)) { + if (!empty($childstring)) $childstring .= ", "; + $childstring .= $childstringtemp; } - - $extras .= $childstring . "\n\t\t\t]\n"; - } else { - $extras .= ",\t\t\t\"id\": \"{$childentity->getGUID()}\",\n\t\t\t\"hasChildren\": true\n"; } - - } - $child .= $extras . "\t\t}"; - return $child; - } - - if (!$parent) { - echo "{\n"; - echo "\t\"text\": \"<a href=\\\"{$vars['entity']->getURL()}\\\">" . addslashes($vars['entity']->title) . "</a>\"\n"; - } - - $children = ""; - $temp = ""; - if (isset($vars['children']) && is_array($vars['children']) && (!isset($vars['fulltree']) || $vars['fulltree'] == 0)) { - if (!$parent) $temp .= "\t" . '"expanded": true,' . "\n"; - if (!$parent) $temp .= "\t" . '"children": [' . "\n"; - foreach($vars['children'] as $child) { - $childrentemp = pages_draw_child($child,$path); - if (!empty($childrentemp)) { - if (!empty($children)) $children .= ", \n"; - $children .= $childrentemp; + + $extras .= $childstring . "\n\t\t\t]\n"; + } else { + $extras .= ",\t\t\t\"id\": \"{$childentity->getGUID()}\",\n\t\t\t\"hasChildren\": true\n"; } - /* - $children .= "\n\t\t{\n"; - $children .= "\t\t\t\"text\": \"<a href=\\\"{$child->getURL()}\\\">{$child->title}</a>\",\n"; - - $haschild = get_entities_from_metadata('parent_guid',$child->guid,'','',0,10,0,'',0,true); - if ($haschild) { - $children .= "\t\t\t\"id\": \"{$child->getGUID()}\",\n\t\t\t\"hasChildren\": true\n"; - } - $children .= "\t\t}"; - */ + + } + $child .= $extras . "\t\t}"; + return $child; +} + +if (!$parent) { + echo "{\n"; + echo "\t\"text\": \"<a href=\\\"{$vars['entity']->getURL()}\\\">" . addslashes($vars['entity']->title) . "</a>\"\n"; +} + + $children = ""; + $temp = ""; + if (isset($vars['children']) && is_array($vars['children']) && (!isset($vars['fulltree']) || $vars['fulltree'] == 0)) { + if (!$parent) $temp .= "\t" . '"expanded": true,' . "\n"; + if (!$parent) $temp .= "\t" . '"children": [' . "\n"; + foreach($vars['children'] as $child) { + $childrentemp = pages_draw_child($child,$path); + if (!empty($childrentemp)) { + if (!empty($children)) $children .= ", \n"; + $children .= $childrentemp; } - if (!empty($temp)) echo ',' . $temp; - echo $children; - if (!$parent) echo "\t\t" . ']' . "\n"; - + /* + $children .= "\n\t\t{\n"; + $children .= "\t\t\t\"text\": \"<a href=\\\"{$child->getURL()}\\\">{$child->title}</a>\",\n"; + + $haschild = get_entities_from_metadata('parent_guid',$child->guid,'','',0,10,0,'',0,true); + if ($haschild) { + $children .= "\t\t\t\"id\": \"{$child->getGUID()}\",\n\t\t\t\"hasChildren\": true\n"; + } + $children .= "\t\t}"; + */ } - - if (!$parent) echo "}"; + if (!empty($temp)) echo ',' . $temp; + echo $children; + if (!$parent) echo "\t\t" . ']' . "\n"; + + } + +if (!$parent) echo "}"; -?>] +?>]
\ No newline at end of file diff --git a/mod/pages/views/default/pages/sidebar/starter.php b/mod/pages/views/default/pages/sidebar/starter.php index edc66e499..f533356b3 100644 --- a/mod/pages/views/default/pages/sidebar/starter.php +++ b/mod/pages/views/default/pages/sidebar/starter.php @@ -1,21 +1,19 @@ <?php +/** + * Start Pages page output + * + * @package ElggPages + */ - if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) { +if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) { ?> <script type="text/javascript"> - $(document).ready( function() { - $("#pagetree<?php echo $vars['entity']->getGUID(); ?>").click(); - }); - </script> <?php - - } - -?> +}
\ No newline at end of file diff --git a/mod/pages/views/default/pages/sidebar/tree.php b/mod/pages/views/default/pages/sidebar/tree.php index 07de1beb5..399caf108 100644 --- a/mod/pages/views/default/pages/sidebar/tree.php +++ b/mod/pages/views/default/pages/sidebar/tree.php @@ -1,8 +1,12 @@ <?php - +/** + * Side bar tree wrapper. + * + * @package ElggPages + */ ?> <div id="sidebar_page_tree"> - <h3><?php echo elgg_echo("pages:navigation"); ?></h3> + <h3><?php echo elgg_echo("pages:navigation"); ?></h3> <div id="pagesTree" class="pagesTreeContainer"></div> </div> <br class="clearfloat" /> diff --git a/mod/pages/views/default/pages/sidebar/wrapper.php b/mod/pages/views/default/pages/sidebar/wrapper.php index 2109188cf..93b746eb0 100644 --- a/mod/pages/views/default/pages/sidebar/wrapper.php +++ b/mod/pages/views/default/pages/sidebar/wrapper.php @@ -1,7 +1,10 @@ <?php +/** + * Pages page wrapper + * + * @package ElggPages + */ - echo "["; - echo $vars['body']; - echo "]"; - -?> +echo "["; +echo $vars['body']; +echo "]";
\ No newline at end of file diff --git a/mod/pages/views/default/pages/welcome.php b/mod/pages/views/default/pages/welcome.php index a390a9d65..7802fa5af 100644 --- a/mod/pages/views/default/pages/welcome.php +++ b/mod/pages/views/default/pages/welcome.php @@ -1,29 +1,16 @@ <?php +/** + * Elgg Pages welcome message + * + * @package ElggPages + */ - /** - * Elgg Pages welcome message - * - * @package ElggPages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - - if($vars['entity']){ - - foreach($vars['entity'] as $welcome){ - - echo "<div class=\"contentWrapper pageswelcome\">" . $welcome->description . "</div>"; - - } - - } else { - +if($vars['entity']) { + foreach($vars['entity'] as $welcome){ + echo "<div class=\"contentWrapper pageswelcome\">" . $welcome->description . "</div>"; + } +} else { ?> - <div class="contentWrapper pageswelcome"><p><?php echo sprintf(elgg_echo('pages:welcomemessage'), $vars['config']->sitename); ?></p></div> - <?php - } -?> +} diff --git a/mod/pages/views/default/river/object/page/annotate.php b/mod/pages/views/default/river/object/page/annotate.php index 4bee26d81..4f913dbaa 100644 --- a/mod/pages/views/default/river/object/page/annotate.php +++ b/mod/pages/views/default/river/object/page/annotate.php @@ -1,14 +1,17 @@ <?php +/** + * Page annotate river entry + * + * @package ElggPages + */ - $statement = $vars['statement']; - $performed_by = $statement->getSubject(); - $object = $statement->getObject(); - - $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; - $string = sprintf(elgg_echo("pages:river:posted"),$url) . " "; - $string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("pages:river:annotate:create") . "</a> " . $object->title; - //$string .= "<div class=\"river_content\">" . $object->title . "</div>"; +$statement = $vars['statement']; +$performed_by = $statement->getSubject(); +$object = $statement->getObject(); -?> +$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; +$string = sprintf(elgg_echo("pages:river:posted"),$url) . " "; +$string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("pages:river:annotate:create") . "</a> " . $object->title; +//$string .= "<div class=\"river_content\">" . $object->title . "</div>"; -<?php echo $string; ?> +echo $string; diff --git a/mod/pages/views/default/river/object/page/create.php b/mod/pages/views/default/river/object/page/create.php index 00885d154..dc4554404 100644 --- a/mod/pages/views/default/river/object/page/create.php +++ b/mod/pages/views/default/river/object/page/create.php @@ -1,17 +1,22 @@ <?php +/** + * Page create river view + * + * @package ElggPages + */ - $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); - $object = get_entity($vars['item']->object_guid); - $url = $object->getURL(); +$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); +$object = get_entity($vars['item']->object_guid); +$url = $object->getURL(); - - $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; - $contents = strip_tags($object->description); //strip tags from the contents to stop large images etc blowing out the river view - $string = sprintf(elgg_echo("pages:river:created"),$url) . " "; - $string .= elgg_echo("pages:river:create") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a> <span class='entity_subtext'>". friendly_time($object->time_created) ."</span> <a class='river_comment_form_button link'>Comment</a>"; - $string .= elgg_view('likes/forms/link', array('entity' => $object)); - $string .= "<div class=\"river_content_display\">"; - $string .= elgg_make_excerpt($contents, 200); - $string .= "</div>"; - echo $string; +$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; +$contents = strip_tags($object->description); //strip tags from the contents to stop large images etc blowing out the river view +$string = sprintf(elgg_echo("pages:river:created"),$url) . " "; +$string .= elgg_echo("pages:river:create") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a> <span class='entity_subtext'>". friendly_time($object->time_created) ."</span> <a class='river_comment_form_button link'>Comment</a>"; +$string .= elgg_view('likes/forms/link', array('entity' => $object)); +$string .= "<div class=\"river_content_display\">"; +$string .= elgg_make_excerpt($contents, 200); +$string .= "</div>"; + +echo $string; diff --git a/mod/pages/views/default/river/object/page/update.php b/mod/pages/views/default/river/object/page/update.php index 2b20a9ed8..82b38f315 100644 --- a/mod/pages/views/default/river/object/page/update.php +++ b/mod/pages/views/default/river/object/page/update.php @@ -1,14 +1,16 @@ <?php +/** + * Page update river view + * + * @package ElggPages + */ - $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); - $object = get_entity($vars['item']->object_guid); - $url = $object->getURL(); +$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); +$object = get_entity($vars['item']->object_guid); +$url = $object->getURL(); - - $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; - $string = sprintf(elgg_echo("pages:river:updated"),$url) . " "; - $string .= elgg_echo("pages:river:update") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; - -?> +$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; +$string = sprintf(elgg_echo("pages:river:updated"),$url) . " "; +$string .= elgg_echo("pages:river:update") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; -<?php echo $string; ?> +echo $string; diff --git a/mod/pages/views/default/river/object/page_top/annotate.php b/mod/pages/views/default/river/object/page_top/annotate.php index f3a47e5d9..43270f736 100644 --- a/mod/pages/views/default/river/object/page_top/annotate.php +++ b/mod/pages/views/default/river/object/page_top/annotate.php @@ -1,14 +1,16 @@ <?php +/** + * Top page annotation river view. + * + * @package ElggPages + */ - $statement = $vars['statement']; - $performed_by = $statement->getSubject(); - $object = $statement->getObject(); - - $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; - $string = sprintf(elgg_echo("pages:river:posted"),$url) . " "; - $string .= elgg_echo("pages:river:annotate:create") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; - //$string .= "<div class=\"river_content\">" . $object->title . "</div>"; +$statement = $vars['statement']; +$performed_by = $statement->getSubject(); +$object = $statement->getObject(); -?> +$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; +$string = sprintf(elgg_echo("pages:river:posted"),$url) . " "; +$string .= elgg_echo("pages:river:annotate:create") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; -<?php echo $string; ?> +echo $string; diff --git a/mod/pages/views/default/river/object/page_top/create.php b/mod/pages/views/default/river/object/page_top/create.php index 9427d5caa..d49f3d5c4 100644 --- a/mod/pages/views/default/river/object/page_top/create.php +++ b/mod/pages/views/default/river/object/page_top/create.php @@ -1,14 +1,15 @@ <?php +/** + * Top page create river view. + * + * @package ElggPages + */ - $statement = $vars['statement']; - $performed_by = $statement->getSubject(); - $object = $statement->getObject(); - - $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; - $string = sprintf(elgg_echo("pages:river:created"),$url) . " "; - $string .= elgg_echo("pages:river:create") . "<a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; - //$string .= "<div class=\"river_content\">Page title: " . $object->title . "</div>"; +$statement = $vars['statement']; +$performed_by = $statement->getSubject(); +$object = $statement->getObject(); -?> - -<?php echo $string; ?> +$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; +$string = sprintf(elgg_echo("pages:river:created"),$url) . " "; +$string .= elgg_echo("pages:river:create") . "<a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; +echo $string;
\ No newline at end of file diff --git a/mod/pages/views/default/river/object/page_top/update.php b/mod/pages/views/default/river/object/page_top/update.php index febe2965d..6187f54bc 100644 --- a/mod/pages/views/default/river/object/page_top/update.php +++ b/mod/pages/views/default/river/object/page_top/update.php @@ -1,14 +1,16 @@ <?php +/** + * Top page update river view + * + * @package ElggPages + */ - $statement = $vars['statement']; - $performed_by = $statement->getSubject(); - $object = $statement->getObject(); - - $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; - $string = sprintf(elgg_echo("pages:river:updated"),$url) . " "; - $string .= elgg_echo("pages:river:update") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; - //$string .= "<div class=\"river_content\">Title: " . $object->title . "</div>"; - -?> +$statement = $vars['statement']; +$performed_by = $statement->getSubject(); +$object = $statement->getObject(); -<?php echo $string; ?> +$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; +$string = sprintf(elgg_echo("pages:river:updated"),$url) . " "; +$string .= elgg_echo("pages:river:update") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; + +echo $string;
\ No newline at end of file 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 |