Skip to content

Commit

Permalink
Highlight order_by column
Browse files Browse the repository at this point in the history
  • Loading branch information
Ram81 committed Aug 18, 2021
1 parent f5688db commit ec882e0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/src/views/web/challenge/leaderboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ <h5 class="w-300">Leaderboard</h5>
<td ng-repeat="key in challenge.leaderboard[0].leaderboard__schema.labels">
<a href="#"
ng-click="$parent.challenge.sortLeaderboard($parent.challenge, 'number', $index);">
<span class="w-300 fs-20 leaderboard-label" ng-if="challenge.isMetricOrderedAscending(key)">{{key}} (&#x2193;) <span class="description" ng-if="challenge.getLabelDescription(key).length != 0">{{challenge.getLabelDescription(key)}}</span></span>
<span class="w-300 fs-20 leaderboard-label" ng-if="!challenge.isMetricOrderedAscending(key)">{{key}} (&#x2191;) <span class="description" ng-if="challenge.getLabelDescription(key).length != 0">{{challenge.getLabelDescription(key)}}</span></span>
<span class="w-300 fs-20 leaderboard-label" ng-if="challenge.isMetricOrderedAscending(key) && key != challenge.orderLeaderboardBy ">{{key}} (&#x2193;) <span class="description" ng-if="challenge.getLabelDescription(key).length != 0">{{challenge.getLabelDescription(key)}}</span></span>
<span class="w-300 fs-20 leaderboard-label" ng-if="!challenge.isMetricOrderedAscending(key) && key != challenge.orderLeaderboardBy">{{key}} (&#x2191;) <span class="description" ng-if="challenge.getLabelDescription(key).length != 0">{{challenge.getLabelDescription(key)}}</span></span>
<span class="w-400 fs-20 leaderboard-label" ng-if="challenge.isMetricOrderedAscending(key) && key == challenge.orderLeaderboardBy ">{{key}} (&#x2193;) <span class="description" ng-if="challenge.getLabelDescription(key).length != 0">{{challenge.getLabelDescription(key)}}</span></span>
<span class="w-400 fs-20 leaderboard-label" ng-if="!challenge.isMetricOrderedAscending(key) && key == challenge.orderLeaderboardBy">{{key}} (&#x2191;) <span class="description" ng-if="challenge.getLabelDescription(key).length != 0">{{challenge.getLabelDescription(key)}}</span></span>
<span class="fa-stack fa-1x">
<i class="fa fa-sort-asc fa-stack-1x"
ng-class="$parent.challenge.reverseSort && $parent.challenge.sortColumn == 'number' && $parent.challenge.columnIndexSort == $index ? 'text-dark-black' : 'text-light-black w-300'"></i>
Expand Down Expand Up @@ -161,7 +163,8 @@ <h5 class="w-300">Leaderboard</h5>
ng-if="key.submission__is_verified_by_host"></span>
</td>
<td ng-repeat="(i, score) in key.result track by $index">
{{score | number : challenge.selectedPhaseSplit.leaderboard_decimal_precision}}
<span class="w-400 fs-16" ng-if="challenge.leaderboard[0].leaderboard__schema.labels[i] == challenge.orderLeaderboardBy">{{score | number : challenge.selectedPhaseSplit.leaderboard_decimal_precision}}</span>
<span class="w-300 fs-16" ng-if="challenge.leaderboard[0].leaderboard__schema.labels[i] != challenge.orderLeaderboardBy">{{score | number : challenge.selectedPhaseSplit.leaderboard_decimal_precision}}</span>
<span class="new badge orange-background fs-16 w-300 partial-evaluation"
data-badge-caption="E" ng-if="score === '#'"></span>
<span ng-if="key.error != nil"> ±
Expand Down

0 comments on commit ec882e0

Please sign in to comment.