leaderboards: don't show users if they're in the ranking more than once

master
justcool393 2022-11-01 02:49:20 -05:00
parent 444b3d36f1
commit 40a34ea26a
1 changed files with 3 additions and 1 deletions

View File

@ -35,14 +35,16 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% set v_appears_in_ranking = false %}
{% for user in lb.all_users %} {% for user in lb.all_users %}
{% set user2 = lb.user_func(user) %} {% set user2 = lb.user_func(user) %}
{% if v.id == user2.id %} {% if v.id == user2.id %}
{% set style="class=\"self\"" %} {% set style="class=\"self\"" %}
{% set v_appears_in_ranking = true %}
{% endif %} {% endif %}
{{format_user_in_table(user2, style, loop.index, lb.value_func(user), lb.user_relative_url)}} {{format_user_in_table(user2, style, loop.index, lb.value_func(user), lb.user_relative_url)}}
{% endfor %} {% endfor %}
{% if lb.v_position %} {% if lb.v_position and not v_appears_in_ranking %}
{{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", lb.v_position, lb.v_value, lb.user_relative_url)}} {{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", lb.v_position, lb.v_value, lb.user_relative_url)}}
{% endif %} {% endif %}
</tbody> </tbody>