aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-09 13:37:04 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-09 13:37:04 +0000
commitd7237134d36a3c072edc474f963d137ed814f7be (patch)
tree569cc17ed8af18788c325f21faf17fffd543f2fb
parent87d8b091cf49c072cacac161bf78cb61e702e06b (diff)
downloadelgg-d7237134d36a3c072edc474f963d137ed814f7be.tar.gz
elgg-d7237134d36a3c072edc474f963d137ed814f7be.tar.bz2
new profile submenu committed
git-svn-id: https://code.elgg.org/elgg/trunk@1358 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/profile/edit.php5
-rw-r--r--mod/profile/start.php12
-rw-r--r--mod/profile/views/default/profile/submenu.php22
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