From 6867a8a7f6060c82cba3a34cd944a3737e8e263e Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Thu, 16 Oct 2014 17:21:37 +0200 Subject: Login menu --- include/nav.php | 11 +++++------ view/tpl/nav.tpl | 15 ++++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/nav.php b/include/nav.php index 4f7d609aa..ba817648b 100644 --- a/include/nav.php +++ b/include/nav.php @@ -84,6 +84,7 @@ EOT; $nav['usermenu']=array(); $userinfo = null; + $nav['loginmenu']=array(); if(local_user()) { @@ -120,8 +121,9 @@ EOT; $nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages')); } else { - if(! get_account_id()) - $nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'selected':''), t('Sign in')); + if(! get_account_id()) { + $nav['loginmenu'][] = Array('login',t('Login'),'',t('Sign in')); + } else $nav['alogout'] = Array('logout',t('Logout'), "", t('End this session')); @@ -136,14 +138,11 @@ EOT; } if($observer) { - $nav['locked'] = true; $nav['lock'] = array('logout','','lock', sprintf( t('%s - click to logout'), $observer['xchan_addr'])); } else { - $nav['locked'] = false; - $nav['lock'] = array('rmagic','','unlock', - t('Click to authenticate to your home hub')); + $nav['loginmenu'][] = Array('rmagic',t('Remote login'),'',t('Click to authenticate to your home hub')); } /** diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index 6c461f062..ac6cb1a9c 100755 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -48,14 +48,15 @@