mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
/ranking & script.recalcRanking
This commit is contained in:
1 parent
4aa1c9fe1f
commit
7a4d382dc9
9 files changed
+154
-53
No files matched your search
@@ -0,0 +1,43 @@
|
||||
{% extends "layout/basic.html" %}
|
||||
{% import "components/paginator.html" as paginator with context %}
|
||||
{% import "components/nothing.html" as nothing with context %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="medium-12 columns">
|
||||
<div class="section">
|
||||
<div class="section__body no-padding">
|
||||
<div data-fragment-id="ranking">
|
||||
{% if not udocs %}
|
||||
{{ nothing.render('Sorry, there is no user in this domain.') }}
|
||||
{% else %}
|
||||
<table class="data-table">
|
||||
<colgroup>
|
||||
<col class="col--rank">
|
||||
<col class="col--user">
|
||||
<col class="col--rating">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col--rank">{{ _('Rank') }}</th>
|
||||
<th class="col--user">{{ _('Username') }}</th>
|
||||
<th class="col--rating">{{ _('Rating') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for udoc in udocs %}
|
||||
<tr>
|
||||
<td class="col--rank">{{ (page - 1) * 100 + loop.index }}</td>
|
||||
<td class="col--user">{{ user.render_inline(udoc, badge=false) }}</td>
|
||||
<td class="col--rating">{{ udoc.rating|default(1500)|round(0) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ paginator.render(page, upcount) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user