{% extends "base.html" %}
{% load static from staticfiles %}
{% block css %}
    <script src="{% static 'sorttable.js' %}" type="text/javascript"></script>
{% endblock %}
{% block body %}
    <div class="table">
        <table>
            <tr>
                <th style="white-space:nowrap">Rank</th>
                <th style="width:100%">Username</th>
                <th class="default-sorted" style="white-space:nowrap">Points</th>
                <th style="white-space:nowrap">Problems</th>
            </tr>
            {% for rank, user in users %}
                <tr>
                    <td>{{ rank }}</td>
                    <td class="{% if user.is_admin %}admin{% else %}{% if user.is_problem_setter %}setter{% else %}user{% endif %}{% endif %}">
                        <a href="{% url 'judge.views.user' user.user.username %}">{{ user.long_display_name }}</a>
                    </td>
                    <td>{{ user.points }}</td>
                    <td>{{ user.problems }}</td>
                </tr>
            {% endfor %}
        </table>
    </div>
{% endblock %}

{% extends "base.html" %}
{% load static from staticfiles %}
{% block css %}
    <script src="{% static 'sorttable.js' %}" type="text/javascript"></script>
{% endblock %}
{% block body %}
    <div class="table">
        <table class="sortable">
            <tr>
                <th style="white-space:nowrap">Rank</th>
                <th style="width:100%">Username</th>
                <th class="default-sorted" style="white-space:nowrap">Points</th>
                <th style="white-space:nowrap">Problems</th>
            </tr>
            {% for rank, user in users %}
                <tr>
                    <td>{{ rank }}</td>
                    <td class="{% if user.is_admin %}admin{% else %}{% if user.is_problem_setter %}setter{% else %}user{% endif %}{% endif %}">
                        <a href="{% url 'judge.views.user' user.user.username %}">{{ user.long_display_name }}</a>
                    </td>
                    <td>{{ user.points }}</td>
                    <td>{{ user.problems }}</td>
                </tr>
            {% endfor %}
        </table>
    </div>
{% endblock %}

Mark user table as sortable
Mark user table as sortable
