Rewrite contest UI

This commit is contained in:
cuom1999 2022-11-27 01:03:38 -06:00
parent 6c9551e089
commit 756023a097
20 changed files with 191 additions and 254 deletions

View file

@ -988,7 +988,7 @@ def contest_ranking_ajax(request, contest, participation=None):
class ContestRankingBase(ContestMixin, TitleMixin, DetailView): class ContestRankingBase(ContestMixin, TitleMixin, DetailView):
template_name = "contest/ranking.html" template_name = "contest/ranking.html"
tab = None page_type = None
def get_title(self): def get_title(self):
raise NotImplementedError() raise NotImplementedError()
@ -1008,12 +1008,12 @@ class ContestRankingBase(ContestMixin, TitleMixin, DetailView):
users, problems = self.get_ranking_list() users, problems = self.get_ranking_list()
context["users"] = users context["users"] = users
context["problems"] = problems context["problems"] = problems
context["tab"] = self.tab context["page_type"] = self.page_type
return context return context
class ContestRanking(ContestRankingBase): class ContestRanking(ContestRankingBase):
tab = "ranking" page_type = "ranking"
def get_title(self): def get_title(self):
return _("%s Rankings") % self.object.name return _("%s Rankings") % self.object.name
@ -1039,7 +1039,7 @@ class ContestRanking(ContestRankingBase):
class ContestParticipationList(LoginRequiredMixin, ContestRankingBase): class ContestParticipationList(LoginRequiredMixin, ContestRankingBase):
tab = "participation" page_type = "participation"
def get_title(self): def get_title(self):
if self.profile == self.request.profile: if self.profile == self.request.profile:

View file

