aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/nav.php32
-rw-r--r--view/theme/redbasic/css/style.css5
-rwxr-xr-xview/tpl/nav.tpl20
-rw-r--r--view/tpl/nav_login.tpl13
4 files changed, 39 insertions, 31 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) {
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index fd41b4c89..4cfd42ef1 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -2108,5 +2108,8 @@ dl.bb-dl > dd > li {
#nav-login {
padding: 10px;
- min-width: 300px;
+ min-width: 300px;
+
+ border: 1px solid #000;
+ background-color: #fff;
}
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 3fccfaeb7..7fae5cb87 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -156,7 +156,7 @@
{{if $nav.login && !$userinfo}}
<li class="">
- <a href="#" title="{{$nav.loginmenu.0.3}}" id="{{$nav.loginmenu.0.4}}" data-toggle="modal" data-target="#nav-login">{{$nav.loginmenu.0.1}} <span class="caret" id="loginmenu-caret"></span></a>
+ <a href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">{{$nav.loginmenu.1.1}} <span class="caret" id="loginmenu-caret"></span></a>
</li>
{{/if}}
@@ -222,24 +222,6 @@
</div>
</div>
-
- {{if $nav.login && !$userinfo}}
-
- <div id="nav-login" class="modal" role="dialog">
- <div class="modal-dialog">
- <div class="modal-header"><h3>{{$nav.loginmenu.0.1}}</h3></div>
- <div class="modal-body">
- <div class="form-group">
- {{$nav.login}}
- {{$nav.remote_login}}
- </div>
- </div>
- </div>
- </div>
-
- {{/if}}
-
-
{{if $nav.help.6}}
<div id="contextual-help-content" class="contextual-help-content">
{{$nav.help.5}}
diff --git a/view/tpl/nav_login.tpl b/view/tpl/nav_login.tpl
new file mode 100644
index 000000000..fe93f0aa2
--- /dev/null
+++ b/view/tpl/nav_login.tpl
@@ -0,0 +1,13 @@
+ {{if $nav.login && !$userinfo}}
+ <div id="nav-login" class="modal" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-header"><h3>{{$nav.loginmenu.1.1}}</h3></div>
+ <div class="modal-body">
+ <div class="form-group">
+ {{$nav.login}}
+ {{$nav.remote_login}}
+ </div>
+ </div>
+ </div>
+ </div>
+ {{/if}}