php-mpos/public/templates/mmcFE/statistics/graphs/both.tpl
Sebastian Grewe 14c0535b10 Fill empty hours with proper data
* Properly sort the array prior to sending it back
 * Sort from current to one hour earlier for proper data display
 * Adjusted templates to use new sorted arrays

Fixes #606
2013-08-15 09:58:33 +02:00

31 lines
798 B
Smarty

{if is_array($YOURHASHRATES) && is_array($POOLHASHRATES)}
<div class="block_content tab_content" id="both" style="padding-left:30px;">
<table width="60%" class="stats" rel="area">
<caption>Your vs Pool Hashrate</caption>
<thead>
<tr>
<td></td>
{foreach $YOURHASHRATES as $hour=>$hashrate}
<th scope="col">{$hour|default:"0"}:00</th>
{/foreach}
</tr>
</thead>
<tbody>
<tr>
<th scope="row">{$smarty.session.USERDATA.username}</th>
{foreach $YOURHASHRATES as $hour=>$hashrate}
<td>{$hashrate|default:"0"}</td>
{/foreach}
</tr>
<tr>
<th scope="row">Pool</th>
{foreach $POOLHASHRATES as $hour=>$hashrate}
<td>{$hashrate|default:"0"}</td>
{/foreach}
</tr>
</tbody>
</table>
<br />
</div>
{/if}