aboutsummaryrefslogtreecommitdiff
path: root/views/default/page_elements
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-10 18:26:01 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-10 18:26:01 +0000
commit45d1a0ec7c96297f204744a5ca8e340c08ba8ea9 (patch)
tree06bf83c8b5ab11f652981b8fd0112604eb671d61 /views/default/page_elements
parent37446557462b35b5c6690f7f8f739c4dd861b85b (diff)
downloadelgg-45d1a0ec7c96297f204744a5ca8e340c08ba8ea9.tar.gz
elgg-45d1a0ec7c96297f204744a5ca8e340c08ba8ea9.tar.bz2
Breaking logout link into a separate view.
git-svn-id: http://code.elgg.org/elgg/trunk@5993 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page_elements')
-rw-r--r--views/default/page_elements/elgg_topbar.php8
-rw-r--r--views/default/page_elements/elgg_topbar_logout.php14
2 files changed, 15 insertions, 7 deletions
diff --git a/views/default/page_elements/elgg_topbar.php b/views/default/page_elements/elgg_topbar.php
index f4959c749..e88cb0fac 100644
--- a/views/default/page_elements/elgg_topbar.php
+++ b/views/default/page_elements/elgg_topbar.php
@@ -20,13 +20,7 @@ if (($user instanceof ElggUser) && ($user->guid > 0)) {
echo "<a href=\"$user_link\"><img class=\"user_mini_avatar\" src=\"$user_image\" alt=\"User avatar\" /></a>";
// logout link
- echo '<div class="log_out">';
- echo elgg_view('output/url', array(
- 'href' => "{$vars['url']}action/logout",
- 'text' => elgg_echo('logout'),
- 'is_action' => TRUE
- ));
- echo '</div>';
+ echo elgg_view('page_elements/elgg_topbar_logout', $vars);
// elgg tools menu
// need to echo this empty view for backward compatibility.
diff --git a/views/default/page_elements/elgg_topbar_logout.php b/views/default/page_elements/elgg_topbar_logout.php
new file mode 100644
index 000000000..d37c5f126
--- /dev/null
+++ b/views/default/page_elements/elgg_topbar_logout.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * A standard logout link
+ *
+ * Called within the Elgg topbar view.
+ */
+
+echo '<div class="log_out">';
+echo elgg_view('output/url', array(
+ 'href' => "{$vars['url']}action/logout",
+ 'text' => elgg_echo('logout'),
+ 'is_action' => TRUE
+));
+echo '</div>';