[IMRPOVED] MPOS Theme Dashboard

* [CHANGE] Removed `default_<payout_sytem>` files
* [ADDED] Added generic, simple templates to remove code duplication
* [CHANGE] New default payment system template expanding on payout type
This commit is contained in:
Sebastian Grewe 2013-10-25 14:17:36 +02:00
parent fa4d666f1f
commit f55d0ba982
9 changed files with 143 additions and 226 deletions

View File

@ -1,26 +1,47 @@
<article class="module width_quarter">
<header><h3>Account Information</h3></header>
<div class="module_content">
<table class="tablesorter" cellspacing="0">
<tr>
<td colspan="2">
{if $GLOBAL.userdata.no_fees}
<p>You are mining without any pool fees applied.</p>
You are mining without any pool fees applied and
{else if $GLOBAL.fees > 0}
<p>You are mining at <font color="orange">{$GLOBAL.fees|escape}%</font> pool fee.</p>
You are mining at <font color="orange">{$GLOBAL.fees|escape}%</font> pool fee and
{else}
This pool does not apply fees and
{/if}
{if $GLOBAL.userdata.donate_percent > 0}
<p>You are donating <font color="green">{$GLOBAL.userdata.donate_percent|escape}%</font> of your mined coins to the pool.</p>
you donate <font color="green">{$GLOBAL.userdata.donate_percent|escape}%</font>.
{else}
<p>Please consider <a href="{$smarty.server.PHP_SELF}?page=account&action=edit">donating</a> some of your mined coins to the pool operator.</p>
you are not <a href="{$smarty.server.PHP_SELF}?page=account&action=edit">donating</a>.
{/if}
<table width="100%">
<caption style="text-align: left;"><b>{$GLOBAL.config.currency} Account Balance</b></caption>
<tr>
<th align="left">Confirmed</th>
<td id="b-confirmed" align="right"></td>
</tr>
<tr>
<th align="left">Unconfirmed</th>
<td id="b-unconfirmed" align="right"></td>
</td>
</tr>
</table>
<table class="tablesorter" cellspacing="0">
<thead>
<tr><th colspan="2"><b>{$GLOBAL.config.currency} Account Balance</b></th></tr>
</thead>
<tr>
<td align="left" style="font-weight: bold;">Confirmed</td>
<td align="right"><span id="b-confirmed" class="confirmed" style="width: calc(80px); font-size: 12px;"></span></td>
</tr>
<tr>
<td align="left" style="font-weight: bold;">Unconfirmed</td>
<td align="right"><span id="b-unconfirmed" class="unconfirmed" style="width: calc(80px); font-size: 12px;"></span></td>
</tr>
</table>
<table class="tablesorter" cellspacing="0">
<thead>
<tr>
<th align="left">Worker</th>
<th align="right">Hashrate</th>
<th align="right" style="padding-right: 10px;">Difficulty</th>
</tr>
</thead>
<tbody id="b-workers">
<td colspan="3" align="center">Loading worker information</td>
</tbody>
</tr>
</table>
</div>
</article>

View File

@ -1,8 +1,7 @@
{if $smarty.session.AUTHENTICATED|default}
{assign var=payout_system value=$GLOBAL.config.payout_system}
{include file="dashboard/overview.tpl"}
{include file="dashboard/default_$payout_system.tpl"}
{include file="dashboard/system_stats.tpl"}
{include file="dashboard/round_data.tpl"}
{include file="dashboard/account_data.tpl"}{include file="dashboard/workers.tpl"}
{include file="dashboard/account_data.tpl"}
{include file="dashboard/js.tpl"}
{/if}

View File

