]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Breaking logout link into a separate view.
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 10 May 2010 18:26:01 +0000 (18:26 +0000)
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 10 May 2010 18:26:01 +0000 (18:26 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5993 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/page_elements/elgg_topbar.php
views/default/page_elements/elgg_topbar_logout.php [new file with mode: 0644]

index f4959c749afbde8daebdbe086075db0b19e16612..e88cb0face0474d4eb899b1f7ca885e28b1f4e3b 100644 (file)
@@ -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 (file)
index 0000000..d37c5f1
--- /dev/null
@@ -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>';