Commits

Luke Plant  committed 03679e4

Only show one of 'logout' and 'login' links, depending on state.

  • Participants
  • Parent commits 4e14be0

Comments (0)

Files changed (2)

File src/templates/pageend.st

         </div>
       </div>
       <div id="loginlinks">
-        <a href="/blog/login/">Login</a><br/>
-        <a href="/blog/logout/">Logout</a><br/>
+        <a href="/blog/login/" id="id_loginlink">Login</a><br/>
+        <a href="/blog/logout/" id="id_logoutlink">Logout</a><br/>
         <a href="/blog/admin/">Admin</a><br/>
         $if(editpageurl)$
           <a href="$editpageurl$">Edit</a><br/>

File src/templates/pagestart.st

 \$(document).ready(function() {
                     if (loggedIn()) {
                         addCommentModeration();
+                        \$('#id_loginlink').hide();
+                    } else {
+                        \$('#id_logoutlink').hide();
                     }
                     \$(".togglebar").toggle(function(ev) {
                                                \$(this.parentNode).addClass("manuallyShown");