@ -1,73 +0,0 @@
<article class="module width_quarter">
<header><h3>PPLNS Stats</h3></header>
<div class="module_content">
<table width="100%">
<tbody>
<tr>
<td><b>PPLNS Target</b></td>
<td id="b-pplns" class="right"></td>
</tr>
<tr>
<td colspan="2"><b><u>Your Stats</u></b></td>
</tr>
<tr>
<td><b>Hashrate</b></td>
<td class="right"><span id="b-hashrate"></span> {$GLOBAL.hashunits.pool}</td>
</tr>
<tr>
<td><b>Share Rate</b></td>
<td class="right"><span id="b-sharerate"></span> S/s</td>
</tr>
<tr>
<td colspan="2"><b><u>Round Shares</u></b> <span id='tt'><img src='{$PATH}/images/questionmark.png' height='15px' width='15px' title='Submitted shares since last found block (ie. round shares)'></span></td>
</tr>
<tr>
<td><b>Pool Valid</b></td>
<td id="b-pvalid" class="right"></td>
</tr>
<tr>
<td><b>Your Valid<b></td>
<td id="b-yvalid" class="right"></td>
</tr>
<tr>
<td><b>Pool Invalid</b></td>
<td id="b-pivalid" class="right"></td>
</tr>
<tr>
<td><b>Your Invalid</b></td>
<td id="b-yivalid" class="right"></td>
</tr>
<tr>
<td colspan="2"><b><u>{$GLOBAL.config.currency} Round Estimate</u></b></td>
</tr>
<tr>
<td><b>Block</b></td>
<td id="b-block" class="right"></td>
</tr>
<tr>
<td><b>Fees</b></td>
<td id="b-fee" class="right"></td>
</tr>
<tr>
<td><b>Donation</b></td>
<td id="b-donation" class="right"></td>
</tr>
<tr>
<td><b>Payout</b></td>
<td id="b-payout" class="right"></td>
</tr>
<tr>
<td colspan="2"><b><u>{$GLOBAL.config.currency} Info</u></b></td>
</tr>
<tr>
<td><b>Current Difficulty</b></td>
<td id="b-diff" class="right"></td>
</tr>
<tr>
<td><b>Current Block</b></td>
<td id="b-nblock" class="right"></td>
</tr>
</tbody>
</table>
</div>
</article>

View File

@ -1,73 +0,0 @@
<article class="module width_quarter">
<header><h3>PPS Stats</h3></header>
<div class="module_content">
<table width="100%">
<tbody>
<tr>
<td><b>PPS Value</b></td>
<td>{$GLOBAL.ppsvalue}</td>
</tr>
<tr>
<td><b>PPS Difficulty</b></td>
<td id="b-ppsdiff">{$GLOBAL.userdata.sharedifficulty|number_format:"2"}</td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2"><b><u>Round Shares</u></b> <span id='tt'><img src='{$PATH}/images/questionmark.png' height='15px' width='15px' title='Submitted shares since last found block (ie. round shares)'></span></td>
</tr>
<tr>
<td><b>Pool Valid</b></td>
<td id="b-pvalid" align="right"></td>
</tr>
<tr>
<td><b>Your Valid</b></td>
<td id="b-yvalid" align="right"></td>
</tr>
<tr>
<td><b>Pool Invalid</b></td>
<td id="b-pivalid" align="right"></td>
</tr>
<tr>
<td><b>Your Invalid</b></td>
<td id="b-yinvalid" align="right"></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td colspan="2"><b><u>{$GLOBAL.config.currency} Estimates</u></b></td></tr>
<tr>
<td><b>in 1 hour</b></td>
<td id="b-est1hour" align="right">{$GLOBAL.userdata.estimates.hours1|round:"8"}</td>
</tr>
<tr>
<td><b>in 24 hours</b></td>
<td id="b-est24hours" align="right">{($GLOBAL.userdata.estimates.hours24)|round:"8"}</td>
</tr>
<tr>
<td><b>in 7 days</b></td>
<td id="b-est7days" align="right">{($GLOBAL.userdata.estimates.days7)|round:"8"}</td>
</tr>
<tr>
<td><b>in 14 days</b></td>
<td id="b-est14days" align="right">{($GLOBAL.userdata.estimates.days14)|round:"8"}</td>
</tr>
<tr>
<td><b>in 30 days</b></td>
<td id="b-est30days" align="right">{($GLOBAL.userdata.estimates.days30)|round:"8"}</td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2"><b><u>{$GLOBAL.config.currency} Info</u></b></td>
</tr>
<tr>
<td><b>Current Difficulty</b></td>
<td id="b-diff" align="right"></td>
</tr>
<tr>
<td><b>Current Block</b></td>
<td id="b-nblock" align="right"></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
</tbody>
</table>
</div>
</article>

View File

@ -1,62 +0,0 @@
<article class="module width_quarter">
<header><h3>Prop Stats</h3></header>
<div class="module_content">
<table width="100%">
<tbody>
<tr>
<td colspan="2"><b><u>Round Shares</u></b> <span id='tt'><img src='{$PATH}/images/questionmark.png' height='15px' width='15px' title='Submitted shares since last found block (ie. round shares)'></span></td>
</tr>
<tr>
<td><b>Pool Valid</b></td>
<td id="b-pvalid" class="right"></td>
</tr>
<tr>
<td><b>Your Valid<b></td>
<td id="b-yvalid" class="right"></td>
</tr>
<tr>
<td><b>Pool Invalid</b></td>
<td id="b-pivalid" class="right"></td>
</tr>
<tr>
<td><b>Your Invalid</b></td>
<td id="b-yivalid" class="right"></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2"><b><u>{$GLOBAL.config.currency} Round Estimate</u></b></td>
</tr>
<tr>
<td><b>Block</b></td>
<td id="b-block" class="right"></td>
</tr>
<tr>
<td><b>Fees</b></td>
<td id="b-fee" class="right"></td>
</tr>
<tr>
<td><b>Donation</b></td>
<td id="b-donation" class="right"></td>
</tr>
<tr>
<td><b>Payout</b></td>
<td id="b-payout" class="right"></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2"><b><u>{$GLOBAL.config.currency} Info</u></b></td>
</tr>
<tr>
<td><b>Current Difficulty</b></td>
<td id="b-diff" class="right"></td>
</tr>
<tr>
<td><b>Current Block</b></td>
<td id="b-nblock" class="right"></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
</tbody>
</table>
</div>
</article>

