Display newspage on Mobile if not authed
* Do not show dashboard if user is not logged in * Show news on Mobile and Desktop by default * Show Dasboard on mobile once logged in * Make News Navbar item default for unauthed users on mobile * Add Dash Navbar item for authed users on mobile
This commit is contained in:
parent
dc2dda63f5
commit
f9f776a015
@ -13,17 +13,17 @@ foreach ($aNews as $key => $aData) {
|
||||
$aNews[$key]['content'] = Markdown::defaultTransform($aData['content']);
|
||||
}
|
||||
|
||||
// Load news entries in case news is the homepage
|
||||
// Load news entries for Desktop site and unauthenticated users
|
||||
$smarty->assign("NEWS", $aNews);
|
||||
|
||||
// Tempalte specifics
|
||||
if ($detect->isMobile()) {
|
||||
if ($detect->isMobile() && $_SESSION['AUTHENTICATED'] == true) {
|
||||
if ($config['payout_system'] == 'pps') {
|
||||
$smarty->assign("CONTENT", "pps.tpl");
|
||||
} else {
|
||||
$smarty->assign("CONTENT", "default.tpl");
|
||||
}
|
||||
} else {
|
||||
$smarty->assign("CONTENT", "default.tpl");
|
||||
$smarty->assign("CONTENT", "../news/default.tpl");
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
<div data-role="navbar">
|
||||
<ul>
|
||||
{if $smarty.session.AUTHENTICATED|default:"0" == 1}
|
||||
<li><a href="{$smarty.server.PHP_SELF}" data-icon="home" data-ajax="false">Dash</a></li>
|
||||
<li><a href="{$smarty.server.PHP_SELF}?page=news" data-icon="info" data-ajax="false">News</a></li>
|
||||
{if $smarty.session.AUTHENTICATED|default:"0" == 1}
|
||||
<li><a href="{$smarty.server.PHP_SELF}?page=statistics&action=pool" data-icon="grid" data-ajax="false">Statistics</a></li>
|
||||
<li><a href="{$smarty.server.PHP_SELF}?page=logout" data-icon="gear" data-ajax="false">Logout</a></li>
|
||||
{else}
|
||||
<li><a href="{$smarty.server.PHP_SELF}" data-icon="info" data-ajax="false">News</a></li>
|
||||
<li><a href="{$smarty.server.PHP_SELF}?page=login" data-icon="gear" data-ajax="false">Login</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user