Skip to content
Browse files

Breaking logout link into a separate view.

git-svn-id: http://code.elgg.org/elgg/trunk@5993 36083f99-b078-4883-b0ff-0f9b5a30f544
  • Loading branch information...
1 parent 3744655 commit 45d1a0ec7c96297f204744a5ca8e340c08ba8ea9 nickw committed May 10, 2010
Showing with 15 additions and 7 deletions.
  1. +1 −7 views/default/page_elements/elgg_topbar.php
  2. +14 −0 views/default/page_elements/elgg_topbar_logout.php
View
8 views/default/page_elements/elgg_topbar.php
@@ -20,13 +20,7 @@
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.
View
14 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>';

0 comments on commit 45d1a0e

Please sign in to comment.
Something went wrong with that request. Please try again.