aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-21 06:31:07 +1100
committerGitHub <noreply@github.com>2016-11-21 06:31:07 +1100
commit69123590fb7cdb741cc09de177b334bcca65da05 (patch)
treeb5eb9004f28f03ef1305852692af54755da34dcb
parent66a35e973c554f6bcab716b6007c17579c260226 (diff)
parent9d1443bbfe2750dd9baa1f7031441ccf834dcd5b (diff)
downloadvolse-hubzilla-69123590fb7cdb741cc09de177b334bcca65da05.tar.gz
volse-hubzilla-69123590fb7cdb741cc09de177b334bcca65da05.tar.bz2
volse-hubzilla-69123590fb7cdb741cc09de177b334bcca65da05.zip
Merge pull request #595 from git-marijus/dev
move the remote user homebutton to the user menu. this way everything…
-rw-r--r--include/nav.php18
-rwxr-xr-xview/tpl/nav.tpl5
2 files changed, 11 insertions, 12 deletions
diff --git a/include/nav.php b/include/nav.php
index c2a058457..21da033a7 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -127,26 +127,24 @@ EOT;
);
}
- if($observer) {
- $nav['lock'] = array('logout','','lock',
- sprintf( t('%s - click to logout'), $observer['xchan_addr']));
- }
elseif(! $_SESSION['authenticated']) {
$nav['loginmenu'][] = Array('rmagic',t('Remote authentication'),'',t('Click to authenticate to your home hub'),'rmagic_nav_btn');
}
- /**
- * "Home" should also take you home from an authenticated remote profile connection
- */
-
$homelink = get_my_url();
if(! $homelink) {
$observer = App::get_observer();
$homelink = (($observer) ? $observer['xchan_url'] : '');
}
- if(! local_channel())
- $nav['home'] = array($homelink, t('Home'), "", t('Home Page'),'home_nav_btn');
+ if(! local_channel()) {
+ $nav['rusermenu'] = array(
+ $homelink,
+ t('Get me home'),
+ 'logout',
+ t('Log me out of this site')
+ );
+ }
if(((get_config('system','register_policy') == REGISTER_OPEN) || (get_config('system','register_policy') == REGISTER_APPROVE)) && (! $_SESSION['authenticated']))
$nav['register'] = array('register',t('Register'), "", t('Create an account'),'register_nav_btn');
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index a279789a1..bc1e64416 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -45,9 +45,10 @@
{{/if}}
</ul>
{{else}}
- {{if $nav.lock}}
+ {{if $nav.rusermenu}}
<ul class="dropdown-menu" role="menu" aria-labelledby="avatar">
- <li role="presentation"><a href="{{$nav.lock.0}}" title="{{$nav.lock.3}}" role="menuitem">{{$nav.lock.3}}</a></li>
+ <li role="presentation"><a href="{{$nav.rusermenu.0}}" role="menuitem">{{$nav.rusermenu.1}}</a></li>
+ <li role="presentation"><a href="{{$nav.rusermenu.2}}" role="menuitem">{{$nav.rusermenu.3}}</a></li>
</ul>
{{/if}}
{{/if}}