Skip to content

Commit

Permalink
Added contestant order in WSContest contest page
Browse files Browse the repository at this point in the history
Added contestant rank on the contest page of WSContest. It will be beneficial to the contestant as well as admins to be able to tell, for example: who are the top 10 contestant, how many total contestants are there, etc.

Bug: T331507
  • Loading branch information
Avartii authored Jul 11, 2024
1 parent b15e629 commit 9cbedc0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"contest": "Contest: $1",
"details": "Details",
"unable-to-save": "Unable to save: $1",
"rank": "Rank",
"user": "User",
"points": "Points",
"contributions": "Contributions",
Expand Down
1 change: 1 addition & 0 deletions i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"contest": "Contest header. $1 is the contest name.",
"details": "Link to view score details of a single user.",
"unable-to-save": "Error message displayed when unable to save a contest. $1 is the reason.",
"rank": "Table header of the user details' table.",
"user": "Table header of the user details' table.",
"points": "Table header of the user details' table.",
"contributions": "Table header of the user details' table.\n\n{{Identical|Contribution}}",
Expand Down
4 changes: 3 additions & 1 deletion templates/contests_view.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<caption style="caption-side: top">{{ msg('scores-legend', [score_calculation_interval~'']) }}</caption>
<thead>
<tr>
<th>{{ msg('rank') }}</th>
<th>{{ msg('user') }}</th>
<th>{{ msg('points') }}</th>
<th>{{ msg('contributions') }}</th>
Expand All @@ -63,8 +64,9 @@
</tr>
</thead>
<tbody>
{% for score in scores %}
{% for index, score in scores %}
<tr>
<td>{{ index + 1 }}</td>
<td><a href="https://meta.wikimedia.org/wiki/User:{{ score.username }}">{{ score.username }}</a></td>
<td>{{ score.points }}</td>
<td>{{ score.contributions }}</td>
Expand Down

0 comments on commit 9cbedc0

Please sign in to comment.