diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-11-07 10:43:13 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2017-11-11 20:25:04 +0100 |
commit | 96d439bcee2990400f39c7cc0e5bd1596ae1d221 (patch) | |
tree | 366756a2466774fbc404a2046050db62efbc5f57 | |
parent | 47fab9721042d1adc5db3e1c5fe166a29cb41c0f (diff) | |
download | volse-hubzilla-96d439bcee2990400f39c7cc0e5bd1596ae1d221.tar.gz volse-hubzilla-96d439bcee2990400f39c7cc0e5bd1596ae1d221.tar.bz2 volse-hubzilla-96d439bcee2990400f39c7cc0e5bd1596ae1d221.zip |
add location info to the navbar
-rw-r--r-- | include/nav.php | 12 | ||||
-rwxr-xr-x | view/tpl/navbar_default.tpl | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/include/nav.php b/include/nav.php index 89947e270..f70e5cb3b 100644 --- a/include/nav.php +++ b/include/nav.php @@ -27,6 +27,8 @@ function nav($template = 'default') { </script> EOT; + $is_owner = (((local_channel()) && ((App::$profile_uid == local_channel()) || (App::$profile_uid == 0))) ? true : false); + if(local_channel()) { $channel = App::get_channel(); $observer = App::get_observer(); @@ -39,17 +41,17 @@ EOT; intval(get_account_id()) ); } + $sitelocation = (($is_owner) ? '' : App::$profile['reddress']); } - elseif(remote_channel()) + elseif(remote_channel()) { $observer = App::get_observer(); + $sitelocation = ((App::$profile['reddress']) ? App::$profile['reddress'] : '@' . App::get_hostname()); + } require_once('include/conversation.php'); - $is_owner = (((local_channel()) && ((App::$profile_uid == local_channel()) || (App::$profile_uid == 0))) ? true : false); + $channel_apps[] = channel_apps($is_owner, App::$profile['channel_address']); - $myident = (($channel) ? $channel['xchan_addr'] : ''); - - $sitelocation = (($myident) ? $myident : App::get_hostname()); /** * diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl index b330993c8..4f0b9a110 100755 --- a/view/tpl/navbar_default.tpl +++ b/view/tpl/navbar_default.tpl @@ -17,8 +17,8 @@ </div> {{/if}} {{if $userinfo}} -<div class="dropdown usermenu"> - <div class="fakelink" data-toggle="dropdown"> +<div class="dropdown"> + <div class="fakelink usermenu" data-toggle="dropdown"> <img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}"> <i class="fa fa-caret-down"></i> </div> @@ -60,7 +60,13 @@ {{/if}} </div> <div class="navbar-nav mr-auto"> - <div><a id="nav-app-link" href="{{$url}}" class="nav-link">{{$sel.name}}</a></div> + <a id="nav-app-link" href="{{$url}}" class="nav-link" style="padding: .175rem;{{if $sitelocation}} line-height: 1; height:2.35rem;{{/if}}"> + {{$sel.name}} + {{if $sitelocation}} + <br> + <small class="text-muted">{{$sitelocation}}</small> + {{/if}} + </a> </div> {{/if}} <div class="navbar-toggler-right"> |