Merge pull request #2122 from MPOS/date-format

[ADDED] System Date format
This commit is contained in:
Sebastian Grewe 2014-04-17 06:56:23 +02:00
commit 47f46ee73c
12 changed files with 21 additions and 13 deletions

View File

@ -293,6 +293,13 @@ $aSettings['system'][] = array(
'name' => 'system_error_email', 'value' => $setting->getValue('system_error_email'),
'tooltip' => 'The email address for system errors notifications, like cronjobs failures.'
);
$aSettings['system'][] = array(
'display' => 'Date format string', 'type' => 'text',
'site' => 25,
'default' => '%m/%d/%Y %H:%M:%S',
'name' => 'system_date_format', 'value' => $setting->getValue('system_date_format'),
'tooltip' => 'Date format to be used throughout the site. Please check PHP strftime for details.'
);
$aSettings['system'][] = array(
'display' => 'Disable e-mail confirmations', 'type' => 'select',
'options' => array( 0 => 'No', 1 => 'Yes' ),

View File

@ -65,6 +65,7 @@ $aGlobal = array(
'twofactor' => $config['twofactor'],
'csrf' => $config['csrf'],
'config' => array(
'date' => $setting->getValue('system_date_format', '%m/%d/%Y %H:%M:%S'),
'website_design' => $setting->getValue('website_design'),
'poolnav_enabled' => $setting->getValue('poolnav_enabled'),
'poolnav_pools' => $setting->getValue('poolnav_pools'),

View File

@ -44,7 +44,7 @@
{section name=invite loop=$INVITATIONS}
<tr>
<td>{$INVITATIONS[invite].email}</td>
<td>{$INVITATIONS[invite].time|date_format:"%d/%m/%Y %H:%M:%S"}</td>
<td>{$INVITATIONS[invite].time|date_format:$GLOBAL.config.date}</td>
<td><i class="icon-{if $INVITATIONS[invite].is_activated}ok{else}cancel{/if}"></i></td>
</tr>
{/section}

View File

@ -50,7 +50,7 @@
{else}
<font color="green">
{/if}
{$event.value|date_format:"%m/%d %H:%M:%S"}
{$event.value|date_format:$GLOBAL.config.date}
</font>
{else}
{$event.value|default:""}

View File

@ -44,7 +44,7 @@
<div class="panel-heading">
<i class="fa fa-info fa-fw"></i> {$NEWS[news].header}</a>
<br />
<font size="1px">posted {$NEWS[news].time|date_format:"%b %e, %Y at %H:%M"}{if $HIDEAUTHOR|default:"0" == 0} by <b>{$NEWS[news].author}</b>{/if}</font>
<font size="1px">posted {$NEWS[news].time|date_format:$GLOBAL.config.date}{if $HIDEAUTHOR|default:"0" == 0} by <b>{$NEWS[news].author}</b>{/if}</font>
</div>
<div class="panel-body">

View File

@ -24,7 +24,7 @@
<td>{$LASTREGISTEREDUSERS[user].id|escape}</td>
<td>{$LASTREGISTEREDUSERS[user].mposuser}</td>
<td>{$LASTREGISTEREDUSERS[user].email}</td>
<td>{$LASTREGISTEREDUSERS[user].signup_timestamp|date_format:"%d/%m %H:%M:%S"}</td>
<td>{$LASTREGISTEREDUSERS[user].signup_timestamp|date_format:$GLOBAL.config.date}</td>
<td class="text-center">{if !$LASTREGISTEREDUSERS[user].inviter}<i class="fa fa-times fa-fw">{else}<i class="fa fa-check fa-fw">{/if}</td>
<td><a href="{$smarty.server.SCRIPT_NAME}?page=admin&action=user&do=query&filter[account]={$LASTREGISTEREDUSERS[user].inviter}">{$LASTREGISTEREDUSERS[user].inviter}</a></td>
</tr>

View File

@ -121,8 +121,8 @@
<td colspan="2">{$USERS[user].estimates.hours24|number_format:"8"}</td>
{/if}
<td>{$USERS[user].balance|number_format:"8"}</td>
<td>{$USERS[user].signup_timestamp|date_format:"%d/%m %H:%M:%S"}</td>
<td>{$USERS[user].last_login|date_format:"%d/%m %H:%M:%S"}</td>
<td>{$USERS[user].signup_timestamp|date_format:$GLOBAL.config.date}</td>
<td>{$USERS[user].last_login|date_format:$GLOBAL.config.date}</td>
<td>
<input type="hidden" name="admin[{$USERS[user].id}]" value="0"/>
<input type="checkbox" onclick="storeAdmin({$USERS[user].id})" name="admin[{$USERS[user].id}]" value="1" id="admin[{$USERS[user].id}]" {if $USERS[user].is_admin}checked{/if} />

View File

@ -11,7 +11,7 @@
<div class="panel-heading">
<i class="fa fa-info fa-fw"></i> <a data-toggle="collapse" data-parent="#accordion" href="#collapse{$smarty.section.news.index}">{$NEWS[news].header}</a>
<br />
<font size="1px">posted {$NEWS[news].time|date_format:"%b %e, %Y at %H:%M"}{if $HIDEAUTHOR|default:"0" == 0} by <b>{$NEWS[news].author}</b>{/if}</font>
<font size="1px">posted {$NEWS[news].time|date_format:$GLOBAL.config.date}{if $HIDEAUTHOR|default:"0" == 0} by <b>{$NEWS[news].author}</b>{/if}</font>
</div>
<div id="collapse{$smarty.section.news.index}" class="panel-collapse collapse {if $smarty.section.news.index == 0}in{/if}">
<div class="panel-body">
@ -24,4 +24,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@ -5,7 +5,7 @@
<div class="panel-heading">
<i class="fa fa-bookmark"></i> {$NEWS[news].header}
<br />
<font size="1px">posted {$NEWS[news].time|date_format:"%b %e, %Y at %H:%M"}{if $HIDEAUTHOR|default:"0" == 0} by <b>{$NEWS[news].author}</b>{/if}</font>
<font size="1px">posted {$NEWS[news].time|date_format:$GLOBAL.config.date}{if $HIDEAUTHOR|default:"0" == 0} by <b>{$NEWS[news].author}</b>{/if}</font>
</div>
<div class="panel-body">
{$NEWS[news].content nofilter}

View File

@ -46,7 +46,7 @@
{/if}
</td>
<td>{if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if}</td>
<td class="text-right">{$BLOCKSFOUND[block].time|date_format:"%d/%m/%Y %H:%M:%S"}</td>
<td class="text-right">{$BLOCKSFOUND[block].time|date_format:$GLOBAL.config.date}</td>
<td class="text-right">{$BLOCKSFOUND[block].difficulty|number_format:"4"}</td>
<td class="text-right">{$BLOCKSFOUND[block].amount|number_format:"2"}</td>
<td class="text-right">

View File

@ -23,7 +23,7 @@
<td>{$BLOCKSFOUND[block].height}</td>
{/if}
<td>{if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if}</td>
<td>{$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M:%S"}</td>
<td>{$BLOCKSFOUND[block].time|date_format:$GLOBAL.config.date}</td>
<td class="text-right">{$BLOCKSFOUND[block].shares|number_format}</td>
</tr>
{/section}

View File

@ -23,7 +23,7 @@
<td class="text-center"><img src="{$GLOBALASSETS}/images/flags/{$node.0}.png"/></td>
{if $node|count > 1}<td class="text-center">{$node.1}</td>{/if}
<td class="text-center"><span class="ur-status-{$CODES[$item.status]|lower}">{$CODES[$item.status]}</span></td>
<td class="text-center">{$item.log.1.datetime|date_format:"%b %d, %Y %H:%M"}</td>
<td class="text-center">{$item.log.1.datetime|date_format:$GLOBAL.config.date}</td>
<td>
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{$item.customuptimeratio.0}" aria-valuemin="0" aria-valuemax="100" style="width: {$item.customuptimeratio.0}%">
@ -58,7 +58,7 @@
</table>
</div>
<div class="panel-footer">
<h6>Last update {$UPDATED|date_format:"%b %d, %Y %H:%M"}</h6>
<h6>Last update {$UPDATED|date_format:$GLOBAL.config.date}</h6>
</div>
</div>
</div>