template updates for new empty content

This commit is contained in:
Sebastian Grewe 2013-09-09 07:46:36 +02:00
parent 5c11c74974
commit 0dd1cc7d50
6 changed files with 13 additions and 11 deletions

View File

@ -5,7 +5,7 @@ if (!defined('SECURITY')) die('Hacking attempt');
if ($user->isAuthenticated()) {
if ($setting->getValue('disable_notifications') == 1) {
$_SESSION['POPUP'][] = array('CONTENT' => 'Notification system disabled by admin.', 'TYPE' => 'info');
$smarty->assign('CONTENT', '../../global/empty.tpl');
$smarty->assign('CONTENT', 'empty');
} else {
if (@$_REQUEST['do'] == 'save') {
if ($notification->updateSettings($_SESSION['USERDATA']['id'], $_REQUEST['data'])) {

View File

@ -9,5 +9,5 @@ if ($user->isAuthenticated()) {
header("Location: " . $_SERVER['HTTP_REFERER']);
}
// Somehow we still need to load this empty template
$smarty->assign("CONTENT", "../../global/empty.tpl");
$smarty->assign("CONTENT", "empty");
?>

View File

@ -67,9 +67,9 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
// Public / private page detection
if ($setting->getValue('acl_pool_statistics')) {
$smarty->assign("CONTENT", "authenticated.tpl");
$smarty->assign("CONTENT", "default.tpl");
} else if ($user->isAuthenticated() && ! $setting->getValue('acl_pool_statistics')) {
$smarty->assign("CONTENT", "authenticated.tpl");
$smarty->assign("CONTENT", "default.tpl");
} else {
$smarty->assign("CONTENT", "../default.tpl");
}

View File

@ -19,13 +19,13 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
$iKey = $_REQUEST['height'];
}
}
$aDetailsForBlockHeight = $roundstats->getDetailsForBlockHeight($iKey, $user->isAdmin($_SESSION['USERDATA']['id']));
$aRoundShareStats = $roundstats->getRoundStatsForAccounts($iKey, $user->isAdmin($_SESSION['USERDATA']['id']));
$aDetailsForBlockHeight = $roundstats->getDetailsForBlockHeight($iKey, $user->isAdmin(@$_SESSION['USERDATA']['id']));
$aRoundShareStats = $roundstats->getRoundStatsForAccounts($iKey, $user->isAdmin(@$_SESSION['USERDATA']['id']));
if ($user->isAdmin($_SESSION['USERDATA']['id'])) {
if ($user->isAdmin(@$_SESSION['USERDATA']['id'])) {
$aUserRoundTransactions = $roundstats->getAllRoundTransactions($iKey);
} else {
$aUserRoundTransactions = $roundstats->getUserRoundTransactions($iKey, $_SESSION['USERDATA']['id']);
$aUserRoundTransactions = $roundstats->getUserRoundTransactions($iKey, @$_SESSION['USERDATA']['id']);
}
// Propagate content our template
@ -38,7 +38,9 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
if ($setting->getValue('acl_round_statistics')) {
$smarty->assign("CONTENT", "default.tpl");
} else if ($user->isAuthenticated()) {
} else if ($user->isAuthenticated(false)) {
$smarty->assign("CONTENT", "default.tpl");
} else {
$smarty->assign("CONTENT", "empty");
}
?>

View File

@ -41,7 +41,7 @@
<h4 class="{$smarty.session.POPUP[popup].TYPE|default:"info"}">{$smarty.session.POPUP[popup].CONTENT}</h4>
{/section}
{/if}
{if file_exists($smarty.current_dir|cat:"/$PAGE/$ACTION/$CONTENT")}{include file="$PAGE/$ACTION/$CONTENT"}{else}Missing template for this page{/if}
{if $CONTENT != "empty" or $CONTENT != ""}{if file_exists($smarty.current_dir|cat:"/$PAGE/$ACTION/$CONTENT")}{include file="$PAGE/$ACTION/$CONTENT"}{else}Missing template for this page{/if}{/if}
<div class="spacer"></div>
</section>
</body>

View File

@ -12,7 +12,7 @@
{assign var=rank value=1}
{assign var=listed value=0}
{section shares $CONTRIBSHARES}
<tr{if $GLOBAL.userdata.username == $CONTRIBSHARES[shares].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<tr{if $GLOBAL.userdata.username|default:"" == $CONTRIBSHARES[shares].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<td align="center">{$rank++}</td>
<td>{if $CONTRIBSHARES[shares].is_anonymous|default:"0" == 1}anonymous{else}{$CONTRIBSHARES[shares].account|escape}{/if}</td>
<td align="right" style="padding-right: 25px;">{$CONTRIBSHARES[shares].shares|number_format}</td>