]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
change the bookmark header depending on whose bookmarks are being viewed
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 25 May 2010 18:14:32 +0000 (18:14 +0000)
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 25 May 2010 18:14:32 +0000 (18:14 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6213 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/bookmarks/start.php

index 70bfa1124a406cd0e519a430b44368877c7be4f5..efea0c4437c3d06b921631e0ceb649db32caa85d 100644 (file)
@@ -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);