Skip to content

Commit

Permalink
Hover text on stat.php unranked user rows. #741
Browse files Browse the repository at this point in the history
  • Loading branch information
jteresco committed Jun 30, 2024
1 parent 3776611 commit 6f05f9f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions stat.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@
if ($row['includeInRanks'] == "1") {
$rank++;
$shownRank = $rank;
$ttip = "";
}
else {
$shownRank = "";
$shownRank = "    ";
$ttip = "title='".$row['traveler']." is specified as an unranked user'";
}
if ($row['traveler'] == $tmuser) {
$highlight = 'user-highlight';
Expand All @@ -166,7 +168,7 @@
$print_distance = tm_convert_distance($row['clinchedMileage']);
$style = 'style="text-align: right; background-color: '.tm_color_for_amount_traveled($row['clinchedMileage'],$totalMileage).';"';
echo <<<HTML
<tr class="$highlight" onClick="window.document.location='/user?u={$row['traveler']}';">
<tr ${ttip} class="$highlight" onClick="window.document.location='/user?u={$row['traveler']}';">
<td style="text-align: right;">{$shownRank}</td><td>{$row['traveler']}</td><td {$style}>{$print_distance}</td><td {$style} data-sort="{$row['percentage']}">{$row['percentage']}%</td>
</tr>
HTML;
Expand Down Expand Up @@ -213,9 +215,11 @@
if ($row['includeInRanks'] == "1") {
$rank++;
$shownRank = $rank;
$ttip = "";
}
else {
$shownRank = "";
$shownRank = "&nbsp;&nbsp;&nbsp;&nbsp;";
$ttip = "title='".$row['traveler']." is specified as an unranked user'";
}
if ($row['traveler'] == $tmuser) {
$highlight = 'user-highlight';
Expand All @@ -225,7 +229,7 @@
$print_distance = tm_convert_distance($row['clinchedMileage']);
$style = 'style="text-align: right; background-color: '.tm_color_for_amount_traveled($row['clinchedMileage'],$totalPreviewMileage).';"';
echo <<<HTML
<tr class="$highlight" onClick="window.document.location='/user?u={$row['traveler']}';">
<tr {$ttip} class="$highlight" onClick="window.document.location='/user?u={$row['traveler']}';">
<td style="text-align: right;">{$shownRank}</td><td>{$row['traveler']}</td><td {$style}>{$print_distance}</td><td {$style} data-sort="{$row['percentage']}">{$row['percentage']}%</td>
</tr>
HTML;
Expand Down

0 comments on commit 6f05f9f

Please sign in to comment.