aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-02-03 15:31:01 -0800
committerzotlabs <mike@macgirvin.com>2017-02-03 15:31:01 -0800
commitfc4083346eb6d7010e018b3dab92711f777f8572 (patch)
tree0b178d114e2b30bbd3a897408557f6e666d4acdf /include/nav.php
parentf79a11cbf7276cff66a60fbf72bec4518bab10b0 (diff)
downloadvolse-hubzilla-fc4083346eb6d7010e018b3dab92711f777f8572.tar.gz
volse-hubzilla-fc4083346eb6d7010e018b3dab92711f777f8572.tar.bz2
volse-hubzilla-fc4083346eb6d7010e018b3dab92711f777f8572.zip
more work on nav-modal
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php32
1 files changed, 21 insertions, 11 deletions
diff --git a/include/nav.php b/include/nav.php
index 7d6877600..846ede717 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -76,6 +76,20 @@ EOT;
$userinfo = null;
$nav['loginmenu']=array();
+ if($observer) {
+ $userinfo = array(
+ 'icon' => $observer['xchan_photo_m'],
+ 'name' => $observer['xchan_addr'],
+ );
+ }
+
+ elseif(! $_SESSION['authenticated']) {
+ $nav['remote_login'] = remote_login();
+ $nav['loginmenu'][] = Array('rmagic',t('Remote authentication'),'',t('Click to authenticate to your home hub'),'rmagic_nav_btn');
+ }
+
+
+
if(local_channel()) {
@@ -114,6 +128,13 @@ EOT;
if(! get_account_id()) {
$nav['login'] = login(true,'main-login',false,false);
$nav['loginmenu'][] = Array('login',t('Login'),'',t('Sign in'),'login_nav_btn');
+ App::$page['content'] .= replace_macros(get_markup_template('nav_login.tpl'),
+ [
+ '$nav' => $nav,
+ 'userinfo' => $userinfo
+ ]
+ );
+
}
else
$nav['alogout'] = Array('logout',t('Logout'), "", t('End this session'),'logout_nav_btn');
@@ -121,17 +142,6 @@ EOT;
}
- if($observer) {
- $userinfo = array(
- 'icon' => $observer['xchan_photo_m'],
- 'name' => $observer['xchan_addr'],
- );
- }
-
- elseif(! $_SESSION['authenticated']) {
- $nav['remote_login'] = remote_login();
- $nav['loginmenu'][] = Array('rmagic',t('Remote authentication'),'',t('Click to authenticate to your home hub'),'rmagic_nav_btn');
- }
$homelink = get_my_url();
if(! $homelink) {