Skip to content

Commit

Permalink
Merge pull request #1147 from codalab/fix-hidden-leaderboard
Browse files Browse the repository at this point in the history
Hide leaderboard when leaderboard is hidden
  • Loading branch information
Didayolo authored Sep 9, 2023
2 parents 49f73bf + a7621c9 commit e7ad05b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/static/riot/competitions/detail/_tabs.tag
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,18 @@
</div>
</div>
</div>
<leaderboards class="leaderboard-table"
<!-- If there's no leaderboard, show this message -->
<div show="{_.isEmpty(competition.leaderboards)}">
<div class="center aligned"><h2>No visible leaderboard for this benchmark</h2></div>
</div>
<!-- Else, show the leaderboard -->
<div show="{!_.isEmpty(competition.leaderboards)}">
<leaderboards class="leaderboard-table"
phase_id="{ self.selected_phase_index }"
is_admin="{competition.admin}">
</leaderboards>
</div>
<div show="{!loading && _.isEmpty(competition.leaderboards)}">
<div class="center aligned"><h2>No Visible Leaderboards for this competition</h2></div>
</div>

</leaderboards>
</div>
</div>
</div>
</div>

Expand Down

0 comments on commit e7ad05b

Please sign in to comment.