From c2022183edfb8e0120b32c54d1c2d93096810080 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 25 May 2010 18:14:32 +0000 Subject: change the bookmark header depending on whose bookmarks are being viewed git-svn-id: http://code.elgg.org/elgg/trunk@6213 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/bookmarks/start.php | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'mod/bookmarks/start.php') diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index 70bfa1124..efea0c443 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -205,20 +205,36 @@ function bookmarks_page_handler($page) { } // main content - if ($owner != $logged_in_user || $context == 'action') { - $header = elgg_view('navigation/breadcrumbs'); - } + //if ($owner != $logged_in_user || $context == 'action') { + $header = elgg_view('navigation/breadcrumbs'); + //} //if no user is set if(!$owner_name){ $owner_name = get_loggedin_user()->username; } - $header .= elgg_view("page_elements/content_header", array( - 'context' => $context, - 'type' => 'bookmarks', - 'all_link' => "{$CONFIG->url}pg/bookmarks/", - 'new_link' => "{$CONFIG->url}pg/bookmarks/{$owner_name}/add" - )); + //select the header depending on whether a user is looking at their bookmarks or someone elses + if($owner){ + if ($owner != $logged_in_user) { + $header .= elgg_view("page_elements/content_header_member", array( + 'type' => 'bookmarks' + )); + }else{ + $header .= elgg_view("page_elements/content_header", array( + 'context' => $context, + 'type' => 'bookmarks', + 'all_link' => "{$CONFIG->url}pg/bookmarks/", + 'new_link' => "{$CONFIG->url}pg/bookmarks/{$owner_name}/add" + )); + } + }else{ + $header .= elgg_view("page_elements/content_header", array( + 'context' => $context, + 'type' => 'bookmarks', + 'all_link' => "{$CONFIG->url}pg/bookmarks/", + 'new_link' => "{$CONFIG->url}pg/bookmarks/{$owner_name}/add" + )); + } $content = $header . $content; $body = elgg_view_layout('one_column_with_sidebar', $content, $sidebar); -- cgit v1.2.3