@ -48,9 +48,7 @@ from django.urls import reverse_lazy
from django.utils.http import urlencode from django.utils.http import urlencode
DEFAULT_SELECT2_JS = settings.STATIC_URL + "libs/select2/select2.js" DEFAULT_SELECT2_JS = settings.STATIC_URL + "libs/select2/select2.js"
DEFAULT_SELECT2_CSS = settings.STATIC_URL + ( DEFAULT_SELECT2_CSS = settings.STATIC_URL + ("libs/select2/select2.css")
"libs/select2/select2.css"
)
__all__ = [ __all__ = [
"Select2Widget", "Select2Widget",

View file

@ -173,14 +173,13 @@
} }
.left-sidebar-item { .left-sidebar-item {
display: flex;
align-items: center;
.sidebar-icon { .sidebar-icon {
font-size: large; font-size: large;
width: 1.2em;
display: inline-block; display: inline-block;
i { i {
position: relative; width: 1.4em;
bottom: -1.5px;
} }
} }
} }
@ -271,12 +270,12 @@
} }
.middle-content { .middle-content {
max-width: 65%; max-width: 75%;
margin-left: 13%; width: -webkit-fill-available;
} }
.blog-sidebar, .right-sidebar { .blog-sidebar, .right-sidebar {
width: 20%; width: 25%;
} }
.left-sidebar { .left-sidebar {

View file

@ -91,7 +91,6 @@
} }
#banner { #banner {
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
padding-bottom: 1em; padding-bottom: 1em;
a.date { a.date {

View file

@ -1,12 +1,22 @@
{% extends "base.html" %} {% extends "two-column-content.html" %}
{% block title_ruler %}{% endblock %} {% set page_type = 'calendar' %}
{% block title_row %} {% block left_sidebar %}
{% set tab = 'calendar' %}
{% include "contest/contest-list-tabs.html" %} {% include "contest/contest-list-tabs.html" %}
{% endblock %} {% endblock %}
{% block body %} {% block middle_content %}
<center style="font-size: 1.6em; margin-top: 0.3em;">
{% if prev_month %}
<a href="{{ url('contest_calendar', prev_month.year, prev_month.month) }}">&laquo; {{ _('Prev') }}</a>
{% endif %}
{% if not (curr_month.year == now.year and curr_month.month == now.month) %}
<a href="{{ url('contest_calendar', now.year, now.month) }}"> {{ _('Today') }}</a>
{% endif %}
{% if next_month %}
<a href="{{ url('contest_calendar', next_month.year, next_month.month) }}">{{ _('Next') }} &raquo;</a>
{% endif %}
</center>
<table id="contest-calendar"> <table id="contest-calendar">
<tr> <tr>
<th>{{ _('Sunday') }}</th> <th>{{ _('Sunday') }}</th>

View file

@ -0,0 +1,53 @@
<script type="text/javascript">
$(document).ready(function () {
$('.time-remaining').each(function () {
count_down($(this));
});
});
</script>
<div id="banner">
<a href="https://www.timeanddate.com/worldclock/fixedtime.html?msg={{ contest.name|urlquote('') }}&amp;iso=
{{- contest.start_time|utc|date('Y-m-d\TH:i:s') }}" class="date">
{%- if contest.is_in_contest(request.user) and not request.participation.live -%}
{% if request.participation.spectate %}
{% trans countdown=contest.end_time|as_countdown %}Spectating, contest ends in {{countdown}}.{% endtrans %}
{% elif request.participation.end_time %}
{% trans countdown=request.participation.end_time|as_countdown %}Participating virtually, {{countdown}} remaining.{% endtrans %}
{% else %}
{{- _('Participating virtually.') -}}
{% endif %}
{%- else -%}
{% if contest.start_time > now %}
{% trans countdown=contest.start_time|as_countdown %}Starting in {{countdown}}.{% endtrans %}
{% elif contest.end_time < now %}
{{- _('Contest is over.') -}}
{% else %}
{%- if has_joined -%}
{% if live_participation.ended %}
{% trans countdown=contest.end_time|as_countdown %}Your time is up! Contest ends in {{countdown}}.{% endtrans %}
{% else %}
{% trans countdown=live_participation.end_time|as_countdown %}You have {{countdown}} remaining.{% endtrans %}
{% endif %}
{%- else -%}
{% trans countdown=contest.end_time|as_countdown %}Contest ends in {{countdown}}.{% endtrans %}
{%- endif -%}
{% endif %}
{%- endif -%}
</a>
<div class="time">
{% if contest.time_limit %}
{% trans trimmed start_time=contest.start_time|date(_("F j, Y, G:i T")), end_time=contest.end_time|date(_("F j, Y, G:i T")), time_limit=contest.time_limit|timedelta('localized-no-seconds') %}
<b>{{ time_limit }}</b> window between <b>{{ start_time }}</b> and <b>{{ end_time }}</b>
{% endtrans %}
{% else %}
{% trans trimmed length=contest.contest_window_length|timedelta("localized-no-seconds"), start_time=contest.start_time|date(_("F j, Y, G:i T")) %}
<b>{{ length }}</b> long starting on <b>{{ start_time }}</b>
{% endtrans %}
{% endif %}
</div>
{% if contest.freeze_after and contest.freeze_after + contest.start_time < now %}
<div class="time" style="margin-top: 0.2em">
<b>{{_("Standing was frozen")}}</b> {{_("at")}} <b>{{ (contest.freeze_after + contest.start_time) | date(_("F j, Y, G:i T")) }}</b>
</div>
{% endif %}
</div>

View file

@ -1,26 +1,5 @@
{% extends "tabs-base.html" %} <div class="left-sidebar">
{{ make_tab_item('list', 'fa fa-list', url('contest_list'), _('List')) }}
{% block post_tab_spacer %} {{ make_tab_item('calendar', 'fa fa-calendar', url('contest_calendar', now.year, now.month), _('Calendar')) }}
{% if tab == 'calendar' %} {{ make_tab_item('admin', 'fa fa-edit', url('admin:judge_contest_changelist'), _('Admin')) }}
<div style="font-size: 1.6em; margin-top: 0.3em"> </div>
{% if prev_month %}
<a href="{{ url('contest_calendar', prev_month.year, prev_month.month) }}">&laquo; {{ _('Prev') }}</a>
{% endif %}
{% if not (curr_month.year == now.year and curr_month.month == now.month) %}
<a href="{{ url('contest_calendar', now.year, now.month) }}"> {{ _('Today') }}</a>
{% endif %}
{% if next_month %}
<a href="{{ url('contest_calendar', next_month.year, next_month.month) }}">{{ _('Next') }} &raquo;</a>
{% endif %}
</div>
<span class="spacer"></span>
{% endif %}
{% endblock %}
{% block tabs %}
{{ make_tab('list', 'fa-list', url('contest_list'), _('List')) }}
{{ make_tab('calendar', 'fa-calendar', url('contest_calendar', now.year, now.month), _('Calendar')) }}
{% if perms.judge.change_contest %}
{{ make_tab('admin', 'fa-edit', url('admin:judge_contest_changelist'), _('Admin')) }}
{% endif %}
{% endblock %}

View file

@ -1,31 +1,4 @@
{% extends "tabs-base.html" %} <div class="left-sidebar">
{% block tabs %}
{{ make_tab('detail', 'fa-info-circle', url('contest_view', contest.key), _('Info')) }}
{% if contest.ended or can_edit %}
{{ make_tab('stats', 'fa-pie-chart', url('contest_stats', contest.key), _('Statistics')) }}
{% endif %}
{% if contest.start_time <= now or perms.judge.see_private_contest %}
{% if contest.can_see_own_scoreboard(request.user) %}
{{ make_tab('ranking', 'fa-bar-chart', url('contest_ranking', contest.key), _('Rankings')) }}
{% if request.user.is_authenticated %}
{{ make_tab('participation', 'fa-users', url('contest_participation_own', contest.key), _('Participation')) }}
{% endif %}
{% else %}
{{ make_tab('ranking', 'fa-bar-chart', None, _('Hidden Rankings')) }}
{% endif %}
{% endif %}
{% if can_edit %}
{% if perms.judge.moss_contest and has_moss_api_key %}
{{ make_tab('moss', 'fa-gavel', url('contest_moss', contest.key), _('MOSS')) }}
{% endif %}
{{ make_tab('edit', 'fa-edit', url('admin:judge_contest_change', contest.id), _('Edit')) }}
{% endif %}
{% if perms.judge.clone_contest %}
{{ make_tab('clone', 'fa-copy', url('contest_clone', contest.key), _('Clone')) }}
{% endif %}
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
{% if contest.can_join or is_editor or is_tester %} {% if contest.can_join or is_editor or is_tester %}
{% set in_contest = contest.is_in_contest(request.user) %} {% set in_contest = contest.is_in_contest(request.user) %}
@ -79,4 +52,28 @@
<input type="submit" class="btn-midnightblue" value="{{ _('Login to participate') }}"> <input type="submit" class="btn-midnightblue" value="{{ _('Login to participate') }}">
</form> </form>
{% endif %} {% endif %}
{% endblock %} {{ make_tab_item('detail', 'fa fa-info-circle', url('contest_view', contest.key), _('Info')) }}
{% if contest.ended or can_edit %}
{{ make_tab_item('stats', 'fa fa-pie-chart', url('contest_stats', contest.key), _('Statistics')) }}
{% endif %}
{% if contest.start_time <= now or perms.judge.see_private_contest %}
{% if contest.can_see_own_scoreboard(request.user) %}
{{ make_tab_item('ranking', 'fa fa-bar-chart', url('contest_ranking', contest.key), _('Rankings')) }}
{% if request.user.is_authenticated %}
{{ make_tab_item('participation', 'fa fa-users', url('contest_participation_own', contest.key), _('Participation')) }}
{% endif %}
{% else %}
{{ make_tab_item('ranking', 'fa fa-bar-chart', None, _('Hidden Rankings')) }}
{% endif %}
{% endif %}
{% if can_edit %}
{% if perms.judge.moss_contest and has_moss_api_key %}
{{ make_tab_item('moss', 'fa fa-gavel', url('contest_moss', contest.key), _('MOSS')) }}
{% endif %}
{{ make_tab_item('edit', 'fa fa-edit', url('admin:judge_contest_change', contest.id), _('Edit')) }}
{% endif %}
{% if perms.judge.clone_contest %}
{{ make_tab_item('clone', 'fa fa-copy', url('contest_clone', contest.key), _('Clone')) }}
{% endif %}
</div>

View file

@ -1,78 +1,24 @@
{% extends "common-content.html" %} {% extends "two-column-content.html" %}
{% set page_type = 'detail' %}
{% block title_ruler %}{% endblock %}
{% block left_sidebar %}
{% block title_row %}
{% set tab = 'detail' %}
{% set title = contest.name %} {% set title = contest.name %}
{% include "contest/contest-tabs.html" %} {% include "contest/contest-tabs.html" %}
{% endblock %} {% endblock %}
{% block content_js_media %} {% block two_col_js %}
<script type="text/javascript">
$(document).ready(function () {
$('.time-remaining').each(function () {
count_down($(this));
});
});
</script>
{% include "contest/media-js.html" %} {% include "contest/media-js.html" %}
{% include "comments/media-js.html" %} {% include "comments/media-js.html" %}
{% include "actionbar/media-js.html" %} {% include "actionbar/media-js.html" %}
{% endblock %} {% endblock %}
{% block content_media %} {% block two_col_media %}
{% include "comments/media-css.html" %} {% include "comments/media-css.html" %}
{% include "actionbar/media-css.html" %} {% include "actionbar/media-css.html" %}
{% endblock %} {% endblock %}
{% block body %} {% block middle_content %}
<div id="banner"> {% include "contest/contest-datetime.html" %}
<a href="https://www.timeanddate.com/worldclock/fixedtime.html?msg={{ contest.name|urlquote('') }}&amp;iso=
{{- contest.start_time|utc|date('Y-m-d\TH:i:s') }}" class="date">
{%- if contest.is_in_contest(request.user) and not request.participation.live -%}
{% if request.participation.spectate %}
{% trans countdown=contest.end_time|as_countdown %}Spectating, contest ends in {{countdown}}.{% endtrans %}
{% elif request.participation.end_time %}
{% trans countdown=request.participation.end_time|as_countdown %}Participating virtually, {{countdown}} remaining.{% endtrans %}
{% else %}
{{- _('Participating virtually.') -}}
{% endif %}
{%- else -%}
{% if contest.start_time > now %}
{% trans countdown=contest.start_time|as_countdown %}Starting in {{countdown}}.{% endtrans %}
{% elif contest.end_time < now %}
{{- _('Contest is over.') -}}
{% else %}
{%- if has_joined -%}
{% if live_participation.ended %}
{% trans countdown=contest.end_time|as_countdown %}Your time is up! Contest ends in {{countdown}}.{% endtrans %}
{% else %}
{% trans countdown=live_participation.end_time|as_countdown %}You have {{countdown}} remaining.{% endtrans %}
{% endif %}
{%- else -%}
{% trans countdown=contest.end_time|as_countdown %}Contest ends in {{countdown}}.{% endtrans %}
{%- endif -%}
{% endif %}
{%- endif -%}
</a>
<div class="time">
{% if contest.time_limit %}
{% trans trimmed start_time=contest.start_time|date(_("F j, Y, G:i T")), end_time=contest.end_time|date(_("F j, Y, G:i T")), time_limit=contest.time_limit|timedelta('localized-no-seconds') %}
<b>{{ time_limit }}</b> window between <b>{{ start_time }}</b> and <b>{{ end_time }}</b>
{% endtrans %}
{% else %}
{% trans trimmed length=contest.contest_window_length|timedelta("localized-no-seconds"), start_time=contest.start_time|date(_("F j, Y, G:i T")) %}
<b>{{ length }}</b> long starting on <b>{{ start_time }}</b>
{% endtrans %}
{% endif %}
</div>
{% if contest.freeze_after and contest.freeze_after + contest.start_time < now %}
<div class="time" style="margin-top: 0.2em">
<b>{{_("Standing was frozen")}}</b> {{_("at")}} <b>{{ (contest.freeze_after + contest.start_time) | date(_("F j, Y, G:i T")) }}</b>
</div>
{% endif %}
</div>
<div class="content-description"> <div class="content-description">
{% cache 3600 'contest_html' contest.id MATH_ENGINE %} {% cache 3600 'contest_html' contest.id MATH_ENGINE %}
@ -128,12 +74,4 @@
{% include "actionbar/list.html" %} {% include "actionbar/list.html" %}
<br> <br>
{% include "comments/list.html" %} {% include "comments/list.html" %}
{% endblock %} {% endblock %}
{% block description_end %}{% endblock %}
{% block bodyend %}
{{ super() }}
{% include "comments/math.html" %}
{% endblock %}
k

View file

@ -106,11 +106,7 @@
{% endblock %} {% endblock %}
{% block left_sidebar %} {% block left_sidebar %}
<div class="left-sidebar"> {% include "contest/contest-list-tabs.html" %}
{{ make_tab_item('list', 'fa fa-list', url('contest_list'), _('List')) }}
{{ make_tab_item('calendar', 'fa fa-calendar', url('contest_calendar', now.year, now.month), _('Calendar')) }}
{{ make_tab_item('admin', 'fa fa-edit', url('admin:judge_contest_changelist'), _('Admin')) }}
</div>
{% endblock %} {% endblock %}
{% macro contest_head(contest) %} {% macro contest_head(contest) %}

View file

@ -1,14 +1,11 @@
{% extends "common-content.html" %} {% extends "two-column-content.html" %}
{% set page_type = 'moss' %}
{% block title_ruler %}{% endblock %}
{% block left_sidebar %}
{% block title_row %}
{% set tab = 'moss' %}
{% set title = contest.name %}
{% include "contest/contest-tabs.html" %} {% include "contest/contest-tabs.html" %}
{% endblock %} {% endblock %}
{% block content_media %} {% block two_col_media %}
<style> <style>
.panes { .panes {
display: flex; display: flex;
@ -21,7 +18,7 @@
</style> </style>
{% endblock %} {% endblock %}
{% block content_js_media %} {% block two_col_js %}
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
$('.contest-moss').click(function () { $('.contest-moss').click(function () {
@ -35,7 +32,8 @@
}); });
</script> </script>
{% endblock %} {% endblock %}
{% block body %}
{% block middle_content %}
{% if has_results %} {% if has_results %}
<table class="table"> <table class="table">
<thead> <thead>

View file

@ -1,8 +1,4 @@
<style> <style>
#content-left {
overflow-x: auto;
}
#users-table .username { #users-table .username {
min-width: 15em; min-width: 15em;
} }

View file

@ -1,9 +1,6 @@
{% extends "user/base-users.html" %} {% extends "user/base-users-two-col.html" %}
{% block title_ruler %}{% endblock %} {% block left_sidebar %}
{% block title_row %}
{% set title = contest.name %}
{% include "contest/contest-tabs.html" %} {% include "contest/contest-tabs.html" %}
{% endblock %} {% endblock %}
@ -60,7 +57,7 @@
}); });
</script> </script>
{% endif %} {% endif %}
{% if tab == 'ranking' %} {% if page_type == 'ranking' %}
<script type="text/javascript"> <script type="text/javascript">
$.fn.ignore = function(sel) { $.fn.ignore = function(sel) {
return this.clone().find(sel || '>*').remove().end(); return this.clone().find(sel || '>*').remove().end();
@ -128,9 +125,10 @@
{% include "contest/media-js.html" %} {% include "contest/media-js.html" %}
{% endblock %} {% endblock %}
{% block users_table %} {% block before_table %}
{% include "contest/contest-datetime.html" %}
<div style="margin-bottom: 0.5em"> <div style="margin-bottom: 0.5em">
{% if tab == 'participation' %} {% if page_type == 'participation' %}
{% if contest.can_see_full_scoreboard(request.user) %} {% if contest.can_see_full_scoreboard(request.user) %}
<input id="search-contest" type="text" placeholder="{{ _('View user participation') }}"> <input id="search-contest" type="text" placeholder="{{ _('View user participation') }}">
{% endif %} {% endif %}
@ -155,5 +153,8 @@
{{ _('Download as CSV') }} {{ _('Download as CSV') }}
</a> </a>
</div> </div>
{% endblock %}
{% block users_table %}
{% include "contest/ranking-table.html" %} {% include "contest/ranking-table.html" %}
{% endblock %} {% endblock %}

View file

@ -1,14 +1,11 @@
{% extends "common-content.html" %} {% extends "two-column-content.html" %}
{% set page_type = 'stats' %}
{% block title_ruler %}{% endblock %} {% block left_sidebar %}
{% block title_row %}
{% set tab = 'stats' %}
{% set title = contest.name %}
{% include "contest/contest-tabs.html" %} {% include "contest/contest-tabs.html" %}
{% endblock %} {% endblock %}
{% block content_js_media %} {% block two_col_js %}
<script type="text/javascript"> <script type="text/javascript">
window.stats = {{ stats }}; window.stats = {{ stats }};
</script> </script>
@ -39,7 +36,7 @@
{% include "contest/media-js.html" %} {% include "contest/media-js.html" %}
{% endblock %} {% endblock %}
{% block content_media %} {% block two_col_media %}
<style> <style>
.chart { .chart {
margin: 10px 0; margin: 10px 0;
@ -47,7 +44,7 @@
</style> </style>
{% endblock %} {% endblock %}
{% block body %} {% block middle_content %}
<h3>{{ _('Problem Status Distribution') }}</h3> <h3>{{ _('Problem Status Distribution') }}</h3>
<div id="problem-status-count" class="chart"> <div id="problem-status-count" class="chart">
<canvas></canvas> <canvas></canvas>

View file

@ -1,4 +1,4 @@
{% extends "user/base-users-three-col.html" %} {% extends "user/base-users-two-col.html" %}
{% block users_media %} {% block users_media %}
<style> <style>
.kick-form .button { .kick-form .button {

View file

@ -10,8 +10,19 @@
margin-left: 0; margin-left: 0;
} }
.middle-right-content { .middle-right-content {
margin-left: 13%;
display: inline-flex; display: inline-flex;
} }
/* TODO: remove this */
.middle-content {
margin-left: 0;
max-width: 75%;
width: -webkit-fill-available;
}
.blog-sidebar, .right-sidebar {
width: 25%;
}
} }
@media(max-width: 799px) { @media(max-width: 799px) {
#content { #content {

View file

@ -1,35 +0,0 @@
{% extends "two-column-content.html" %}
{% block two_col_js %}
{% block users_js_media %}{% endblock %}
{% include "user/base-users-js.html" %}
{% endblock %}
{% block two_col_media %}
<link href="http://fonts.cdnfonts.com/css/jersey-m54" rel="stylesheet">
{% block users_media %}{% endblock %}
{% endblock %}
{% block middle_content %}
<div id="common-content">
<div id="content-left" class="users">
{% if page_obj and page_obj.num_pages > 1 %}
<div style="margin-bottom: 7px; margin-top: 3px;">
{% include "list-pages.html" %}
<form id="search-form" name="form" action="{{ url('user_ranking_redirect') }}" method="get">
<input id="search-handle" type="text" name="search"
placeholder="{{ _('Search by handle...') }}">
</form>
</div>
{% endif %}
<table id="users-table" class="table">
{% block users_table %}{% endblock %}
</table>
{% if page_obj and page_obj.num_pages > 1 %}
<div style="margin-top:10px;">{% include "list-pages.html" %}</div>
{% endif %}
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,35 @@
{% extends "two-column-content.html" %}
{% block two_col_js %}
{% block users_js_media %}{% endblock %}
{% include "user/base-users-js.html" %}
{% endblock %}
{% block two_col_media %}
<link href="http://fonts.cdnfonts.com/css/jersey-m54" rel="stylesheet">
{% block users_media %}{% endblock %}
{% endblock %}
{% block middle_content %}
{% if page_obj and page_obj.num_pages > 1 %}
<div style="margin-bottom: 7px; margin-top: 3px;">
{% include "list-pages.html" %}
<form id="search-form" name="form" action="{{ url('user_ranking_redirect') }}" method="get">
<input id="search-handle" type="text" name="search"
placeholder="{{ _('Search by handle...') }}">
</form>
</div>
{% endif %}
{% block before_table %}{% endblock %}
<div style="overflow-x: auto;">
<table id="users-table" class="table">
{% block users_table %}{% endblock %}
</table>
</div>
{% if page_obj and page_obj.num_pages > 1 %}
<div style="margin-top:10px;">{% include "list-pages.html" %}</div>
{% endif %}
{% endblock %}

View file

@ -1,35 +0,0 @@
{% extends "common-content.html" %}
{% block js_media %}
{% block users_js_media %}{% endblock %}
{% include "user/base-users-js.html" %}
{% endblock %}
{% block media %}
<link href="http://fonts.cdnfonts.com/css/jersey-m54" rel="stylesheet">
{% block users_media %}{% endblock %}
{% endblock %}
{% block body %}
<div id="common-content">
<div id="content-left" class="users">
{% if page_obj and page_obj.num_pages > 1 %}
<div style="margin-bottom: 7px; margin-top: 3px;">
{% include "list-pages.html" %}
<form id="search-form" name="form" action="{{ url('user_ranking_redirect') }}" method="get">
<input id="search-handle" type="text" name="search"
placeholder="{{ _('Search by handle...') }}">
</form>
</div>
{% endif %}
<table id="users-table" class="table">
{% block users_table %}{% endblock %}
</table>
{% if page_obj and page_obj.num_pages > 1 %}
<div style="margin-top:10px;">{% include "list-pages.html" %}</div>
{% endif %}
</div>
</div>
{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "user/base-users-three-col.html" %} {% extends "user/base-users-two-col.html" %}
{% block users_media %} {% block users_media %}
<style> <style>