aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-25 18:14:32 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-25 18:14:32 +0000
commitc2022183edfb8e0120b32c54d1c2d93096810080 (patch)
tree728dcd66ccd7f73e55d61a15dc004bf79d6650cb /mod/bookmarks
parente08531bc7cc33ae406642ef3b2fd65e4b9ea3d9d (diff)
downloadelgg-c2022183edfb8e0120b32c54d1c2d93096810080.tar.gz
elgg-c2022183edfb8e0120b32c54d1c2d93096810080.tar.bz2
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
Diffstat (limited to 'mod/bookmarks')
-rw-r--r--mod/bookmarks/start.php34
1 files changed, 25 insertions, 9 deletions
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);