forked from MarseyWorld/MarseyWorld
leaderboards: don't show users if they're in the ranking more than once
parent
444b3d36f1
commit
40a34ea26a
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue