Commit 9b94ad2f authored by Zot's avatar Zot
Browse files

was unable to make the modal login dialog work on the channel page with a...

was unable to make the modal login dialog work on the channel page with a cover photo. So for mod_channel, send login to the login page instead of the modal popup.
parent 70b39e82
......@@ -148,15 +148,20 @@ EOT;
}
else {
if(! get_account_id()) {
$nav['login'] = login(true,'main-login',false,false);
$nav['loginmenu'][] = ['login',t('Login'),'',t('Sign in'),'login_nav_btn'];
App::$page['content'] .= replace_macros(get_markup_template('nav_login.tpl'),
[
'$nav' => $nav,
'userinfo' => $userinfo
]
);
if(App::$module === 'channel') {
$nav['login'] = login(true,'main-login',false,false);
$nav['loginmenu'][] = ['login',t('Login'),'',t('Sign in'),''];
}
else {
$nav['login'] = login(true,'main-login',false,false);
$nav['loginmenu'][] = ['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'] = ['logout',t('Logout'), "", t('End this session'),'logout_nav_btn'];
......
{{if $nav.login && !$userinfo}}
<div class="d-xl-none pt-1 pb-1">
{{if $nav.loginmenu.1.4}}
<a class="btn btn-primary btn-sm text-white" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}_collapse" data-toggle="modal" data-target="#nav-login">
{{$nav.loginmenu.1.1}}
</a>
{{else}}
<a class="btn btn-primary btn-sm text-white" href="login" title="{{$nav.loginmenu.1.3}}">
{{$nav.loginmenu.1.1}}
</a>
{{/if}}
{{if $nav.register}}
<a class="btn btn-warning btn-sm text-dark" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}" >
{{$nav.register.1}}
......@@ -79,7 +85,15 @@
<ul class="navbar-nav mr-auto">
{{if $nav.login && !$userinfo}}
<li class="nav-item d-none d-xl-flex">
<a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">{{$nav.loginmenu.1.1}}</a>
{{if $nav.loginmenu.1.4}}
<a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">
{{$nav.loginmenu.1.1}}
</a>
{{else}}
<a class="nav-link" href="login" title="{{$nav.loginmenu.1.3}}">
{{$nav.loginmenu.1.1}}
</a>
{{/if}}
</li>
{{/if}}
{{if $nav.register}}
......
{{if $nav.login && !$userinfo}}
<div class="d-xl-none pt-1 pb-1">
{{if $nav.loginmenu.1.4}}
<a class="btn btn-primary btn-sm text-white" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}_collapse" data-toggle="modal" data-target="#nav-login">
{{$nav.loginmenu.1.1}}
</a>
{{else}}
<a class="btn btn-primary btn-sm text-white" href="login" title="{{$nav.loginmenu.1.3}}">
{{$nav.loginmenu.1.1}}
</a>
{{/if}}
{{if $nav.register}}
<a class="btn btn-warning btn-sm text-dark" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}" >
{{$nav.register.1}}
......@@ -178,7 +184,15 @@
{{if $nav.login && !$userinfo}}
<li class="nav-item d-none d-xl-flex">
<a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">{{$nav.loginmenu.1.1}}</a>
{{if $nav.loginmenu.1.4}}
<a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">
{{$nav.loginmenu.1.1}}
</a>
{{else}}
<a class="nav-link" href="login" title="{{$nav.loginmenu.1.3}}">
{{$nav.loginmenu.1.1}}
</a>
{{/if}}
</li>
{{/if}}
{{if $nav.register}}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment