aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/nav.php4
-rwxr-xr-xview/tpl/nav.tpl46
2 files changed, 27 insertions, 23 deletions
diff --git a/include/nav.php b/include/nav.php
index 9b6896d15..4d411e603 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -145,10 +145,10 @@ EOT;
$homelink = (($observer) ? $observer['xchan_url'] : '');
}
- if((App::$module != 'home') && (! (local_channel())))
+ if(! local_channel())
$nav['home'] = array($homelink, t('Home'), "", t('Home Page'),'home_nav_btn');
- if((App::$config['system']['register_policy'] == REGISTER_OPEN) && (! $_SESSION['authenticated']))
+ if((App::$config['system']['register_policy'] == REGISTER_OPEN) || (App::$config['system']['register_policy'] == REGISTER_APPROVE) && (! $_SESSION['authenticated']))
$nav['register'] = array('register',t('Register'), "", t('Create an account'),'register_nav_btn');
if(! get_config('system','hide_help')) {
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 5be6d21bd..23a9977ad 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -52,9 +52,23 @@
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav navbar-left">
- {{if $nav.register}}<li class="{{$nav.register.2}}"><a href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}">{{$nav.register.1}}</a></li>{{/if}}
- {{if !$userinfo}}
- {{if $nav.loginmenu}}
+ {{if $nav.home}}
+ <li class="{{$sel.home}} hidden-xs">
+ <a class="{{$nav.home.2}}" href="{{$nav.home.0}}" title="{{$nav.home.3}}" id="{{$nav.home.4}}"><i class="fa fa-home"></i></a>
+ <span class="home-update badge dropdown-toggle" data-toggle="dropdown" rel="#nav-home-menu"></span>
+ <ul id="nav-home-menu" class="dropdown-menu" rel="home">
+ {{* <li id="nav-home-see-all"><a href="{{$nav.home.all.0}}">{{$nav.home.all.1}}</a></li> *}}
+ <li id="nav-home-mark-all"><a href="#" onclick="markRead('home'); return false;">{{$nav.home.mark.1}}</a></li>
+ <li class="empty">{{$emptynotifications}}</li>
+ </ul>
+ </li>
+ <li class="{{$sel.home}} visible-xs">
+ <a class="{{$nav.home.2}}" href="{{$nav.home.0}}" title="{{$nav.home.3}}" ><i class="fa fa-home"></i></a>
+ <span class="home-update badge" rel="#nav-home-menu"></span>
+ </li>
+ {{/if}}
+
+ {{if $nav.loginmenu && !$userinfo}}
<li class="{{$nav.loginmenu.0.2}} hidden-xs">
<a data-toggle="dropdown" href="{{$nav.loginmenu.0.0}}" title="{{$nav.loginmenu.0.3}}" id="{{$nav.loginmenu.0.4}}">{{$nav.loginmenu.0.1}} <span class="caret" id="loginmenu-caret"></span></a>
<ul class="dropdown-menu" role="menu">
@@ -67,9 +81,14 @@
<li role="presentation"><a class="{{$loginmenu.2}} visible-xs" href="{{$loginmenu.0}}" title="{{$loginmenu.3}}" role="menuitem">{{$loginmenu.1}}</a></li>
{{/foreach}}
{{/if}}
+
+ {{if $nav.register}}
+ <li class="{{$nav.register.2}}"><a href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}">{{$nav.register.1}}</a></li>
{{/if}}
- {{if $nav.alogout}}<li class="{{$nav}}-alogout.2"><a href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a></li>{{/if}}
+ {{if $nav.alogout}}
+ <li class="{{$nav}}-alogout.2"><a href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a></li>
+ {{/if}}
{{if $nav.network}}
<li class="{{$sel.network}} hidden-xs">
@@ -87,23 +106,6 @@
</li>
{{/if}}
- {{if $nav.home}}
- <li class="{{$sel.home}} hidden-xs">
- <a class="{{$nav.home.2}}" href="{{$nav.home.0}}" title="{{$nav.home.3}}" id="{{$nav.home.4}}"><i class="fa fa-home"></i></a>
- <span class="home-update badge dropdown-toggle" data-toggle="dropdown" rel="#nav-home-menu"></span>
- <ul id="nav-home-menu" class="dropdown-menu" rel="home">
- {{* <li id="nav-home-see-all"><a href="{{$nav.home.all.0}}">{{$nav.home.all.1}}</a></li> *}}
- <li id="nav-home-mark-all"><a href="#" onclick="markRead('home'); return false;">{{$nav.home.mark.1}}</a></li>
- <li class="empty">{{$emptynotifications}}</li>
- </ul>
- </li>
- <li class="{{$sel.home}} visible-xs">
- <a class="{{$nav.home.2}}" href="{{$nav.home.0}}" title="{{$nav.home.3}}" ><i class="fa fa-home"></i></a>
- <span class="home-update badge" rel="#nav-home-menu"></span>
- </li>
- {{/if}}
-
-
{{if $nav.messages}}
<li class="{{$sel.messages}} hidden-xs">
<a class="{{$nav.messages.2}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" id="{{$nav.messages.4}}"><i class="fa fa-envelope"></i></a>
@@ -167,6 +169,7 @@
</li>
{{/if}}
</ul>
+
<ul class="nav navbar-nav navbar-right">
<li class="hidden-xs">
<form method="get" action="search" role="search">
@@ -180,6 +183,7 @@
{{if $powered_by}}
<div id="powered-by">{{$powered_by}}</div>
{{/if}}
+
{{if $nav.directory}}
<li class="{{$sel.directory}}">
<a class="{{$nav.directory.2}}" href="{{$nav.directory.0}}" title="{{$nav.directory.3}}" id="{{$nav.directory.4}}"><i class="fa fa-sitemap"></i></a>