diff options
-rw-r--r-- | mod/profile/edit.php | 5 | ||||
-rw-r--r-- | mod/profile/start.php | 12 | ||||
-rw-r--r-- | mod/profile/views/default/profile/submenu.php | 22 |
3 files changed, 32 insertions, 7 deletions
diff --git a/mod/profile/edit.php b/mod/profile/edit.php index 69ca332e1..cf3d8a62e 100644 --- a/mod/profile/edit.php +++ b/mod/profile/edit.php @@ -20,7 +20,7 @@ if ($user = page_owner()) {
$user = page_owner_entity();
} else {
- $user = $_SESSION['user']; + $user = $_SESSION['user'];
if (!$user) $user = get_entity($_SESSION['id']);
set_page_owner($user->getGUID());
}
@@ -28,7 +28,8 @@ // Get form, if we're allowed to edit
if ($user->canEdit()) {
- $area1 = elgg_view("profile/edit",array('entity' => $user));
+ $area1 = elgg_view_title(elgg_echo('profile:edit'));
+ $area1 .= elgg_view("profile/edit",array('entity' => $user));
} else {
diff --git a/mod/profile/start.php b/mod/profile/start.php index 5f0eaabd2..80901659f 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -59,11 +59,13 @@ // Add Javascript reference to the page header
extend_view('metatags','profile/metatags');
extend_view('css','profile/css');
- - // Extend context menu with admin links - if (isadminloggedin()) - { - extend_view('profile/menu/links','profile/menu/adminlinks'); + if (get_context() == "profile")
+ extend_view('canvas_header/submenu','profile/submenu');
+
+ // Extend context menu with admin links
+ if (isadminloggedin())
+ {
+ extend_view('profile/menu/links','profile/menu/adminlinks');
}
}
diff --git a/mod/profile/views/default/profile/submenu.php b/mod/profile/views/default/profile/submenu.php new file mode 100644 index 000000000..831fcba2f --- /dev/null +++ b/mod/profile/views/default/profile/submenu.php @@ -0,0 +1,22 @@ +<?php
+
+ /**
+ * Elgg profile submenu links
+ * These sit in the submenu when the profile editing is on view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ *
+ */
+
+?>
+
+<ul>
+ <li><a href="<?php echo $CONFIG->wwwroot . "mod/profile/edit.php"; ?>"><?php echo elgg_echo('profile:details'); ?></a></li>
+ <li><a href="<?php echo $CONFIG->wwwroot."mod/profile/editicon.php"; ?>"><?php echo elgg_echo('profile:editicon'); ?></a></li>
+ <li><a href="<?php echo $CONFIG->wwwroot."pg/profile/" . $_SESSION['user']->username; ?>"><?php echo elgg_echo('profile:back'); ?></a></li>
+</ul>
\ No newline at end of file |