mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-20 18:09:54 +00:00
css: add css classes to user and pool block status
and rename exchange state to pending if auto exchange is not enabled
This commit is contained in:
parent
4ef1a8103c
commit
e3a1ed8d33
2 changed files with 53 additions and 31 deletions
|
@ -27,18 +27,29 @@ $criteria->limit = $count;
|
|||
$criteria->order = 't.time DESC';
|
||||
$db_blocks = getdbolistWith('db_blocks', 'coin', $criteria);
|
||||
|
||||
echo "<table class='dataGrid2'>";
|
||||
echo "<thead>";
|
||||
echo "<tr>";
|
||||
echo "<td></td>";
|
||||
echo "<th>Name</th>";
|
||||
echo "<th align=right>Amount</th>";
|
||||
echo "<th align=right>Difficulty</th>";
|
||||
echo "<th align=right>Block</th>";
|
||||
echo "<th align=right>Time</th>";
|
||||
echo "<th align=right>Status</th>";
|
||||
echo "</tr>";
|
||||
echo "</thead>";
|
||||
echo <<<EOT
|
||||
|
||||
<style type="text/css">
|
||||
span.block { padding: 2px; display: inline-block; text-align: center; min-width: 75px; }
|
||||
span.block.new { color: white; background-color: #ad4ef0; }
|
||||
span.block.orphan { color: white; background-color: #d9534f; }
|
||||
span.block.immature { color: white; background-color: #f0ad4e; }
|
||||
span.block.confirmed { color: white; background-color: #5cb85c; }
|
||||
</style>
|
||||
|
||||
<table class="dataGrid2">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<th>Name</th>
|
||||
<th align="right">Amount</th>
|
||||
<th align="right">Difficulty</th>
|
||||
<th align="right">Block</th>
|
||||
<th align="right">Time</th>
|
||||
<th align="right">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
EOT;
|
||||
|
||||
foreach($db_blocks as $db_block)
|
||||
{
|
||||
|
@ -82,16 +93,16 @@ foreach($db_blocks as $db_block)
|
|||
echo "<td align=right style='font-size: .8em'>";
|
||||
|
||||
if($db_block->category == 'orphan')
|
||||
echo "<span style='padding: 2px; color: white; background-color: #d9534f'>Orphan</span>";
|
||||
echo '<span class="block orphan">Orphan</span>';
|
||||
|
||||
else if($db_block->category == 'immature')
|
||||
echo "<span style='padding: 2px; color: white; background-color: #f0ad4e'>Immature ($db_block->confirmations)</span>";
|
||||
echo '<span class="block immature">Immature ('.$db_block->confirmations.')</span>';
|
||||
|
||||
else if($db_block->category == 'generate')
|
||||
echo "<span style='padding: 2px; color: white; background-color: #5cb85c'>Confirmed</span>";
|
||||
echo '<span class="block confirmed">Confirmed</span>';
|
||||
|
||||
else if($db_block->category == 'new')
|
||||
echo "<span style='padding: 2px; color: white; background-color: #ad4ef0'>New</span>";
|
||||
echo '<span class="block new">New</span>';
|
||||
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
|
|
@ -18,18 +18,29 @@ $count = $count? $count: 50;
|
|||
WriteBoxHeader("Last $count Earnings: $user->username");
|
||||
$earnings = getdbolist('db_earnings', "userid=$user->id order by create_time desc limit :count", array(':count'=>$count));
|
||||
|
||||
echo "<table class='dataGrid2'>";
|
||||
echo "<thead>";
|
||||
echo "<tr>";
|
||||
echo "<td></td>";
|
||||
echo "<th>Name</th>";
|
||||
echo "<th align=right>Amount</th>";
|
||||
echo "<th align=right>Percent</th>";
|
||||
echo "<th align=right>mBTC</th>";
|
||||
echo "<th align=right>Time</th>";
|
||||
echo "<th align=right>Status</th>";
|
||||
echo "</tr>";
|
||||
echo "</thead>";
|
||||
echo <<<EOT
|
||||
|
||||
<style type="text/css">
|
||||
span.block { padding: 2px; display: inline-block; text-align: center; min-width: 75px; }
|
||||
span.block.immature { color: white; background-color: #f0ad4e; }
|
||||
span.block.exchange { color: white; background-color: #5cb85c; }
|
||||
span.block.cleared { color: white; background-color: #5cb85c; }
|
||||
</style>
|
||||
|
||||
<table class="dataGrid2">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<th>Name</th>
|
||||
<th align=right>Amount</th>
|
||||
<th align=right>Percent</th>
|
||||
<th align=right>mBTC</th>
|
||||
<th align=right>Time</th>
|
||||
<th align=right>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
EOT;
|
||||
|
||||
$showrental = (bool) YAAMP_RENTAL;
|
||||
|
||||
|
@ -81,13 +92,13 @@ foreach($earnings as $earning)
|
|||
echo "<td align=right style='font-size: .8em'>";
|
||||
|
||||
if($earning->status == 0)
|
||||
echo "Immature ($block->confirmations)";
|
||||
echo '<span class="block immature">Immature ('.$block->confirmations.')</span>';
|
||||
|
||||
else if($earning->status == 1)
|
||||
echo 'Exchange';
|
||||
echo '<span class="block exchange">'.(YAAMP_ALLOW_EXCHANGE ? 'Exchange' : 'Pending').'</span>';
|
||||
|
||||
else if($earning->status == 2)
|
||||
echo 'Cleared';
|
||||
echo '<span class="block cleared">Cleared</span>';
|
||||
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
|
Loading…
Add table
Reference in a new issue