From 1fd8bd6e296e2b1fc960fde1dd204b6c4e3e8aec Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Wed, 8 Jun 2011 02:31:30 -0700 Subject: River revamp for 1.8 --- mod/pages/languages/en.php | 13 +++++----- .../views/default/river/object/page/create.php | 30 +++------------------- 2 files changed, 10 insertions(+), 33 deletions(-) (limited to 'mod/pages') diff --git a/mod/pages/languages/en.php b/mod/pages/languages/en.php index f590afb9c..1c6d0318c 100644 --- a/mod/pages/languages/en.php +++ b/mod/pages/languages/en.php @@ -38,13 +38,12 @@ $english = array( * River **/ - 'pages:river:create' => 'created the page', - 'pages:river:created' => "%s wrote", - 'pages:river:updated' => "%s updated", - 'pages:river:posted' => "%s posted", - 'pages:river:update' => "a page titled", - 'river:commented:object:page' => 'the page', - 'river:commented:object:page_top' => 'the page', + 'river:create:object:page' => '%s created a page %s', + 'river:create:object:page_top' => '%s created a page %s', + 'river:update:object:page' => '%s updated a page %s', + 'river:update:object:page_top' => '%s updated a page %s', + 'river:comment:object:page' => '%s commented on a page titled %s', + 'river:comment:object:page_top' => '%s commented on a page titled %s', /** * Form fields diff --git a/mod/pages/views/default/river/object/page/create.php b/mod/pages/views/default/river/object/page/create.php index 032046063..ca15ddea7 100644 --- a/mod/pages/views/default/river/object/page/create.php +++ b/mod/pages/views/default/river/object/page/create.php @@ -7,29 +7,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $excerpt = elgg_get_excerpt($excerpt); -$params = array( - 'href' => $object->getURL(), - 'text' => $object->title, -); -$link = elgg_view('output/url', $params); - -$group_string = ''; -$container = $object->getContainerEntity(); -if ($container instanceof ElggGroup) { - $params = array( - 'href' => $container->getURL(), - 'text' => $container->name, - ); - $group_link = elgg_view('output/url', $params); - $group_string = elgg_echo('river:ingroup', array($group_link)); -} - -echo elgg_echo('pages:river:create'); - -echo " $link $group_string"; - -if ($excerpt) { - echo '
'; - echo $excerpt; - echo '
'; -} +echo elgg_view('river/item', array( + 'item' => $vars['item'], + 'message' => $excerpt, +)); \ No newline at end of file -- cgit v1.2.3 From 0594a363ae77c5427eb96a8753e644897fdc5491 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 24 Jun 2011 21:03:45 -0400 Subject: Fixes #3139 DRYs up group modules --- mod/blog/views/default/blog/group_module.php | 22 ++++++++++------------ .../views/default/bookmarks/group_module.php | 21 ++++++++++----------- mod/file/views/default/file/group_module.php | 22 ++++++++++------------ .../views/default/discussion/group_module.php | 22 ++++++++++------------ .../default/groups/profile/activity_module.php | 11 ++++++----- mod/groups/views/default/groups/profile/module.php | 20 ++++++++++++++++++++ mod/pages/views/default/pages/group_module.php | 21 ++++++++++----------- 7 files changed, 76 insertions(+), 63 deletions(-) create mode 100644 mod/groups/views/default/groups/profile/module.php (limited to 'mod/pages') diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php index 6cfe6c98e..d769fbd59 100644 --- a/mod/blog/views/default/blog/group_module.php +++ b/mod/blog/views/default/blog/group_module.php @@ -14,10 +14,6 @@ $all_link = elgg_view('output/url', array( 'text' => elgg_echo('link:view:all'), )); -$header = "$all_link"; -$header .= '

' . elgg_echo('blog:group') . '

'; - - elgg_push_context('widgets'); $options = array( 'type' => 'object', @@ -34,12 +30,14 @@ if (!$content) { $content = '

' . elgg_echo('blog:none') . '

'; } -if ($group->canWriteToContainer()) { - $new_link = elgg_view('output/url', array( - 'href' => "blog/add/$group->guid", - 'text' => elgg_echo('blog:write'), - )); - $content .= "$new_link"; -} +$new_link = elgg_view('output/url', array( + 'href' => "blog/add/$group->guid", + 'text' => elgg_echo('blog:write'), +)); -echo elgg_view_module('info', '', $content, array('header' => $header)); +echo elgg_view('groups/profile/module', array( + 'title' => elgg_echo('blog:group'), + 'content' => $content, + 'all_link' => $all_link, + 'add_link' => $new_link, +)); diff --git a/mod/bookmarks/views/default/bookmarks/group_module.php b/mod/bookmarks/views/default/bookmarks/group_module.php index 3166fc0f0..3797de010 100644 --- a/mod/bookmarks/views/default/bookmarks/group_module.php +++ b/mod/bookmarks/views/default/bookmarks/group_module.php @@ -16,9 +16,6 @@ $all_link = elgg_view('output/url', array( 'text' => elgg_echo('link:view:all'), )); -$header = "$all_link"; -$header .= '

' . elgg_echo('bookmarks:group') . '

'; - elgg_push_context('widgets'); $options = array( 'type' => 'object', @@ -35,12 +32,14 @@ if (!$content) { $content = '

' . elgg_echo('bookmarks:none') . '

'; } -if ($group->canWriteToContainer()) { - $new_link = elgg_view('output/url', array( - 'href' => "bookmarks/add/$group->guid", - 'text' => elgg_echo('bookmarks:add'), - )); - $content .= "$new_link"; -} +$new_link = elgg_view('output/url', array( + 'href' => "bookmarks/add/$group->guid", + 'text' => elgg_echo('bookmarks:add'), +)); -echo elgg_view_module('info', '', $content, array('header' => $header)); +echo elgg_view('groups/profile/module', array( + 'title' => elgg_echo('bookmarks:group'), + 'content' => $content, + 'all_link' => $all_link, + 'add_link' => $new_link, +)); diff --git a/mod/file/views/default/file/group_module.php b/mod/file/views/default/file/group_module.php index 830b1096c..c37b13927 100644 --- a/mod/file/views/default/file/group_module.php +++ b/mod/file/views/default/file/group_module.php @@ -14,10 +14,6 @@ $all_link = elgg_view('output/url', array( 'text' => elgg_echo('link:view:all'), )); -$header = "$all_link"; -$header .= '

' . elgg_echo('file:group') . '

'; - - elgg_push_context('widgets'); $options = array( 'type' => 'object', @@ -34,12 +30,14 @@ if (!$content) { $content = '

' . elgg_echo('file:none') . '

'; } -if ($group->canWriteToContainer()) { - $new_link = elgg_view('output/url', array( - 'href' => "file/add/$group->guid", - 'text' => elgg_echo('file:add'), - )); - $content .= "$new_link"; -} +$new_link = elgg_view('output/url', array( + 'href' => "file/add/$group->guid", + 'text' => elgg_echo('file:add'), +)); -echo elgg_view_module('info', '', $content, array('header' => $header)); +echo elgg_view('groups/profile/module', array( + 'title' => elgg_echo('file:group'), + 'content' => $content, + 'all_link' => $all_link, + 'add_link' => $new_link, +)); diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php index 165d9b1be..3a46e336e 100644 --- a/mod/groups/views/default/discussion/group_module.php +++ b/mod/groups/views/default/discussion/group_module.php @@ -17,10 +17,6 @@ $all_link = elgg_view('output/url', array( 'text' => elgg_echo('link:view:all'), )); -$header = "$all_link"; -$header .= '

' . elgg_echo('discussion:group') . '

'; - - elgg_push_context('widgets'); $options = array( 'type' => 'object', @@ -37,12 +33,14 @@ if (!$content) { $content = '

' . elgg_echo('grouptopic:notcreated') . '

'; } -if ($group->canWriteToContainer()) { - $new_link = elgg_view('output/url', array( - 'href' => "discussion/add/" . $group->getGUID(), - 'text' => elgg_echo('groups:addtopic'), - )); - $content .= "$new_link"; -} +$new_link = elgg_view('output/url', array( + 'href' => "discussion/add/" . $group->getGUID(), + 'text' => elgg_echo('groups:addtopic'), +)); -echo elgg_view_module('info', '', $content, array('header' => $header)); +echo elgg_view('groups/profile/module', array( + 'title' => elgg_echo('discussion:group'), + 'content' => $content, + 'all_link' => $all_link, + 'add_link' => $new_link, +)); \ No newline at end of file diff --git a/mod/groups/views/default/groups/profile/activity_module.php b/mod/groups/views/default/groups/profile/activity_module.php index 4ea97cad6..5e557b443 100644 --- a/mod/groups/views/default/groups/profile/activity_module.php +++ b/mod/groups/views/default/groups/profile/activity_module.php @@ -21,16 +21,13 @@ $all_link = elgg_view('output/url', array( 'text' => elgg_echo('link:view:all'), )); -$header = "$all_link"; -$header .= '

' . elgg_echo('groups:activity') . '

'; - elgg_push_context('widgets'); $db_prefix = elgg_get_config('dbprefix'); $content = elgg_list_river(array( 'limit' => 4, 'pagination' => false, - 'joins' => array("join {$db_prefix}entities e1 on e1.guid = rv.object_guid"), + 'joins' => array("JOIN {$db_prefix}entities e1 ON e1.guid = rv.object_guid"), 'wheres' => array("(e1.container_guid = $group->guid)"), )); elgg_pop_context(); @@ -39,4 +36,8 @@ if (!$content) { $content = '

' . elgg_echo('groups:activity:none') . '

'; } -echo elgg_view_module('info', '', $content, array('header' => $header)); +echo elgg_view('groups/profile/module', array( + 'title' => elgg_echo('groups:activity'), + 'content' => $content, + 'all_link' => $all_link, +)); diff --git a/mod/groups/views/default/groups/profile/module.php b/mod/groups/views/default/groups/profile/module.php new file mode 100644 index 000000000..69854e59b --- /dev/null +++ b/mod/groups/views/default/groups/profile/module.php @@ -0,0 +1,20 @@ +{$vars['all_link']}"; +$header .= '

' . $vars['title'] . '

'; + +if ($group->canWriteToContainer() && isset($vars['add_link'])) { + $vars['content'] .= "{$vars['add_link']}"; +} + +echo elgg_view_module('info', '', $vars['content'], array('header' => $header)); diff --git a/mod/pages/views/default/pages/group_module.php b/mod/pages/views/default/pages/group_module.php index 1d3437e18..7e2656ca3 100644 --- a/mod/pages/views/default/pages/group_module.php +++ b/mod/pages/views/default/pages/group_module.php @@ -17,9 +17,6 @@ $all_link = elgg_view('output/url', array( 'text' => elgg_echo('link:view:all'), )); -$header = "$all_link"; -$header .= '

' . elgg_echo('pages:group') . '

'; - elgg_push_context('widgets'); $options = array( @@ -37,12 +34,14 @@ if (!$content) { $content = '

' . elgg_echo('pages:none') . '

'; } -if ($group->canWriteToContainer()) { - $new_link = elgg_view('output/url', array( - 'href' => "pages/add/$group->guid", - 'text' => elgg_echo('pages:add'), - )); - $content .= "$new_link"; -} +$new_link = elgg_view('output/url', array( + 'href' => "pages/add/$group->guid", + 'text' => elgg_echo('pages:add'), +)); -echo elgg_view_module('info', '', $content, array('header' => $header)); +echo elgg_view('groups/profile/module', array( + 'title' => elgg_echo('pages:group'), + 'content' => $content, + 'all_link' => $all_link, + 'add_link' => $new_link, +)); -- cgit v1.2.3 From b0b197ee2e73974a8b0c080086945383a863410e Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 26 Jun 2011 06:41:39 -0400 Subject: Fixes #3614 updated use of elgg_view_entity() throughout core --- engine/classes/ElggEntity.php | 2 +- mod/blog/lib/blog.php | 2 +- mod/bookmarks/pages/bookmarks/view.php | 2 +- mod/file/pages/file/view.php | 2 +- mod/groups/lib/discussion.php | 2 +- mod/groups/views/default/groups/sidebar/featured.php | 2 +- mod/messages/pages/messages/read.php | 2 +- mod/pages/pages/pages/view.php | 2 +- mod/search/views/default/search/entity.php | 2 +- pages/entities/index.php | 2 +- views/default/page/elements/owner_block.php | 2 +- views/json/entities/entity_list.php | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) (limited to 'mod/pages') diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php index 5b78f5db5..6edc99dd4 100644 --- a/engine/classes/ElggEntity.php +++ b/engine/classes/ElggEntity.php @@ -1628,7 +1628,7 @@ abstract class ElggEntity extends ElggData implements */ elgg_set_viewtype('default'); - $view = elgg_view_entity($this, true); + $view = elgg_view_entity($this, array('full_view' => true)); elgg_set_viewtype(); $tmp[] = new ODDMetaData($uuid . "volatile/renderedentity/", $uuid, diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 8964d5b53..6bdbc8b1f 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -38,7 +38,7 @@ function blog_get_page_content_read($guid = NULL) { } elgg_push_breadcrumb($blog->title); - $return['content'] = elgg_view_entity($blog, TRUE); + $return['content'] = elgg_view_entity($blog, array('full_view' => true)); //check to see if comment are on if ($blog->comments_on != 'Off') { $return['content'] .= elgg_view_comments($blog); diff --git a/mod/bookmarks/pages/bookmarks/view.php b/mod/bookmarks/pages/bookmarks/view.php index d0a9c630a..8e097b090 100644 --- a/mod/bookmarks/pages/bookmarks/view.php +++ b/mod/bookmarks/pages/bookmarks/view.php @@ -21,7 +21,7 @@ $title = $bookmark->title; elgg_push_breadcrumb($title); -$content = elgg_view_entity($bookmark, true); +$content = elgg_view_entity($bookmark, array('full_view' => true)); $content .= elgg_view_comments($bookmark); $body = elgg_view_layout('content', array( diff --git a/mod/file/pages/file/view.php b/mod/file/pages/file/view.php index 45e112d4d..4b395d20d 100644 --- a/mod/file/pages/file/view.php +++ b/mod/file/pages/file/view.php @@ -22,7 +22,7 @@ $title = $file->title; elgg_push_breadcrumb($title); -$content = elgg_view_entity($file, true); +$content = elgg_view_entity($file, array('full_view' => true)); $content .= elgg_view_comments($file); $download = elgg_view('output/url', array( diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 94d212ef6..342115c81 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -167,7 +167,7 @@ function discussion_handle_view_page($guid) { elgg_push_breadcrumb($group->name, "discussion/owner/$group->guid"); elgg_push_breadcrumb($topic->title); - $content = elgg_view_entity($topic, true); + $content = elgg_view_entity($topic, array('full_view' => true)); if ($topic->status == 'closed') { $content .= elgg_view('discussion/replies', array( 'entity' => $topic, diff --git a/mod/groups/views/default/groups/sidebar/featured.php b/mod/groups/views/default/groups/sidebar/featured.php index 695782783..8bd51ab5c 100644 --- a/mod/groups/views/default/groups/sidebar/featured.php +++ b/mod/groups/views/default/groups/sidebar/featured.php @@ -17,7 +17,7 @@ if ($featured_groups) { elgg_push_context('widgets'); $body = ''; foreach ($featured_groups as $group) { - $body .= elgg_view_entity($group, false); + $body .= elgg_view_entity($group, array('full_view' => false)); } elgg_pop_context(); diff --git a/mod/messages/pages/messages/read.php b/mod/messages/pages/messages/read.php index 5397d33e5..9bedbd08a 100644 --- a/mod/messages/pages/messages/read.php +++ b/mod/messages/pages/messages/read.php @@ -27,7 +27,7 @@ if ($page_owner->getGUID() == $message->toId) { elgg_push_breadcrumb($title); $buttons = ''; -$content = elgg_view_entity($message, true); +$content = elgg_view_entity($message, array('full_view' => true)); if ($inbox) { $form_params = array( 'id' => 'messages-reply-form', diff --git a/mod/pages/pages/pages/view.php b/mod/pages/pages/pages/view.php index b73bc985c..06064d993 100644 --- a/mod/pages/pages/pages/view.php +++ b/mod/pages/pages/pages/view.php @@ -29,7 +29,7 @@ if (elgg_instanceof($container, 'group')) { pages_prepare_parent_breadcrumbs($page); elgg_push_breadcrumb($title); -$content = elgg_view_entity($page, true); +$content = elgg_view_entity($page, array('full_view' => true)); $content .= elgg_view_comments($page); $buttons = ''; diff --git a/mod/search/views/default/search/entity.php b/mod/search/views/default/search/entity.php index 2193a70d8..e04d08836 100644 --- a/mod/search/views/default/search/entity.php +++ b/mod/search/views/default/search/entity.php @@ -27,7 +27,7 @@ if (!$icon) { } else { // display a generic icon if no owner, though there will probably be // other problems if the owner can't be found. - $icon = elgg_view_entity($entity, 'tiny'); + $icon = elgg_view_entity_icon($entity, 'tiny'); } } diff --git a/pages/entities/index.php b/pages/entities/index.php index 13aea9e5a..d3b935dc4 100644 --- a/pages/entities/index.php +++ b/pages/entities/index.php @@ -36,7 +36,7 @@ if ($entity = get_entity($guid)) { } else if ($entity instanceof ElggEntity) { $title = $entity->name; } - $area1 = elgg_view_entity($entity, true); + $area1 = elgg_view_entity($entity, array('full_view' => true)); if ($shell) { $body = elgg_view_layout('one_column', array('content' => $area1)); } else { diff --git a/views/default/page/elements/owner_block.php b/views/default/page/elements/owner_block.php index c525a38aa..fc7f0f6d2 100644 --- a/views/default/page/elements/owner_block.php +++ b/views/default/page/elements/owner_block.php @@ -15,7 +15,7 @@ $owner = elgg_get_page_owner_entity(); if ($owner instanceof ElggGroup || ($owner instanceof ElggUser && $owner->getGUID() != elgg_get_logged_in_user_guid())) { - $header = elgg_view_entity($owner, false); + $header = elgg_view_entity($owner, array('full_view' => false)); $body = elgg_view_menu('owner_block', array('entity' => $owner)); diff --git a/views/json/entities/entity_list.php b/views/json/entities/entity_list.php index b583588c3..d5b134a71 100644 --- a/views/json/entities/entity_list.php +++ b/views/json/entities/entity_list.php @@ -4,7 +4,7 @@ $entities = $vars['entities']; $full_view = $vars['full_view']; if (is_array($entities) && sizeof($entities) > 0) { - foreach($entities as $entity) { - echo elgg_view_entity($entity, $full_view); + foreach ($entities as $entity) { + echo elgg_view_entity($entity, array('full_view' => $full_view)); } } -- cgit v1.2.3 From 64dcaa8cdc75669974501eb0627a5d5b348deb29 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 26 Jun 2011 07:07:27 -0400 Subject: Fixes #3368 combining $vars with parameters for object/elements/summary view --- mod/blog/views/default/object/blog.php | 2 ++ mod/bookmarks/views/default/object/bookmarks.php | 4 +++- mod/file/views/default/object/file.php | 2 ++ mod/groups/views/default/group/default.php | 1 + mod/groups/views/default/object/groupforumtopic.php | 2 ++ mod/pages/views/default/object/page_top.php | 2 ++ mod/thewire/views/default/object/thewire.php | 1 + views/default/object/default.php | 1 + views/default/object/elements/summary.php | 6 +++--- 9 files changed, 17 insertions(+), 4 deletions(-) (limited to 'mod/pages') diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index 8456829fe..ba08180b1 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -74,6 +74,7 @@ if ($full) { 'subtitle' => $subtitle, 'tags' => $tags, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); $blog_info = elgg_view_image_block($owner_icon, $list_body); @@ -94,6 +95,7 @@ HTML; 'tags' => $tags, 'content' => $excerpt, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($owner_icon, $list_body); diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php index 38b0a721a..ca1f5d312 100644 --- a/mod/bookmarks/views/default/object/bookmarks.php +++ b/mod/bookmarks/views/default/object/bookmarks.php @@ -65,6 +65,7 @@ if ($full && !elgg_in_context('gallery')) { 'subtitle' => $subtitle, 'tags' => $tags, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); $bookmark_info = elgg_view_image_block($owner_icon, $list_body); @@ -118,7 +119,8 @@ HTML; 'tags' => $tags, 'content' => $content, ); - + $params = $params + $vars; $body = elgg_view('object/elements/summary', $params); + echo elgg_view_image_block($owner_icon, $body); } \ No newline at end of file diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php index c6ac2a429..95e190d35 100644 --- a/mod/file/views/default/object/file.php +++ b/mod/file/views/default/object/file.php @@ -76,6 +76,7 @@ if ($full && !elgg_in_context('gallery')) { 'subtitle' => $subtitle, 'tags' => $tags, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); $file_info = elgg_view_image_block($file_icon, $list_body); @@ -104,6 +105,7 @@ HTML; 'tags' => $tags, 'content' => $excerpt, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($file_icon, $list_body); diff --git a/mod/groups/views/default/group/default.php b/mod/groups/views/default/group/default.php index 2aa377813..fc91f90d0 100644 --- a/mod/groups/views/default/group/default.php +++ b/mod/groups/views/default/group/default.php @@ -31,6 +31,7 @@ if ($vars['full_view']) { 'metadata' => $metadata, 'subtitle' => $group->briefdescription, ); + $params = $params + $vars; $list_body = elgg_view('group/elements/summary', $params); echo elgg_view_image_block($icon, $list_body); diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php index 3a4decbe4..22589b84d 100644 --- a/mod/groups/views/default/object/groupforumtopic.php +++ b/mod/groups/views/default/object/groupforumtopic.php @@ -67,6 +67,7 @@ if ($full) { 'subtitle' => $subtitle, 'tags' => $tags, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); $info = elgg_view_image_block($poster_icon, $list_body); @@ -90,6 +91,7 @@ HTML; 'tags' => $tags, 'content' => $excerpt, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($poster_icon, $list_body); diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php index 2ad44e38c..8ba9fc298 100644 --- a/mod/pages/views/default/object/page_top.php +++ b/mod/pages/views/default/object/page_top.php @@ -82,6 +82,7 @@ if ($full) { 'subtitle' => $subtitle, 'tags' => $tags, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); $info = elgg_view_image_block($page_icon, $list_body); @@ -103,6 +104,7 @@ HTML; 'tags' => $tags, 'content' => $excerpt, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($page_icon, $list_body); diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php index 3ae347711..2727df60d 100644 --- a/mod/thewire/views/default/object/thewire.php +++ b/mod/thewire/views/default/object/thewire.php @@ -51,6 +51,7 @@ $params = array( 'content' => thewire_filter($post->description), 'tags' => false, ); +$params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($owner_icon, $list_body); diff --git a/views/default/object/default.php b/views/default/object/default.php index 27bb1890e..a50f19387 100644 --- a/views/default/object/default.php +++ b/views/default/object/default.php @@ -42,6 +42,7 @@ $params = array( 'subtitle' => $subtitle, 'tags' => $vars['entity']->tags, ); +$params = $params + $vars; $body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($icon, $body); diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php index 9206ada66..10cf0b148 100644 --- a/views/default/object/elements/summary.php +++ b/views/default/object/elements/summary.php @@ -3,15 +3,15 @@ * Object summary * * Sample output - * + *
  • Public
  • Like this
*

Title

*

Posted 3 hours ago by George

*

one, two

- *
Excerpt text
+ *
Excerpt text
* * @uses $vars['entity'] ElggEntity * @uses $vars['title'] Title link (optional) false = no title, '' = default - * @uses $vars['metadata'] HTML for entity metadata and actions (optional) + * @uses $vars['metadata'] HTML for entity menu and metadata (optional) * @uses $vars['subtitle'] HTML for the subtitle (optional) * @uses $vars['tags'] HTML for the tags (optional) * @uses $vars['content'] HTML for the entity content (optional) -- cgit v1.2.3 From fe1e3b3923659a4bea73e1596e0ba946f473635c Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 26 Jun 2011 15:56:35 -0400 Subject: this should update all the core pages and plugins using 'buttons' --- mod/bookmarks/pages/bookmarks/add.php | 1 - mod/bookmarks/pages/bookmarks/all.php | 2 + mod/bookmarks/pages/bookmarks/bookmarklet.php | 2 + mod/bookmarks/pages/bookmarks/edit.php | 1 - mod/bookmarks/pages/bookmarks/friends.php | 2 + mod/bookmarks/pages/bookmarks/owner.php | 2 + mod/file/pages/file/edit.php | 1 - mod/file/pages/file/friends.php | 1 + mod/file/pages/file/owner.php | 5 +- mod/file/pages/file/search.php | 1 - mod/file/pages/file/upload.php | 1 - mod/file/pages/file/view.php | 8 +-- mod/file/pages/file/world.php | 2 + mod/groups/lib/discussion.php | 9 +-- mod/groups/lib/groups.php | 64 +++++++++++++++++++--- .../views/default/groups/profile/buttons.php | 57 ------------------- mod/members/pages/members/index.php | 1 - mod/messageboard/pages/messageboard/owner.php | 1 - mod/messages/pages/messages/inbox.php | 2 + mod/messages/pages/messages/read.php | 11 ++-- mod/messages/pages/messages/send.php | 1 - mod/messages/pages/messages/sent.php | 2 + mod/messages/views/default/messages/js.php | 4 -- mod/pages/pages/pages/edit.php | 1 - mod/pages/pages/pages/friends.php | 2 + mod/pages/pages/pages/history.php | 1 - mod/pages/pages/pages/new.php | 1 - mod/pages/pages/pages/owner.php | 2 + mod/pages/pages/pages/revision.php | 1 - mod/pages/pages/pages/view.php | 12 ++-- mod/pages/pages/pages/world.php | 2 + mod/thewire/pages/thewire/everyone.php | 1 - mod/thewire/pages/thewire/friends.php | 1 - mod/thewire/pages/thewire/owner.php | 1 - mod/thewire/pages/thewire/previous.php | 1 - mod/thewire/pages/thewire/reply.php | 1 - mod/thewire/pages/thewire/tag.php | 1 - mod/thewire/pages/thewire/thread.php | 1 - pages/river.php | 1 - 39 files changed, 96 insertions(+), 115 deletions(-) delete mode 100644 mod/groups/views/default/groups/profile/buttons.php (limited to 'mod/pages') diff --git a/mod/bookmarks/pages/bookmarks/add.php b/mod/bookmarks/pages/bookmarks/add.php index c7fd3cf79..d80d4a4bc 100644 --- a/mod/bookmarks/pages/bookmarks/add.php +++ b/mod/bookmarks/pages/bookmarks/add.php @@ -15,7 +15,6 @@ $content = elgg_view_form('bookmarks/save', array(), $vars); $body = elgg_view_layout('content', array( 'filter' => '', - 'buttons' => '', 'content' => $content, 'title' => $title, )); diff --git a/mod/bookmarks/pages/bookmarks/all.php b/mod/bookmarks/pages/bookmarks/all.php index ec0f85e2b..7b3f2059c 100644 --- a/mod/bookmarks/pages/bookmarks/all.php +++ b/mod/bookmarks/pages/bookmarks/all.php @@ -8,6 +8,8 @@ elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('bookmarks')); +elgg_register_add_button(); + $offset = (int)get_input('offset', 0); $content = elgg_list_entities(array( 'type' => 'object', diff --git a/mod/bookmarks/pages/bookmarks/bookmarklet.php b/mod/bookmarks/pages/bookmarks/bookmarklet.php index 99866e385..510229339 100644 --- a/mod/bookmarks/pages/bookmarks/bookmarklet.php +++ b/mod/bookmarks/pages/bookmarks/bookmarklet.php @@ -25,6 +25,8 @@ if ($page_owner instanceof ElggGroup) { elgg_push_breadcrumb($title); +elgg_register_add_button(); + $content = elgg_view("bookmarks/bookmarklet"); $body = elgg_view_layout('content', array( diff --git a/mod/bookmarks/pages/bookmarks/edit.php b/mod/bookmarks/pages/bookmarks/edit.php index 24513a960..93b143c36 100644 --- a/mod/bookmarks/pages/bookmarks/edit.php +++ b/mod/bookmarks/pages/bookmarks/edit.php @@ -23,7 +23,6 @@ $content = elgg_view_form('bookmarks/save', array(), $vars); $body = elgg_view_layout('content', array( 'filter' => '', - 'buttons' => '', 'content' => $content, 'title' => $title, )); diff --git a/mod/bookmarks/pages/bookmarks/friends.php b/mod/bookmarks/pages/bookmarks/friends.php index 6e3f77cf6..ef5f078f5 100644 --- a/mod/bookmarks/pages/bookmarks/friends.php +++ b/mod/bookmarks/pages/bookmarks/friends.php @@ -10,6 +10,8 @@ $owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb($owner->name, "bookmarks/owner/$owner->username"); elgg_push_breadcrumb(elgg_echo('friends')); +elgg_register_add_button(); + $title = elgg_echo('bookmarks:friends'); $content = list_user_friends_objects($owner->guid, 'bookmarks', 10, false); diff --git a/mod/bookmarks/pages/bookmarks/owner.php b/mod/bookmarks/pages/bookmarks/owner.php index f12d1d83f..46a22080d 100644 --- a/mod/bookmarks/pages/bookmarks/owner.php +++ b/mod/bookmarks/pages/bookmarks/owner.php @@ -9,6 +9,8 @@ $page_owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb($page_owner->name); +elgg_register_add_button(); + $offset = (int)get_input('offset', 0); $content .= elgg_list_entities(array( 'type' => 'object', diff --git a/mod/file/pages/file/edit.php b/mod/file/pages/file/edit.php index 66529af0b..b396c6e9b 100644 --- a/mod/file/pages/file/edit.php +++ b/mod/file/pages/file/edit.php @@ -35,7 +35,6 @@ $body = elgg_view_layout('content', array( 'content' => $content, 'title' => $title, 'filter' => '', - 'buttons' => '', )); echo elgg_view_page($title, $body); diff --git a/mod/file/pages/file/friends.php b/mod/file/pages/file/friends.php index fc23e1d1e..7bde42962 100644 --- a/mod/file/pages/file/friends.php +++ b/mod/file/pages/file/friends.php @@ -11,6 +11,7 @@ elgg_push_breadcrumb(elgg_echo('file'), "file/all"); elgg_push_breadcrumb($owner->name, "file/owner/$owner->username"); elgg_push_breadcrumb(elgg_echo('friends')); +elgg_register_add_button(); $title = elgg_echo("file:friends"); diff --git a/mod/file/pages/file/owner.php b/mod/file/pages/file/owner.php index a01e9cd22..2244de095 100644 --- a/mod/file/pages/file/owner.php +++ b/mod/file/pages/file/owner.php @@ -13,6 +13,8 @@ $owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb(elgg_echo('file'), "file/all"); elgg_push_breadcrumb($owner->name); +elgg_register_add_button(); + $params = array(); if ($owner->guid == elgg_get_logged_in_user_guid()) { @@ -20,9 +22,8 @@ if ($owner->guid == elgg_get_logged_in_user_guid()) { $params['filter_context'] = 'mine'; } else if (elgg_instanceof($owner, 'user')) { // someone else's files - // do not show button or select a tab when viewing someone else's posts + // do not show select a tab when viewing someone else's posts $params['filter_context'] = 'none'; - $params['buttons'] = ''; } else { // group files $params['filter'] = ''; diff --git a/mod/file/pages/file/search.php b/mod/file/pages/file/search.php index 77c92f444..cffe67e0c 100644 --- a/mod/file/pages/file/search.php +++ b/mod/file/pages/file/search.php @@ -86,7 +86,6 @@ if ($tag) { $body = elgg_view_layout('content', array( 'filter' => '', - 'buttons' => '', 'content' => $content, 'title' => $title, 'sidebar' => $sidebar, diff --git a/mod/file/pages/file/upload.php b/mod/file/pages/file/upload.php index d97cc038d..3aa25b6db 100644 --- a/mod/file/pages/file/upload.php +++ b/mod/file/pages/file/upload.php @@ -32,7 +32,6 @@ $body = elgg_view_layout('content', array( 'content' => $content, 'title' => $title, 'filter' => '', - 'buttons' => '', )); echo elgg_view_page($title, $body); diff --git a/mod/file/pages/file/view.php b/mod/file/pages/file/view.php index 4b395d20d..50c55a74f 100644 --- a/mod/file/pages/file/view.php +++ b/mod/file/pages/file/view.php @@ -25,17 +25,17 @@ elgg_push_breadcrumb($title); $content = elgg_view_entity($file, array('full_view' => true)); $content .= elgg_view_comments($file); -$download = elgg_view('output/url', array( +elgg_register_menu_item('title', array( + 'name' => 'download', + 'text' => elgg_echo('file:download'), 'href' => "mod/file/download.php?file_guid=$file->guid", - 'text' => elgg_echo("file:download"), - 'class' => 'elgg-button elgg-button-action float-alt', + 'link_class' => 'elgg-button elgg-button-action', )); $body = elgg_view_layout('content', array( 'content' => $content, 'title' => $title, 'filter' => '', - 'buttons' => $download, )); echo elgg_view_page($title, $body); diff --git a/mod/file/pages/file/world.php b/mod/file/pages/file/world.php index bfe965084..560743bed 100644 --- a/mod/file/pages/file/world.php +++ b/mod/file/pages/file/world.php @@ -7,6 +7,8 @@ elgg_push_breadcrumb(elgg_echo('file')); +elgg_register_add_button(); + $limit = get_input("limit", 10); $title = elgg_echo('file:all'); diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 342115c81..52df7e18d 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -23,7 +23,6 @@ function discussion_handle_all_page() { 'content' => $content, 'title' => elgg_echo('discussion:latest'), 'filter' => '', - 'buttons' => '', ); $body = elgg_view_layout('content', $params); @@ -46,6 +45,8 @@ function discussion_handle_list_page($guid) { } elgg_push_breadcrumb($group->name); + elgg_register_add_button(); + group_gatekeeper(); $title = elgg_echo('item:object:groupforumtopic'); @@ -67,10 +68,6 @@ function discussion_handle_list_page($guid) { 'filter' => '', ); - if (!$group->canWriteToContainer()) { - $params['buttons'] = ''; - } - $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); @@ -131,7 +128,6 @@ function discussion_handle_edit_page($type, $guid) { 'content' => $content, 'title' => $title, 'filter' => '', - 'buttons' => '', ); $body = elgg_view_layout('content', $params); @@ -190,7 +186,6 @@ function discussion_handle_view_page($guid) { 'content' => $content, 'title' => $topic->title, 'filter' => '', - 'buttons' => '', ); $body = elgg_view_layout('content', $params); diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index c3986e53c..c47ad0ab2 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -12,6 +12,8 @@ function groups_handle_all_page() { elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('groups')); + elgg_register_add_button(); + $selected_tab = get_input('filter', 'newest'); switch ($selected_tab) { @@ -81,7 +83,6 @@ function groups_search_page() { 'content' => $content, 'sidebar' => $sidebar, 'filter' => false, - 'buttons' => false, 'title' => $title, ); $body = elgg_view_layout('content', $params); @@ -99,6 +100,8 @@ function groups_handle_owned_page() { $title = elgg_echo('groups:owned'); elgg_push_breadcrumb($title); + elgg_register_add_button(); + $content = elgg_list_entities(array( 'type' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), @@ -125,6 +128,8 @@ function groups_handle_mine_page() { $title = elgg_echo('groups:yours'); elgg_push_breadcrumb($title); + elgg_register_add_button(); + $content = elgg_list_entities_from_relationship_count(array( 'type' => 'group', 'relationship' => 'member', @@ -175,7 +180,6 @@ function groups_handle_edit_page($page, $guid = 0) { 'content' => $content, 'title' => $title, 'filter' => '', - 'buttons' => '', ); $body = elgg_view_layout('content', $params); @@ -201,7 +205,6 @@ function groups_handle_invitations_page() { 'content' => $content, 'title' => $title, 'filter' => '', - 'buttons' => '', ); $body = elgg_view_layout('content', $params); @@ -234,11 +237,12 @@ function groups_handle_profile_page($guid) { $sidebar = ''; } + groups_register_profile_buttons($group); + $params = array( 'content' => $content, 'sidebar' => $sidebar, 'title' => $group->name, - 'buttons' => elgg_view('groups/profile/buttons', array('entity' => $group)), 'filter' => '', ); $body = elgg_view_layout('content', $params); @@ -280,7 +284,6 @@ function groups_handle_activity_page($guid) { $params = array( 'content' => $content, 'title' => $title, - 'buttons' => '', 'filter' => '', ); $body = elgg_view_layout('content', $params); @@ -320,7 +323,6 @@ function groups_handle_members_page($guid) { $params = array( 'content' => $content, 'title' => $title, - 'buttons' => '', 'filter' => '', ); $body = elgg_view_layout('content', $params); @@ -359,7 +361,6 @@ function groups_handle_invite_page($guid) { $params = array( 'content' => $content, 'title' => $title, - 'buttons' => '', 'filter' => '', ); $body = elgg_view_layout('content', $params); @@ -403,10 +404,57 @@ function groups_handle_requests_page($guid) { $params = array( 'content' => $content, 'title' => $title, - 'buttons' => '', 'filter' => '', ); $body = elgg_view_layout('content', $params); echo elgg_view_page($title, $body); } + +/** + * Registers the buttons for title area of the group profile page + * + * @param ElggGroup $group + */ +function groups_register_profile_buttons($group) { + + $actions = array(); + + // group owners + if ($group->canEdit()) { + // edit and invite + $url = elgg_get_site_url() . "groups/edit/{$group->getGUID()}"; + $actions[$url] = elgg_echo('groups:edit'); + $url = elgg_get_site_url() . "groups/invite/{$group->getGUID()}"; + $actions[$url] = elgg_echo('groups:invite'); + } + + // group members + if ($group->isMember($user)) { + // leave + $url = elgg_get_site_url() . "action/groups/leave?group_guid={$group->getGUID()}"; + $url = elgg_add_action_tokens_to_url($url); + $actions[$url] = 'groups:leave'; + } else { + // join - admins can always join. + $url = elgg_get_site_url() . "action/groups/join?group_guid={$group->getGUID()}"; + $url = elgg_add_action_tokens_to_url($url); + if ($group->isPublicMembership() || $group->canEdit()) { + $actions[$url] = 'groups:join'; + } else { + // request membership + $actions[$url] = 'groups:joinrequest'; + } + } + + if ($actions) { + foreach ($actions as $url => $text) { + elgg_register_menu_item('title', array( + 'name' => $text, + 'href' => $url, + 'text' => elgg_echo($text), + 'link_class' => 'elgg-button elgg-button-action', + )); + } + } +} diff --git a/mod/groups/views/default/groups/profile/buttons.php b/mod/groups/views/default/groups/profile/buttons.php deleted file mode 100644 index 55e99f59c..000000000 --- a/mod/groups/views/default/groups/profile/buttons.php +++ /dev/null @@ -1,57 +0,0 @@ -canEdit()) { - // edit and invite - $url = elgg_get_site_url() . "groups/edit/{$vars['entity']->getGUID()}"; - $actions[$url] = elgg_echo('groups:edit'); - $url = elgg_get_site_url() . "groups/invite/{$vars['entity']->getGUID()}"; - $actions[$url] = elgg_echo('groups:invite'); -} - -// group members -if ($vars['entity']->isMember($user)) { - // leave - $url = elgg_get_site_url() . "action/groups/leave?group_guid={$vars['entity']->getGUID()}"; - $url = elgg_add_action_tokens_to_url($url); - $actions[$url] = elgg_echo('groups:leave'); -} else { - // join - admins can always join. - $url = elgg_get_site_url() . "action/groups/join?group_guid={$vars['entity']->getGUID()}"; - $url = elgg_add_action_tokens_to_url($url); - if ($vars['entity']->isPublicMembership() || $vars['entity']->canEdit()) { - $actions[$url] = elgg_echo('groups:join'); - } else { - // request membership - $actions[$url] = elgg_echo('groups:joinrequest'); - } -} - -// display action buttons -if ($actions) { - echo '
    '; - foreach ($actions as $url => $action) { - echo '
  • '; - echo elgg_view('output/url', array( - 'text' => $action, - 'href' => $url, - 'class' => 'elgg-button elgg-button-action', - )); - echo '
  • '; - } - echo '
'; -} diff --git a/mod/members/pages/members/index.php b/mod/members/pages/members/index.php index 4f23c6322..330ef66bf 100644 --- a/mod/members/pages/members/index.php +++ b/mod/members/pages/members/index.php @@ -28,7 +28,6 @@ $params = array( 'content' => $content, 'sidebar' => elgg_view('members/sidebar'), 'title' => $title . " ($num_members)", - 'buttons' => '', 'filter_override' => elgg_view('members/nav', array('selected' => $vars['page'])), ); diff --git a/mod/messageboard/pages/messageboard/owner.php b/mod/messageboard/pages/messageboard/owner.php index 241ad64f2..2c854d4f3 100644 --- a/mod/messageboard/pages/messageboard/owner.php +++ b/mod/messageboard/pages/messageboard/owner.php @@ -48,7 +48,6 @@ if (!$content) { $vars = array( 'filter' => false, - 'buttons' => false, 'content' => $content, 'title' => $title, 'reverse_order_by' => true diff --git a/mod/messages/pages/messages/inbox.php b/mod/messages/pages/messages/inbox.php index 4b2d11bbf..96712a193 100644 --- a/mod/messages/pages/messages/inbox.php +++ b/mod/messages/pages/messages/inbox.php @@ -15,6 +15,8 @@ if (!$page_owner) { elgg_push_breadcrumb(elgg_echo('messages:inbox')); +elgg_register_add_button(); + $title = elgg_echo('messages:user', array($page_owner->name)); $list = elgg_list_entities_from_metadata(array( diff --git a/mod/messages/pages/messages/read.php b/mod/messages/pages/messages/read.php index 9bedbd08a..310485ee2 100644 --- a/mod/messages/pages/messages/read.php +++ b/mod/messages/pages/messages/read.php @@ -26,7 +26,6 @@ if ($page_owner->getGUID() == $message->toId) { } elgg_push_breadcrumb($title); -$buttons = ''; $content = elgg_view_entity($message, array('full_view' => true)); if ($inbox) { $form_params = array( @@ -38,12 +37,13 @@ if ($inbox) { $content .= elgg_view_form('messages/reply', $form_params, $body_params); if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) { - $buttons = elgg_view('output/url', array( + elgg_register_menu_item('title', array( + 'name' => 'reply', + 'href' => '#messages-reply-form', 'text' => elgg_echo('messages:answer'), - 'class' => 'elgg-button elgg-button-action', - 'id' => 'messages-show-reply', + 'link_class' => 'elgg-button elgg-button-action', + 'rel' => 'toggle', )); - $buttons = "
  • $buttons
"; } } @@ -51,7 +51,6 @@ $body = elgg_view_layout('content', array( 'content' => $content, 'title' => $title, 'filter' => '', - 'buttons' => $buttons, )); echo elgg_view_page($title, $body); diff --git a/mod/messages/pages/messages/send.php b/mod/messages/pages/messages/send.php index 884c20cca..02d430df7 100644 --- a/mod/messages/pages/messages/send.php +++ b/mod/messages/pages/messages/send.php @@ -22,7 +22,6 @@ $body = elgg_view_layout('content', array( 'content' => $content, 'title' => $title, 'filter' => '', - 'buttons' => '', )); echo elgg_view_page($title, $body); diff --git a/mod/messages/pages/messages/sent.php b/mod/messages/pages/messages/sent.php index f884643e0..edf2b29fb 100644 --- a/mod/messages/pages/messages/sent.php +++ b/mod/messages/pages/messages/sent.php @@ -15,6 +15,8 @@ if (!$page_owner) { elgg_push_breadcrumb(elgg_echo('messages:sent')); +elgg_register_add_button(); + $title = elgg_echo('messages:sentmessages', array($page_owner->name)); $list = elgg_list_entities_from_metadata(array( diff --git a/mod/messages/views/default/messages/js.php b/mod/messages/views/default/messages/js.php index 5f6b476e7..39f93e645 100644 --- a/mod/messages/views/default/messages/js.php +++ b/mod/messages/views/default/messages/js.php @@ -3,8 +3,4 @@ $(function() { $("#messages-toggle").click(function() { $('input[type=checkbox]').click(); }); - - $("#messages-show-reply").click(function() { - $('#messages-reply-form').slideToggle('medium'); - }); }); diff --git a/mod/pages/pages/pages/edit.php b/mod/pages/pages/pages/edit.php index 8e530084b..e6c2ea015 100644 --- a/mod/pages/pages/pages/edit.php +++ b/mod/pages/pages/pages/edit.php @@ -34,7 +34,6 @@ if ($page->canEdit()) { $body = elgg_view_layout('content', array( 'filter' => '', - 'buttons' => '', 'content' => $content, 'title' => $title, )); diff --git a/mod/pages/pages/pages/friends.php b/mod/pages/pages/pages/friends.php index 13aa28578..88f26c45d 100644 --- a/mod/pages/pages/pages/friends.php +++ b/mod/pages/pages/pages/friends.php @@ -13,6 +13,8 @@ if (!$owner) { elgg_push_breadcrumb($owner->name, "pages/owner/$owner->username"); elgg_push_breadcrumb(elgg_echo('friends')); +elgg_register_add_button(); + $title = elgg_echo('pages:friends'); $content = list_user_friends_objects($owner->guid, 'page_top', 10, false); diff --git a/mod/pages/pages/pages/history.php b/mod/pages/pages/pages/history.php index a7ef57b6b..a63b37a7a 100644 --- a/mod/pages/pages/pages/history.php +++ b/mod/pages/pages/pages/history.php @@ -34,7 +34,6 @@ $content = list_annotations($page_guid, 'page', 20, false); $body = elgg_view_layout('content', array( 'filter' => '', - 'buttons' => '', 'content' => $content, 'title' => $title, 'sidebar' => elgg_view('pages/sidebar/navigation', array('page' => $page)), diff --git a/mod/pages/pages/pages/new.php b/mod/pages/pages/pages/new.php index 42a8e04e1..7cab2facb 100644 --- a/mod/pages/pages/pages/new.php +++ b/mod/pages/pages/pages/new.php @@ -30,7 +30,6 @@ $content = elgg_view_form('pages/edit', array(), $vars); $body = elgg_view_layout('content', array( 'filter' => '', - 'buttons' => '', 'content' => $content, 'title' => $title, )); diff --git a/mod/pages/pages/pages/owner.php b/mod/pages/pages/pages/owner.php index c1169085f..312b56a54 100644 --- a/mod/pages/pages/pages/owner.php +++ b/mod/pages/pages/pages/owner.php @@ -17,6 +17,8 @@ $title = elgg_echo('pages:owner', array($owner->name)); elgg_push_breadcrumb($owner->name); +elgg_register_add_button(); + $content = elgg_list_entities(array( 'types' => 'object', 'subtypes' => 'page_top', diff --git a/mod/pages/pages/pages/revision.php b/mod/pages/pages/pages/revision.php index 83d72286c..66a36e4e7 100644 --- a/mod/pages/pages/pages/revision.php +++ b/mod/pages/pages/pages/revision.php @@ -45,7 +45,6 @@ $sidebar = elgg_view('pages/sidebar/history', array('page' => $page)); $body = elgg_view_layout('content', array( 'filter' => '', - 'buttons' => '', 'content' => $content, 'title' => $title, 'sidebar' => $sidebar, diff --git a/mod/pages/pages/pages/view.php b/mod/pages/pages/pages/view.php index 06064d993..5dfb76b55 100644 --- a/mod/pages/pages/pages/view.php +++ b/mod/pages/pages/pages/view.php @@ -32,20 +32,18 @@ elgg_push_breadcrumb($title); $content = elgg_view_entity($page, array('full_view' => true)); $content .= elgg_view_comments($page); -$buttons = ''; if (elgg_get_logged_in_user_guid() == $page->getOwnerGuid()) { $url = "pages/add/$page->guid"; - $buttons = elgg_view('output/url', array( - 'text' => elgg_echo('pages:newchild'), + elgg_register_menu_item('title', array( + 'name' => 'subpage', 'href' => $url, - 'class' => 'elgg-button elgg-button-action', - )); - $buttons = "
  • $buttons
"; + 'text' => elgg_echo('pages:newchild'), + 'link_class' => 'elgg-button elgg-button-action', + )); } $body = elgg_view_layout('content', array( 'filter' => '', - 'buttons' => $buttons, 'content' => $content, 'title' => $title, 'sidebar' => elgg_view('pages/sidebar/navigation'), diff --git a/mod/pages/pages/pages/world.php b/mod/pages/pages/pages/world.php index 267670144..9237a820e 100644 --- a/mod/pages/pages/pages/world.php +++ b/mod/pages/pages/pages/world.php @@ -10,6 +10,8 @@ $title = elgg_echo('pages:all'); elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('pages')); +elgg_register_add_button(); + $content = elgg_list_entities(array( 'types' => 'object', 'subtypes' => 'page_top', diff --git a/mod/thewire/pages/thewire/everyone.php b/mod/thewire/pages/thewire/everyone.php index e3d38ace5..26586c71c 100644 --- a/mod/thewire/pages/thewire/everyone.php +++ b/mod/thewire/pages/thewire/everyone.php @@ -23,7 +23,6 @@ $body = elgg_view_layout('content', array( 'filter_context' => 'all', 'content' => $content, 'title' => $title, - 'buttons' => false, 'sidebar' => elgg_view('thewire/sidebar'), )); diff --git a/mod/thewire/pages/thewire/friends.php b/mod/thewire/pages/thewire/friends.php index ab452aa55..0dfdcada9 100644 --- a/mod/thewire/pages/thewire/friends.php +++ b/mod/thewire/pages/thewire/friends.php @@ -17,7 +17,6 @@ $body = elgg_view_layout('content', array( 'filter_context' => 'friends', 'content' => $content, 'title' => $title, - 'buttons' => false, )); echo elgg_view_page($title, $body); diff --git a/mod/thewire/pages/thewire/owner.php b/mod/thewire/pages/thewire/owner.php index d61307990..6a16ef51d 100644 --- a/mod/thewire/pages/thewire/owner.php +++ b/mod/thewire/pages/thewire/owner.php @@ -27,7 +27,6 @@ $body = elgg_view_layout('content', array( 'filter_context' => 'mine', 'content' => $content, 'title' => $title, - 'buttons' => false, 'sidebar' => elgg_view('thewire/sidebar'), )); diff --git a/mod/thewire/pages/thewire/previous.php b/mod/thewire/pages/thewire/previous.php index 45c1e1095..a3f1cb01c 100644 --- a/mod/thewire/pages/thewire/previous.php +++ b/mod/thewire/pages/thewire/previous.php @@ -15,7 +15,6 @@ $body = elgg_view_layout('content', array( 'filter' => false, 'content' => $body, 'title' => $title, - 'buttons' => false, )); echo elgg_view_page($title, $body); \ No newline at end of file diff --git a/mod/thewire/pages/thewire/reply.php b/mod/thewire/pages/thewire/reply.php index 826d513b6..a3d3ea017 100644 --- a/mod/thewire/pages/thewire/reply.php +++ b/mod/thewire/pages/thewire/reply.php @@ -22,7 +22,6 @@ $body = elgg_view_layout('content', array( 'filter' => false, 'content' => $content, 'title' => $title, - 'buttons' => false, )); echo elgg_view_page($title, $body); diff --git a/mod/thewire/pages/thewire/tag.php b/mod/thewire/pages/thewire/tag.php index 53f9e9db9..1c88030ec 100644 --- a/mod/thewire/pages/thewire/tag.php +++ b/mod/thewire/pages/thewire/tag.php @@ -30,7 +30,6 @@ $body = elgg_view_layout('content', array( 'filter' => false, 'content' => $content, 'title' => $title, - 'buttons' => false, )); echo elgg_view_page($title, $body); diff --git a/mod/thewire/pages/thewire/thread.php b/mod/thewire/pages/thewire/thread.php index 5c32a8400..ec2709430 100644 --- a/mod/thewire/pages/thewire/thread.php +++ b/mod/thewire/pages/thewire/thread.php @@ -22,7 +22,6 @@ $body = elgg_view_layout('content', array( 'filter' => false, 'content' => $content, 'title' => $title, - 'buttons' => false, )); echo elgg_view_page($title, $body); diff --git a/pages/river.php b/pages/river.php index 7f2fce3d6..fa559d59b 100644 --- a/pages/river.php +++ b/pages/river.php @@ -49,7 +49,6 @@ $sidebar = elgg_view('core/river/sidebar'); $params = array( 'content' => $content . $activity, 'sidebar' => $sidebar, - 'buttons' => '', 'filter_context' => $page_filter, 'class' => 'elgg-river-layout', ); -- cgit v1.2.3 From e35b3ffb512dc6b1af2aacb7bd92d85854a42868 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 28 Jun 2011 06:38:34 -0400 Subject: Fixes #3407 added elgg-foot to plugin forms --- mod/bookmarks/views/default/forms/bookmarks/save.php | 2 +- .../views/default/forms/developers/settings.php | 2 +- mod/externalpages/views/default/forms/expages/edit.php | 3 ++- mod/file/views/default/forms/file/upload.php | 2 +- mod/groups/views/default/forms/discussion/reply/save.php | 16 ++++++++++------ mod/groups/views/default/forms/discussion/save.php | 2 +- .../views/default/forms/invitefriends/invite.php | 2 +- mod/messages/views/default/forms/messages/process.php | 2 +- mod/messages/views/default/forms/messages/reply.php | 2 +- mod/messages/views/default/forms/messages/send.php | 2 +- .../default/forms/notificationsettings/groupsave.php | 2 +- mod/pages/views/default/forms/pages/edit.php | 2 +- .../views/default/forms/reportedcontent/add.php | 2 +- mod/thewire/views/default/forms/thewire/add.php | 2 +- 14 files changed, 24 insertions(+), 19 deletions(-) (limited to 'mod/pages') diff --git a/mod/bookmarks/views/default/forms/bookmarks/save.php b/mod/bookmarks/views/default/forms/bookmarks/save.php index 886283202..7d064a55b 100644 --- a/mod/bookmarks/views/default/forms/bookmarks/save.php +++ b/mod/bookmarks/views/default/forms/bookmarks/save.php @@ -44,7 +44,7 @@ if ($categories) {
'access_id', 'value' => $access_id)); ?> -
+
'container_guid', 'value' => $container_guid)); diff --git a/mod/developers/views/default/forms/developers/settings.php b/mod/developers/views/default/forms/developers/settings.php index a442ca0ce..584f6af30 100644 --- a/mod/developers/views/default/forms/developers/settings.php +++ b/mod/developers/views/default/forms/developers/settings.php @@ -29,6 +29,6 @@ foreach ($vars['data'] as $name => $info) { echo '
'; } -echo '
'; +echo '
'; echo elgg_view('input/submit', array('value' => elgg_echo('save'))); echo '
'; diff --git a/mod/externalpages/views/default/forms/expages/edit.php b/mod/externalpages/views/default/forms/expages/edit.php index b0060477e..ca83ea7df 100644 --- a/mod/externalpages/views/default/forms/expages/edit.php +++ b/mod/externalpages/views/default/forms/expages/edit.php @@ -49,9 +49,10 @@ echo <<$external_page_title $input_area
+
$hidden_value $hidden_type $submit_input - +
EOT; diff --git a/mod/file/views/default/forms/file/upload.php b/mod/file/views/default/forms/file/upload.php index 98b7d9f05..f637a419e 100644 --- a/mod/file/views/default/forms/file/upload.php +++ b/mod/file/views/default/forms/file/upload.php @@ -53,7 +53,7 @@ if ($categories) {
'access_id', 'value' => $access_id)); ?>
-
+
'container_guid', 'value' => $container_guid)); diff --git a/mod/groups/views/default/forms/discussion/reply/save.php b/mod/groups/views/default/forms/discussion/reply/save.php index be258b8fe..40ea07303 100644 --- a/mod/groups/views/default/forms/discussion/reply/save.php +++ b/mod/groups/views/default/forms/discussion/reply/save.php @@ -1,6 +1,6 @@ 'entity_guid', + 'value' => $vars['entity']->getGUID(), + )); + $inline = elgg_extract('inline', $vars, false); if ($inline) { echo elgg_view('input/text', array('name' => 'group_topic_post')); echo elgg_view('input/submit', array('value' => elgg_echo('reply'))); @@ -19,11 +23,11 @@ if (isset($vars['entity']) && elgg_is_logged_in()) { 'group_topic_post')); ?>
+
elgg_echo('reply'))); +?> +
+ 'entity_guid', - 'value' => $vars['entity']->getGUID(), - )); } diff --git a/mod/groups/views/default/forms/discussion/save.php b/mod/groups/views/default/forms/discussion/save.php index 5d50d5c91..a6582ede7 100644 --- a/mod/groups/views/default/forms/discussion/save.php +++ b/mod/groups/views/default/forms/discussion/save.php @@ -42,7 +42,7 @@ $guid = elgg_extract('guid', $vars, null);
'access_id', 'value' => $access_id)); ?>
-
+
'container_guid', 'value' => $container_guid)); diff --git a/mod/invitefriends/views/default/forms/invitefriends/invite.php b/mod/invitefriends/views/default/forms/invitefriends/invite.php index 5af8b5da0..0d7f5d9f2 100644 --- a/mod/invitefriends/views/default/forms/invitefriends/invite.php +++ b/mod/invitefriends/views/default/forms/invitefriends/invite.php @@ -27,7 +27,7 @@ if (elgg_get_config('allow_registration')) {
HTML; - echo '
'; + echo '
'; echo elgg_view('input/submit', array('value' => elgg_echo('send'))); echo '
'; } else { diff --git a/mod/messages/views/default/forms/messages/process.php b/mod/messages/views/default/forms/messages/process.php index 01fe0f431..7e182b8f0 100644 --- a/mod/messages/views/default/forms/messages/process.php +++ b/mod/messages/views/default/forms/messages/process.php @@ -17,7 +17,7 @@ echo '
'; echo $messages; echo '
'; -echo '
'; +echo '
'; echo elgg_view('input/submit', array( 'value' => elgg_echo('delete'), 'name' => 'delete', diff --git a/mod/messages/views/default/forms/messages/reply.php b/mod/messages/views/default/forms/messages/reply.php index e8a27f03e..9f3f4b57e 100644 --- a/mod/messages/views/default/forms/messages/reply.php +++ b/mod/messages/views/default/forms/messages/reply.php @@ -33,6 +33,6 @@ echo elgg_view('input/hidden', array( )); ?>
-
+
elgg_echo('messages:send'))); ?>
\ No newline at end of file diff --git a/mod/messages/views/default/forms/messages/send.php b/mod/messages/views/default/forms/messages/send.php index c0a095993..b0638e0c0 100644 --- a/mod/messages/views/default/forms/messages/send.php +++ b/mod/messages/views/default/forms/messages/send.php @@ -49,6 +49,6 @@ $recipient_drop_down = elgg_view('input/dropdown', array( )); ?>
-
+
elgg_echo('messages:send'))); ?>
diff --git a/mod/notifications/views/default/forms/notificationsettings/groupsave.php b/mod/notifications/views/default/forms/notificationsettings/groupsave.php index 2bf0d9628..61b94ff8b 100644 --- a/mod/notifications/views/default/forms/notificationsettings/groupsave.php +++ b/mod/notifications/views/default/forms/notificationsettings/groupsave.php @@ -96,7 +96,7 @@ END; '; + echo '
'; echo elgg_view('input/submit', array('value' => elgg_echo('save'))); echo '
'; diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php index 5186da11c..c29de1085 100644 --- a/mod/pages/views/default/forms/pages/edit.php +++ b/mod/pages/views/default/forms/pages/edit.php @@ -30,7 +30,7 @@ if (!empty($cats)) { } -echo '
'; +echo '
'; if ($vars['guid']) { echo elgg_view('input/hidden', array( 'name' => 'page_guid', diff --git a/mod/reportedcontent/views/default/forms/reportedcontent/add.php b/mod/reportedcontent/views/default/forms/reportedcontent/add.php index 0b1716a35..f9986849d 100644 --- a/mod/reportedcontent/views/default/forms/reportedcontent/add.php +++ b/mod/reportedcontent/views/default/forms/reportedcontent/add.php @@ -48,7 +48,7 @@ $owner = elgg_get_logged_in_user_entity(); )); ?>
-
+
elgg_echo('reportedcontent:report'), diff --git a/mod/thewire/views/default/forms/thewire/add.php b/mod/thewire/views/default/forms/thewire/add.php index 67585b0df..743294dcc 100644 --- a/mod/thewire/views/default/forms/thewire/add.php +++ b/mod/thewire/views/default/forms/thewire/add.php @@ -25,7 +25,7 @@ if ($post) {
140
-
+
Date: Wed, 6 Jul 2011 06:51:53 -0400 Subject: changed new convenience function from elgg_register_add_button() to elgg_register_title_button() --- engine/lib/navigation.php | 17 ++++++++++------- mod/blog/lib/blog.php | 4 ++-- mod/bookmarks/pages/bookmarks/all.php | 2 +- mod/bookmarks/pages/bookmarks/friends.php | 2 +- mod/bookmarks/pages/bookmarks/owner.php | 2 +- mod/file/pages/file/friends.php | 2 +- mod/file/pages/file/owner.php | 2 +- mod/file/pages/file/world.php | 2 +- mod/groups/lib/discussion.php | 2 +- mod/groups/lib/groups.php | 6 +++--- mod/messages/pages/messages/inbox.php | 2 +- mod/messages/pages/messages/sent.php | 2 +- mod/pages/pages/pages/friends.php | 2 +- mod/pages/pages/pages/owner.php | 2 +- mod/pages/pages/pages/world.php | 2 +- 15 files changed, 27 insertions(+), 24 deletions(-) (limited to 'mod/pages') diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index cdf3d0f67..1305ee3de 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -154,17 +154,20 @@ function elgg_is_menu_item_registered($menu_name, $item_name) { } /** - * Convenience function for registering an add content button to title menu + * Convenience function for registering a button to title menu * - * The add URL must be $handler/add/$guid where $guid is the guid of the page owner. - * The label of the button is "$handler:add" so that must be defined in a + * The URL must be $handler/$name/$guid where $guid is the guid of the page owner. + * The label of the button is "$handler:$name" so that must be defined in a * language file. * + * This is used primarily to support adding an add content button + * * @param string $handler The handler to use or null to autodetect from context + * @param string $name Name of the button * @return void * @since 1.8.0 */ -function elgg_register_add_button($handler = null) { +function elgg_register_title_button($handler = null, $name = 'add') { if (elgg_is_logged_in()) { if (!$handler) { @@ -179,9 +182,9 @@ function elgg_register_add_button($handler = null) { if ($owner && $owner->canWriteToContainer()) { $guid = $owner->getGUID(); elgg_register_menu_item('title', array( - 'name' => 'add', - 'href' => "$handler/add/$guid", - 'text' => elgg_echo("$handler:add"), + 'name' => $name, + 'href' => "$handler/$name/$guid", + 'text' => elgg_echo("$handler:$name"), 'link_class' => 'elgg-button elgg-button-action', )); } diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 0f81597eb..b7b1a2baa 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -92,7 +92,7 @@ function blog_get_page_content_list($container_guid = NULL) { elgg_push_breadcrumb(elgg_echo('blog:blogs')); } - elgg_register_add_button(); + elgg_register_title_button(); // show all posts for admin or users looking at their own blogs // show only published posts for other users. @@ -131,7 +131,7 @@ function blog_get_page_content_friends($user_guid) { elgg_push_breadcrumb($crumbs_title, "blog/owner/{$user->username}"); elgg_push_breadcrumb(elgg_echo('friends')); - elgg_register_add_button(); + elgg_register_title_button(); if (!$friends = get_user_friends($user_guid, ELGG_ENTITIES_ANY_VALUE, 0)) { $return['content'] .= elgg_echo('friends:none:you'); diff --git a/mod/bookmarks/pages/bookmarks/all.php b/mod/bookmarks/pages/bookmarks/all.php index 7b3f2059c..d9ac2767f 100644 --- a/mod/bookmarks/pages/bookmarks/all.php +++ b/mod/bookmarks/pages/bookmarks/all.php @@ -8,7 +8,7 @@ elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('bookmarks')); -elgg_register_add_button(); +elgg_register_title_button(); $offset = (int)get_input('offset', 0); $content = elgg_list_entities(array( diff --git a/mod/bookmarks/pages/bookmarks/friends.php b/mod/bookmarks/pages/bookmarks/friends.php index ef5f078f5..3491090a5 100644 --- a/mod/bookmarks/pages/bookmarks/friends.php +++ b/mod/bookmarks/pages/bookmarks/friends.php @@ -10,7 +10,7 @@ $owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb($owner->name, "bookmarks/owner/$owner->username"); elgg_push_breadcrumb(elgg_echo('friends')); -elgg_register_add_button(); +elgg_register_title_button(); $title = elgg_echo('bookmarks:friends'); diff --git a/mod/bookmarks/pages/bookmarks/owner.php b/mod/bookmarks/pages/bookmarks/owner.php index 46a22080d..679c986be 100644 --- a/mod/bookmarks/pages/bookmarks/owner.php +++ b/mod/bookmarks/pages/bookmarks/owner.php @@ -9,7 +9,7 @@ $page_owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb($page_owner->name); -elgg_register_add_button(); +elgg_register_title_button(); $offset = (int)get_input('offset', 0); $content .= elgg_list_entities(array( diff --git a/mod/file/pages/file/friends.php b/mod/file/pages/file/friends.php index 7bde42962..0b351efaf 100644 --- a/mod/file/pages/file/friends.php +++ b/mod/file/pages/file/friends.php @@ -11,7 +11,7 @@ elgg_push_breadcrumb(elgg_echo('file'), "file/all"); elgg_push_breadcrumb($owner->name, "file/owner/$owner->username"); elgg_push_breadcrumb(elgg_echo('friends')); -elgg_register_add_button(); +elgg_register_title_button(); $title = elgg_echo("file:friends"); diff --git a/mod/file/pages/file/owner.php b/mod/file/pages/file/owner.php index 2244de095..4e2ec89d4 100644 --- a/mod/file/pages/file/owner.php +++ b/mod/file/pages/file/owner.php @@ -13,7 +13,7 @@ $owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb(elgg_echo('file'), "file/all"); elgg_push_breadcrumb($owner->name); -elgg_register_add_button(); +elgg_register_title_button(); $params = array(); diff --git a/mod/file/pages/file/world.php b/mod/file/pages/file/world.php index 560743bed..e438ca2f0 100644 --- a/mod/file/pages/file/world.php +++ b/mod/file/pages/file/world.php @@ -7,7 +7,7 @@ elgg_push_breadcrumb(elgg_echo('file')); -elgg_register_add_button(); +elgg_register_title_button(); $limit = get_input("limit", 10); diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 52df7e18d..e129e0f9d 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -45,7 +45,7 @@ function discussion_handle_list_page($guid) { } elgg_push_breadcrumb($group->name); - elgg_register_add_button(); + elgg_register_title_button(); group_gatekeeper(); diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 2747f360b..126738566 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -12,7 +12,7 @@ function groups_handle_all_page() { elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('groups')); - elgg_register_add_button(); + elgg_register_title_button(); $selected_tab = get_input('filter', 'newest'); @@ -100,7 +100,7 @@ function groups_handle_owned_page() { $title = elgg_echo('groups:owned'); elgg_push_breadcrumb($title); - elgg_register_add_button(); + elgg_register_title_button(); $content = elgg_list_entities(array( 'type' => 'group', @@ -128,7 +128,7 @@ function groups_handle_mine_page() { $title = elgg_echo('groups:yours'); elgg_push_breadcrumb($title); - elgg_register_add_button(); + elgg_register_title_button(); $content = elgg_list_entities_from_relationship_count(array( 'type' => 'group', diff --git a/mod/messages/pages/messages/inbox.php b/mod/messages/pages/messages/inbox.php index 96712a193..fdfc20c43 100644 --- a/mod/messages/pages/messages/inbox.php +++ b/mod/messages/pages/messages/inbox.php @@ -15,7 +15,7 @@ if (!$page_owner) { elgg_push_breadcrumb(elgg_echo('messages:inbox')); -elgg_register_add_button(); +elgg_register_title_button(); $title = elgg_echo('messages:user', array($page_owner->name)); diff --git a/mod/messages/pages/messages/sent.php b/mod/messages/pages/messages/sent.php index edf2b29fb..af06ab273 100644 --- a/mod/messages/pages/messages/sent.php +++ b/mod/messages/pages/messages/sent.php @@ -15,7 +15,7 @@ if (!$page_owner) { elgg_push_breadcrumb(elgg_echo('messages:sent')); -elgg_register_add_button(); +elgg_register_title_button(); $title = elgg_echo('messages:sentmessages', array($page_owner->name)); diff --git a/mod/pages/pages/pages/friends.php b/mod/pages/pages/pages/friends.php index 88f26c45d..c55b27466 100644 --- a/mod/pages/pages/pages/friends.php +++ b/mod/pages/pages/pages/friends.php @@ -13,7 +13,7 @@ if (!$owner) { elgg_push_breadcrumb($owner->name, "pages/owner/$owner->username"); elgg_push_breadcrumb(elgg_echo('friends')); -elgg_register_add_button(); +elgg_register_title_button(); $title = elgg_echo('pages:friends'); diff --git a/mod/pages/pages/pages/owner.php b/mod/pages/pages/pages/owner.php index 312b56a54..2ff310ac8 100644 --- a/mod/pages/pages/pages/owner.php +++ b/mod/pages/pages/pages/owner.php @@ -17,7 +17,7 @@ $title = elgg_echo('pages:owner', array($owner->name)); elgg_push_breadcrumb($owner->name); -elgg_register_add_button(); +elgg_register_title_button(); $content = elgg_list_entities(array( 'types' => 'object', diff --git a/mod/pages/pages/pages/world.php b/mod/pages/pages/pages/world.php index 9237a820e..e6a705b6b 100644 --- a/mod/pages/pages/pages/world.php +++ b/mod/pages/pages/pages/world.php @@ -10,7 +10,7 @@ $title = elgg_echo('pages:all'); elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('pages')); -elgg_register_add_button(); +elgg_register_title_button(); $content = elgg_list_entities(array( 'types' => 'object', -- cgit v1.2.3