[UPDATE] Formatting

This commit is contained in:
Sebastian Grewe 2014-03-01 17:55:12 +01:00
parent 0445011a79
commit aaf5d6ae58

View File

@ -16,55 +16,59 @@
<th>Difficulty</th> <th>Difficulty</th>
<th>Amount</th> <th>Amount</th>
<th>Expected Shares</th> <th>Expected Shares</th>
{if $GLOBAL.config.payout_system == 'pplns'}<th>PPLNS Shares</th>{/if} {if $GLOBAL.config.payout_system == 'pplns'}<th>PPLNS Shares</th>{/if}
<th>Actual Shares</th> <th>Actual Shares</th>
<th style="padding-right: 25px;">Percentage</th> <th style="padding-right: 25px;">Percentage</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{assign var=count value=0} {assign var=count value=0}
{assign var=totalexpectedshares value=0} {assign var=totalexpectedshares value=0}
{assign var=totalshares value=0} {assign var=totalshares value=0}
{assign var=pplnsshares value=0} {assign var=pplnsshares value=0}
{section block $BLOCKSFOUND} {section block $BLOCKSFOUND}
{assign var="totalshares" value=$totalshares+$BLOCKSFOUND[block].shares}
{assign var="count" value=$count+1}
{if $GLOBAL.config.payout_system == 'pplns'}{assign var="pplnsshares" value=$pplnsshares+$BLOCKSFOUND[block].pplns_shares}{/if}
<tr> <tr>
{if ! $GLOBAL.website.blockexplorer.disabled} {assign var="totalshares" value=$totalshares+$BLOCKSFOUND[block].shares}
{assign var="count" value=$count+1}
{if $GLOBAL.config.payout_system == 'pplns'}{assign var="pplnsshares" value=$pplnsshares+$BLOCKSFOUND[block].pplns_shares}{/if}
{if ! $GLOBAL.website.blockexplorer.disabled}
<td><a href="{$smarty.server.SCRIPT_NAME}?page=statistics&action=round&height={$BLOCKSFOUND[block].height}">{$BLOCKSFOUND[block].height}</a></td> <td><a href="{$smarty.server.SCRIPT_NAME}?page=statistics&action=round&height={$BLOCKSFOUND[block].height}">{$BLOCKSFOUND[block].height}</a></td>
{else} {else}
<td>{$BLOCKSFOUND[block].height}</td> <td>{$BLOCKSFOUND[block].height}</td>
{/if} {/if}
<td> <td>
{if $BLOCKSFOUND[block].confirmations >= $GLOBAL.confirmations} {if $BLOCKSFOUND[block].confirmations >= $GLOBAL.confirmations}
<span class="confirmed">Confirmed</span> <span class="confirmed">Confirmed</span>
{else if $BLOCKSFOUND[block].confirmations == -1} {else if $BLOCKSFOUND[block].confirmations == -1}
<span class="orphan">Orphan</span> <span class="orphan">Orphan</span>
{else} {else}
<span class="unconfirmed">{$GLOBAL.confirmations - $BLOCKSFOUND[block].confirmations} left</span> <span class="unconfirmed">{$GLOBAL.confirmations - $BLOCKSFOUND[block].confirmations} left</span>
{/if} {/if}
</td> </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>{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:"%d/%m %H:%M:%S"}</td>
<td>{$BLOCKSFOUND[block].difficulty|number_format:"2"}</td> <td>{$BLOCKSFOUND[block].difficulty|number_format:"2"}</td>
<td>{$BLOCKSFOUND[block].amount|number_format:"2"}</td> <td>{$BLOCKSFOUND[block].amount|number_format:"2"}</td>
<td> <td>
{assign var="totalexpectedshares" value=$totalexpectedshares+$BLOCKSFOUND[block].estshares} {assign var="totalexpectedshares" value=$totalexpectedshares+$BLOCKSFOUND[block].estshares}
{$BLOCKSFOUND[block].estshares|number_format} {$BLOCKSFOUND[block].estshares|number_format}
</td> </td>
{if $GLOBAL.config.payout_system == 'pplns'}<td>{$BLOCKSFOUND[block].pplns_shares|number_format}</td>{/if} {if $GLOBAL.config.payout_system == 'pplns'}
<td>{$BLOCKSFOUND[block].pplns_shares|number_format}</td>
{/if}
<td>{$BLOCKSFOUND[block].shares|number_format}</td> <td>{$BLOCKSFOUND[block].shares|number_format}</td>
<td style="padding-right: 25px;"> <td style="padding-right: 25px;">
{math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares} {math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares}
<font color="{if ($percentage <= 100)}green{else}red{/if}">{$percentage|number_format:"2"}</font> <font color="{if ($percentage <= 100)}green{else}red{/if}">{$percentage|number_format:"2"}</font>
</td> </td>
</tr> </tr>
{/section} {/section}
<tr> <tr>
<td colspan="6"><b>Totals</b></td> <td colspan="6"><b>Totals</b></td>
<td>{$totalexpectedshares|number_format}</td> <td>{$totalexpectedshares|number_format}</td>
{if $GLOBAL.config.payout_system == 'pplns'}<td>{$pplnsshares|number_format}</td>{/if} {if $GLOBAL.config.payout_system == 'pplns'}
<td>{$pplnsshares|number_format}</td>
{/if}
<td>{$totalshares|number_format}</td> <td>{$totalshares|number_format}</td>
<td style="padding-right: 25px;">{if $count > 0}<font color="{if (($totalshares / $totalexpectedshares * 100) <= 100)}green{else}red{/if}">{($totalshares / $totalexpectedshares * 100)|number_format:"2"}</font>{else}0{/if}</td> <td style="padding-right: 25px;">{if $count > 0}<font color="{if (($totalshares / $totalexpectedshares * 100) <= 100)}green{else}red{/if}">{($totalshares / $totalexpectedshares * 100)|number_format:"2"}</font>{else}0{/if}</td>
</tr> </tr>
@ -75,8 +79,8 @@
<div class="panel-footer"> <div class="panel-footer">
{if $GLOBAL.config.payout_system != 'pps'}<ul><li>Note: Round Earnings are not credited until <font color="orange">{$GLOBAL.confirmations}</font> confirms.</li></ul>{/if} {if $GLOBAL.config.payout_system != 'pps'}<ul><li>Note: Round Earnings are not credited until <font color="orange">{$GLOBAL.confirmations}</font> confirms.</li></ul>{/if}
</div> </div>
<!-- /.panel --> <!-- /.panel -->
</div> </div>
<!-- /.col-lg-12 --> <!-- /.col-lg-12 -->
</div> </div>
</div> </div>