properly highlight user in top tables even if row is of class even

This commit is contained in:
Sebastian Grewe 2013-05-22 17:09:49 +02:00
parent c30bd0ee60
commit e078c5447a
2 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{include file="global/block_header.tpl" ALIGN="left" BLOCK_HEADER="Top Hashrate Contributers"}
<center>
<table width="100%" border="0" style="font-size:13px;" class="sortable">
<table width="100%" border="0" style="font-size:13px;">
<thead>
<tr style="background-color:#B6DAFF;">
<th align="left">Rank</th>
@ -13,7 +13,7 @@
{assign var=rank value=1}
{assign var=listed value=0}
{section contrib $CONTRIBHASHES}
<tr class="{cycle values="odd,even"}" {if $GLOBAL.userdata.username == $CONTRIBHASHES[contrib].account}{assign var=listed value=1} style="background-color:#99EB99;"{/if}>
<tr{if $GLOBAL.userdata.username == $CONTRIBHASHES[contrib].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<td>{$rank++}</td>
<td>{$CONTRIBHASHES[contrib].account}</td>
<td>{$CONTRIBHASHES[contrib].hashrate|number_format}</td>
@ -30,6 +30,5 @@
{/if}
</tbody>
</table>
<div id="pagination" class="pagination"></div>
</center>
{include file="global/block_footer.tpl"}

View File

@ -1,6 +1,6 @@
{include file="global/block_header.tpl" ALIGN="right" BLOCK_HEADER="Top Share Contributers"}
<center>
<table width="100%" border="0" style="font-size:13px;" class="sortable">
<table width="100%" border="0" style="font-size:13px;">
<thead>
<tr style="background-color:#B6DAFF;">
<th align="left">Rank</th>
@ -12,7 +12,7 @@
{assign var=rank value=1}
{assign var=listed value=0}
{section hashrate $CONTRIBSHARES}
<tr class="{cycle values="odd,even"}"{if $GLOBAL.userdata.username == $CONTRIBSHARES[hashrate].account}{assign var=listed value=1} style="background-color:#99EB99;"{/if}>
<tr{if $GLOBAL.userdata.username == $CONTRIBSHARES[hashrate].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<td>{$rank++}</td>
<td>{$CONTRIBSHARES[hashrate].account}</td>
<td>{$CONTRIBSHARES[hashrate].shares|number_format}</td>
@ -27,6 +27,5 @@
{/if}
</tbody>
</table>
<div id="pagination" class="pagination"></div>
</center>
{include file="global/block_footer.tpl"}