ui: add self rank in ranking page (#368)

This commit is contained in:
panda authored and GitHub committed 2022-05-30 11:32:06 +08:00
1 parent add66f26cf
commit 1fa5eef2e0
2 files changed
+16 -2

No files matched your search

@@ -38,6 +38,20 @@
</tr>
</thead>
<tbody>
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
<tr>
<td class="col--rank">{{ handler.user.rank|default('-') }}</td>
<td class="col--user">{{ user.render_inline(handler.user) }}</td>
<td class="col--rp">{{ handler.user.rp|default(0)|round(0) }}</td>
{% for key, def in model.rp %}
{% if not def.hidden %}
<td class="col--detail rp-{{ key }}">{{ handler.user.rpInfo[key]|round if (handler.user.rpInfo|default({}))[key] else '-' }}</td>
{% endif %}
{% endfor %}
<td class="col--ac">{{ handler.user.nAccept|default(0) }}</td>
<td class="col--bio">{{ handler.user.bio|default('')|truncate(64, true)|markdownInline|safe }}</td>
</tr>
{% endif %}
{%- for udoc in udocs -%}
<tr>
<td class="col--rank">{{ (page - 1) * 100 + loop.index }}</td>