View File

@ -0,0 +1,11 @@
<tr>
<td colspan="2"><b><u>Network Info</u></b></td>
</tr>
<tr>
<td><b>Difficulty</b></td>
<td id="b-diff" class="right"></td>
</tr>
<tr>
<td><b>Current Block</b></td>
<td id="b-nblock" class="right"></td>
</tr>

View File

@ -0,0 +1,43 @@
<tr>
<td colspan="2"><b><u>{$GLOBAL.config.currency} Round Estimate</u></b></td>
</tr>
{if $GLOBAL.config.payout_system != 'pps'}
<tr>
<td><b>Block</b></td>
<td id="b-block" class="right"></td>
</tr>
<tr>
<td><b>Fees</b></td>
<td id="b-fee" class="right"></td>
</tr>
<tr>
<td><b>Donation</b></td>
<td id="b-donation" class="right"></td>
</tr>
<tr>
<td><b>Payout</b></td>
<td id="b-payout" class="right"></td>
</tr>
{else}
<tr>
<td><b>in 1 hour</b></td>
<td id="b-est1hour" align="left">{$GLOBAL.userdata.estimates.hours1|round:"8"}</td>
</tr>
<tr>
<td><b>in 24 hours</b></td>
<td id="b-est24hours" align="left">{($GLOBAL.userdata.estimates.hours24)|round:"8"}</td>
</tr>
<tr>
<td><b>in 7 days</b></td>
<td id="b-est7days" align="left">{($GLOBAL.userdata.estimates.days7)|round:"8"}</td>
</tr>
<tr>
<td><b>in 14 days</b></td>
<td id="b-est14days" align="left">{($GLOBAL.userdata.estimates.days14)|round:"8"}</td>
</tr>
<tr>
<td><b>in 30 days</b></td>
<td id="b-est30days" align="left">{($GLOBAL.userdata.estimates.days30)|round:"8"}</td>
</tr>
{/if}

View File

@ -0,0 +1,19 @@
<tr>
<td colspan="2"><b><u>Round Shares</u></b> <span id='tt'><img src='{$PATH}/images/questionmark.png' height='15px' width='15px' title='Submitted shares since last found block (ie. round shares)'></span></td>
</tr>
<tr>
<td><b>Pool Valid</b></td>
<td class="right"><span id="b-pvalid" class="confirmed" style="width: 100%; font-size: 12px;"></td>
</tr>
<tr>
<td><b>Your Valid<b></td>
<td class="right"><span id="b-yvalid" class="confirmed" style="width: 100%; font-size: 12px;"></td>
</tr>
<tr>
<td><b>Pool Invalid</b></td>
<td class="right"><span id="b-pivalid" class="orphan" style="width: 100%; font-size: 12px;"></td>
</tr>
<tr>
<td><b>Your Invalid</b></td>
<td class="right"><span id="b-yivalid" class="orphan" style="width: 100%; font-size: 12px;"></td>
</tr>

View File

@ -0,0 +1,32 @@
<article class="module width_quarter">
<header><h3>{$GLOBAL.config.payout_system|capitalize} Stats</h3></header>
<div class="module_content">
<table width="100%">
<tbody>
{if $GLOBAL.config.payout_system == 'pplns'}
<tr>
<td><b>PPLNS Target</b></td>
<td id="b-pplns" class="right"></td>
</tr>
{elseif $GLOBAL.config.payout_system == 'pps'}
<tr>
<td><b>PPS Value</b></td>
<td>{$GLOBAL.ppsvalue}</td>
</tr>
<tr>
<td><b>PPS Difficulty</b></td>
<td id="b-ppsdiff">{$GLOBAL.userdata.sharedifficulty|number_format:"2"}</td>
</tr>
{/if}
<tr><td colspan="2">&nbsp;</td></tr>
{include file="dashboard/round_shares.tpl"}
<tr><td colspan="2">&nbsp;</td></tr>
{include file="dashboard/payout_estimates.tpl"}
<tr><td colspan="2">&nbsp;</td></tr>
{include file="dashboard/network_info.tpl"}
<tr><td colspan="2">&nbsp;</td></tr>
</tbody>
</table>
</div>
</article>