Reformat html files
This commit is contained in:
parent
9a208ca108
commit
52f1e77fe1
205 changed files with 11096 additions and 11086 deletions
|
@ -1,60 +1,60 @@
|
|||
<script>
|
||||
$(function () {
|
||||
$('#search-handle').replaceWith($('<select>').attr({
|
||||
id: 'search-handle',
|
||||
name: 'handle',
|
||||
onchange: 'form.submit()'
|
||||
}));
|
||||
var in_user_redirect = false;
|
||||
$('#search-handle').select2({
|
||||
placeholder: '{{ _('Search by handle...') }}',
|
||||
ajax: {
|
||||
url: '{{ url('user_search_select2_ajax') }}'
|
||||
},
|
||||
minimumInputLength: 1,
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
},
|
||||
templateResult: function (data, container) {
|
||||
return $('<span>')
|
||||
.append($('<img>', {
|
||||
'class': 'user-search-image', src: data.gravatar_url,
|
||||
width: 24, height: 24
|
||||
}))
|
||||
.append($('<span>', {'class': data.display_rank + ' user-search-name'}).text(data.text))
|
||||
.append($('<a>', {href: '/user/' + data.text, 'class': 'user-redirect'})
|
||||
.append($('<i>', {'class': 'fa fa-mail-forward'}))
|
||||
.mouseover(function () {
|
||||
in_user_redirect = true;
|
||||
}).mouseout(function () {
|
||||
in_user_redirect = false;
|
||||
}));
|
||||
}
|
||||
}).on('select2:selecting', function () {
|
||||
return !in_user_redirect;
|
||||
});
|
||||
|
||||
var $last = null;
|
||||
$(window).on('hashchange', function () {
|
||||
var hash = window.location.hash;
|
||||
if (hash.startsWith('#!')) {
|
||||
var $user = $('#user-' + hash.substring(2)).addClass('highlight');
|
||||
if ($user) {
|
||||
$(document).scrollTop($user.position().top - 50);
|
||||
if ($last !== null) $last.removeClass('highlight');
|
||||
$last = $user;
|
||||
}
|
||||
}
|
||||
}).trigger('hashchange');
|
||||
|
||||
$('.about-td').on('click', function() {
|
||||
var max_height = $(this).css('max-height');
|
||||
if (max_height !== 'fit-content') {
|
||||
$(this).css('max-height', 'fit-content');
|
||||
}
|
||||
else {
|
||||
$(this).css('max-height', '45px');
|
||||
}
|
||||
})
|
||||
});
|
||||
<script>
|
||||
$(function () {
|
||||
$('#search-handle').replaceWith($('<select>').attr({
|
||||
id: 'search-handle',
|
||||
name: 'handle',
|
||||
onchange: 'form.submit()'
|
||||
}));
|
||||
var in_user_redirect = false;
|
||||
$('#search-handle').select2({
|
||||
placeholder: '{{ _('Search by handle...') }}',
|
||||
ajax: {
|
||||
url: '{{ url('user_search_select2_ajax') }}'
|
||||
},
|
||||
minimumInputLength: 1,
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
},
|
||||
templateResult: function (data, container) {
|
||||
return $('<span>')
|
||||
.append($('<img>', {
|
||||
'class': 'user-search-image', src: data.gravatar_url,
|
||||
width: 24, height: 24
|
||||
}))
|
||||
.append($('<span>', {'class': data.display_rank + ' user-search-name'}).text(data.text))
|
||||
.append($('<a>', {href: '/user/' + data.text, 'class': 'user-redirect'})
|
||||
.append($('<i>', {'class': 'fa fa-mail-forward'}))
|
||||
.mouseover(function () {
|
||||
in_user_redirect = true;
|
||||
}).mouseout(function () {
|
||||
in_user_redirect = false;
|
||||
}));
|
||||
}
|
||||
}).on('select2:selecting', function () {
|
||||
return !in_user_redirect;
|
||||
});
|
||||
|
||||
var $last = null;
|
||||
$(window).on('hashchange', function () {
|
||||
var hash = window.location.hash;
|
||||
if (hash.startsWith('#!')) {
|
||||
var $user = $('#user-' + hash.substring(2)).addClass('highlight');
|
||||
if ($user) {
|
||||
$(document).scrollTop($user.position().top - 50);
|
||||
if ($last !== null) $last.removeClass('highlight');
|
||||
$last = $user;
|
||||
}
|
||||
}
|
||||
}).trigger('hashchange');
|
||||
|
||||
$('.about-td').on('click', function() {
|
||||
var max_height = $(this).css('max-height');
|
||||
if (max_height !== 'fit-content') {
|
||||
$(this).css('max-height', 'fit-content');
|
||||
}
|
||||
else {
|
||||
$(this).css('max-height', '45px');
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
|
@ -1,32 +1,32 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<tr>
|
||||
<th class="header rank">{{ rank_header or _("Rank") }}</th>
|
||||
{% block after_rank_head %}{% endblock %}
|
||||
<th class="header username">{{ _('Username') }}{% block username_head_extra %}{% endblock %}</th>
|
||||
{% block before_point_head %}{% endblock %}
|
||||
|
||||
<th class="header points">
|
||||
{% if sort_links %}<a href="{{ sort_links.performance_points }}">{% endif %}
|
||||
{{ _('Points') }}
|
||||
{%- if sort_links %}{{ sort_order.performance_points }}</a>{% endif %}
|
||||
{% if sort_links %}<a href="{{ sort_links.performance_points }}">{% endif %}
|
||||
{{ _('Points') }}
|
||||
{%- if sort_links %}{{ sort_order.performance_points }}</a>{% endif %}
|
||||
</th>
|
||||
{% block after_point_head %}{% endblock %}
|
||||
</tr>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for rank, user in users %}
|
||||
{% for rank, user in users %}
|
||||
<tr id="user-{{ user.user.username }}" {% block row_extra scoped %}{% endblock %}>
|
||||
<td class="rank-td">{{ rank }}</td>
|
||||
{% block after_rank scoped %}{% endblock %}
|
||||
<td class="user-name"><div style="display: inline-block;">{{ link_user(user) }}{% block user_footer scoped %}{% endblock %}</div> {% block user_data scoped %}{% endblock %}</td>
|
||||
{% block before_point scoped %}{% endblock %}
|
||||
{% block point scoped %}
|
||||
<td title="{{ user.performance_points|floatformat(2) }}" class="user-points">
|
||||
{{ user.performance_points|floatformat(0) }}
|
||||
</td>
|
||||
{% endblock %}
|
||||
{% block after_point scoped %}{% endblock %}
|
||||
<td class="rank-td">{{ rank }}</td>
|
||||
{% block after_rank scoped %}{% endblock %}
|
||||
<td class="user-name"><div style="display: inline-block;">{{ link_user(user) }}{% block user_footer scoped %}{% endblock %}</div> {% block user_data scoped %}{% endblock %}</td>
|
||||
{% block before_point scoped %}{% endblock %}
|
||||
{% block point scoped %}
|
||||
<td title="{{ user.performance_points|floatformat(2) }}" class="user-points">
|
||||
{{ user.performance_points|floatformat(0) }}
|
||||
</td>
|
||||
{% endblock %}
|
||||
{% block after_point scoped %}{% endblock %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
{% 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 style="clear:both"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block before_table %}{% endblock %}
|
||||
|
||||
<div style="overflow-x: auto; clear: both;">
|
||||
<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 %}
|
||||
{% 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 style="clear:both"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block before_table %}{% endblock %}
|
||||
|
||||
<div style="overflow-x: auto; clear: both;">
|
||||
<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 %}
|
||||
|
|
|
@ -1,175 +1,175 @@
|
|||
{% extends "user/user-base.html" %}
|
||||
|
||||
{% block user_media %}
|
||||
{% include "timezone/media-css.html" %}
|
||||
{{ form.media.css }}
|
||||
<style>
|
||||
.sortedm2m-container, .sortedm2m-container p.selector-filter {
|
||||
width: 300px;
|
||||
}
|
||||
{% include "timezone/media-css.html" %}
|
||||
{{ form.media.css }}
|
||||
<style>
|
||||
.sortedm2m-container, .sortedm2m-container p.selector-filter {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.sortedm2m-container p.selector-filter input {
|
||||
width: 262px;
|
||||
}
|
||||
.sortedm2m-container p.selector-filter input {
|
||||
width: 262px;
|
||||
}
|
||||
|
||||
ul.sortedm2m {
|
||||
width: 284px;
|
||||
min-height: 70px;
|
||||
max-height: 200px;
|
||||
height: 70px
|
||||
}
|
||||
ul.sortedm2m {
|
||||
width: 284px;
|
||||
min-height: 70px;
|
||||
max-height: 200px;
|
||||
height: 70px
|
||||
}
|
||||
|
||||
.inline-header {
|
||||
float: left;
|
||||
font-size: 1.1em;
|
||||
padding: 4px 8px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.inline-header {
|
||||
float: left;
|
||||
font-size: 1.1em;
|
||||
padding: 4px 8px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.block-header {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
.block-header {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.fullwidth {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
.fullwidth {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#edit-form {
|
||||
border: unset;
|
||||
background: unset;
|
||||
max-width: 700px;
|
||||
}
|
||||
#edit-form {
|
||||
border: unset;
|
||||
background: unset;
|
||||
max-width: 700px;
|
||||
}
|
||||
|
||||
#center-float {
|
||||
position: relative;
|
||||
margin: 0 auto auto -28.5em;
|
||||
left: 50%;
|
||||
width: 700px;
|
||||
}
|
||||
</style>
|
||||
#center-float {
|
||||
position: relative;
|
||||
margin: 0 auto auto -28.5em;
|
||||
left: 50%;
|
||||
width: 700px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_media %}
|
||||
{% include "timezone/media-js.html" %}
|
||||
{{ form.media.js }}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#ace_user_script').on('ace_load', function (e, editor) {
|
||||
editor.getSession().setMode("ace/mode/javascript");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#disable-2fa-button').click(function () {
|
||||
alert("The administrators for this site require all the staff to have two-factor authentication enabled, so it may not be disabled at this time.");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% include "timezone/media-js.html" %}
|
||||
{{ form.media.js }}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#ace_user_script').on('ace_load', function (e, editor) {
|
||||
editor.getSession().setMode("ace/mode/javascript");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#disable-2fa-button').click(function () {
|
||||
alert("The administrators for this site require all the staff to have two-factor authentication enabled, so it may not be disabled at this time.");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block title_ruler %}{% endblock %}
|
||||
|
||||
{% block title_row %}
|
||||
{% set tab = 'edit' %}
|
||||
{% set user = request.profile %}
|
||||
{% include "user/user-tabs.html" %}
|
||||
{% set tab = 'edit' %}
|
||||
{% set user = request.profile %}
|
||||
{% include "user/user-tabs.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="center-float">
|
||||
<form id="edit-form" action="" method="post" class="form-area">
|
||||
{% if form.errors %}
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<a href="#" class="close">x</a>
|
||||
{{ form.non_field_errors() }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="center-float">
|
||||
<form id="edit-form" action="" method="post" class="form-area">
|
||||
{% if form.errors %}
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<a href="#" class="close">x</a>
|
||||
{{ form.non_field_errors() }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% csrf_token %}
|
||||
{% csrf_token %}
|
||||
|
||||
<table class="block-header grayed">
|
||||
<table class="block-header grayed">
|
||||
<tr>
|
||||
<td> {{ _('Fullname') }}: </td>
|
||||
<td> {{ form_user.first_name }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> {{ _('School') }}: </td>
|
||||
<td> {{ form_user.last_name }} </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
|
||||
<div style="padding-top:0.5em" class="block-header">{{ _('Self-description') }}:</div>
|
||||
{{ form.about }}
|
||||
<hr>
|
||||
|
||||
<table border="0" style="padding-top:0.7em">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
<table style="padding-right:0.8em">
|
||||
<tr title="{{ _('Select your closest major city') }}">
|
||||
<td><label class="inline-header grayed">{{ _('Timezone') }}:</label></td>
|
||||
<td><span class="fullwidth">{{ form.timezone }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label class="inline-header grayed">{{ _('Preferred language') }}:</label></td>
|
||||
<td><span class="fullwidth">{{ form.language }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label class="inline-header grayed">{{ _('Editor theme') }}:</label></td>
|
||||
<td><span class="fullwidth">{{ form.ace_theme }}</span></td>
|
||||
</tr>
|
||||
{% if has_math_config %}
|
||||
<tr>
|
||||
<td> {{ _('Fullname') }}: </td>
|
||||
<td> {{ form_user.first_name }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> {{ _('School') }}: </td>
|
||||
<td> {{ form_user.last_name }} </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
|
||||
<div style="padding-top:0.5em" class="block-header">{{ _('Self-description') }}:</div>
|
||||
{{ form.about }}
|
||||
<hr>
|
||||
|
||||
<table border="0" style="padding-top:0.7em">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
<table style="padding-right:0.8em">
|
||||
<tr title="{{ _('Select your closest major city') }}">
|
||||
<td><label class="inline-header grayed">{{ _('Timezone') }}:</label></td>
|
||||
<td><span class="fullwidth">{{ form.timezone }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label class="inline-header grayed">{{ _('Preferred language') }}:</label></td>
|
||||
<td><span class="fullwidth">{{ form.language }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label class="inline-header grayed">{{ _('Editor theme') }}:</label></td>
|
||||
<td><span class="fullwidth">{{ form.ace_theme }}</span></td>
|
||||
</tr>
|
||||
{% if has_math_config %}
|
||||
<tr>
|
||||
<td><label class="inline-header grayed">{{ _('Math engine') }}:</label></td>
|
||||
<td><span class="fullwidth">{{ form.math_engine }}</span></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="http://www.gravatar.com/" title="{{ _('Change your avatar') }}"
|
||||
target="_blank" class="inline-header">{{ _('Change your avatar') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="{{ url('password_change') }}" class="inline-header">
|
||||
{{ _('Change your password') }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<div style="padding-bottom:0.4em;margin-top:-2em" class="block-header">
|
||||
{{ _('Affiliated organizations') }}:
|
||||
</div>
|
||||
{{ form.organizations }}
|
||||
</td>
|
||||
<td><label class="inline-header grayed">{{ _('Math engine') }}:</label></td>
|
||||
<td><span class="fullwidth">{{ form.math_engine }}</span></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="http://www.gravatar.com/" title="{{ _('Change your avatar') }}"
|
||||
target="_blank" class="inline-header">{{ _('Change your avatar') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="{{ url('password_change') }}" class="inline-header">
|
||||
{{ _('Change your password') }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
{% if profile.is_totp_enabled %}
|
||||
{{ _('Two Factor Authentication is enabled.') }}
|
||||
{% if require_staff_2fa and request.user.is_staff %}
|
||||
<a id="disable-2fa-button" class="button inline-button">Disable</a>
|
||||
{% else %}
|
||||
<a href="{{ url('disable_2fa') }}" class="button inline-button">Disable</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ _('Two Factor Authentication is disabled.') }}
|
||||
<a href="{{ url('enable_2fa') }}" class="button inline-button">Enable</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div style="padding-bottom:0.4em;margin-top:-2em" class="block-header">
|
||||
{{ _('Affiliated organizations') }}:
|
||||
</div>
|
||||
<br><hr>
|
||||
<div class="block-header">{{ _('User-script') }}:</div>
|
||||
{{ form.user_script }}
|
||||
<hr>
|
||||
{{ form.organizations }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<input type="submit" style="float:right" value="{{ _('Update profile') }}">
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
{% if profile.is_totp_enabled %}
|
||||
{{ _('Two Factor Authentication is enabled.') }}
|
||||
{% if require_staff_2fa and request.user.is_staff %}
|
||||
<a id="disable-2fa-button" class="button inline-button">Disable</a>
|
||||
{% else %}
|
||||
<a href="{{ url('disable_2fa') }}" class="button inline-button">Disable</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ _('Two Factor Authentication is disabled.') }}
|
||||
<a href="{{ url('enable_2fa') }}" class="button inline-button">Enable</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br><hr>
|
||||
<div class="block-header">{{ _('User-script') }}:</div>
|
||||
{{ form.user_script }}
|
||||
<hr>
|
||||
|
||||
<input type="submit" style="float:right" value="{{ _('Update profile') }}">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,111 +1,111 @@
|
|||
{% extends "user/user-base.html" %}
|
||||
{% block js_media %}
|
||||
<script>
|
||||
<script>
|
||||
function getCookie(name) {
|
||||
let cookieValue = null;
|
||||
if (document.cookie && document.cookie !== '') {
|
||||
const cookies = document.cookie.split(';');
|
||||
for (let i = 0; i < cookies.length; i++) {
|
||||
const cookie = cookies[i].trim();
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) === (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
let cookieValue = null;
|
||||
if (document.cookie && document.cookie !== '') {
|
||||
const cookies = document.cookie.split(';');
|
||||
for (let i = 0; i < cookies.length; i++) {
|
||||
const cookie = cookies[i].trim();
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) === (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
|
||||
|
||||
const csrftoken = getCookie('csrftoken');
|
||||
|
||||
$(function() {
|
||||
$('#load_button').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var files = $('#csv_file').prop('files');
|
||||
if (files.length == 1) {
|
||||
$('#load_button').addClass('disabled');
|
||||
|
||||
var file = files[0];
|
||||
//if (file.type != 'text/csv') {
|
||||
// alert("{{_('Upload CSV only')}}");
|
||||
// return;
|
||||
//}
|
||||
var form_data = new FormData();
|
||||
form_data.append('csv_file', file, file.name);
|
||||
$('#load_button').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var files = $('#csv_file').prop('files');
|
||||
if (files.length == 1) {
|
||||
$('#load_button').addClass('disabled');
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', "{{url('import_users_post_file')}}", true);
|
||||
xhr.setRequestHeader('X-CSRFToken', csrftoken);
|
||||
xhr.onload = function () {
|
||||
if (xhr.status === 200) {
|
||||
var json = JSON.parse(xhr.responseText);
|
||||
$('#load_button').removeClass('disabled');
|
||||
var file = files[0];
|
||||
//if (file.type != 'text/csv') {
|
||||
// alert("{{_('Upload CSV only')}}");
|
||||
// return;
|
||||
//}
|
||||
var form_data = new FormData();
|
||||
form_data.append('csv_file', file, file.name);
|
||||
|
||||
if (json.done) {
|
||||
window.import_users = json.data
|
||||
$('#table_csv').html(json.html);
|
||||
$('#confirm_button').removeClass('disabled');
|
||||
}
|
||||
else {
|
||||
window.import_users = []
|
||||
$('#table_csv').html(json.msg);
|
||||
$('#confirm_button').addClass('disabled');
|
||||
}
|
||||
} else {
|
||||
alert('Fail to read file.');
|
||||
}
|
||||
};
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', "{{url('import_users_post_file')}}", true);
|
||||
xhr.setRequestHeader('X-CSRFToken', csrftoken);
|
||||
xhr.onload = function () {
|
||||
if (xhr.status === 200) {
|
||||
var json = JSON.parse(xhr.responseText);
|
||||
$('#load_button').removeClass('disabled');
|
||||
|
||||
xhr.send(form_data);
|
||||
if (json.done) {
|
||||
window.import_users = json.data
|
||||
$('#table_csv').html(json.html);
|
||||
$('#confirm_button').removeClass('disabled');
|
||||
}
|
||||
else {
|
||||
window.import_users = []
|
||||
$('#table_csv').html(json.msg);
|
||||
$('#confirm_button').addClass('disabled');
|
||||
}
|
||||
} else {
|
||||
alert('Fail to read file.');
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
$('#confirm_button').on('click', function() {
|
||||
$(this).addClass('disabled');
|
||||
var data = {
|
||||
'users': window.import_users
|
||||
};
|
||||
xhr.send(form_data);
|
||||
}
|
||||
})
|
||||
|
||||
if (!data.users || data.users.length == 0) {
|
||||
alert('No valid users');
|
||||
return;
|
||||
$('#confirm_button').on('click', function() {
|
||||
$(this).addClass('disabled');
|
||||
var data = {
|
||||
'users': window.import_users
|
||||
};
|
||||
|
||||
if (!data.users || data.users.length == 0) {
|
||||
alert('No valid users');
|
||||
return;
|
||||
}
|
||||
|
||||
$('#table_csv').html('');
|
||||
$('#log').html('Working...');
|
||||
$.post({
|
||||
url: "{{url('import_users_submit')}}",
|
||||
data: JSON.stringify(data),
|
||||
contentType:"application/json; charset=utf-8",
|
||||
dataType:"text",
|
||||
fail: function() {alert('Fail to import')},
|
||||
success: function(data) {
|
||||
data = JSON.parse(data);
|
||||
var msg = data.msg.split('\n');
|
||||
$('#log').html('')
|
||||
for (var i of msg) {
|
||||
$('#log').append(`<p>${i}</p>`);
|
||||
}
|
||||
|
||||
$('#table_csv').html('');
|
||||
$('#log').html('Working...');
|
||||
$.post({
|
||||
url: "{{url('import_users_submit')}}",
|
||||
data: JSON.stringify(data),
|
||||
contentType:"application/json; charset=utf-8",
|
||||
dataType:"text",
|
||||
fail: function() {alert('Fail to import')},
|
||||
success: function(data) {
|
||||
data = JSON.parse(data);
|
||||
var msg = data.msg.split('\n');
|
||||
$('#log').html('')
|
||||
for (var i of msg) {
|
||||
$('#log').append(`<p>${i}</p>`);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% csrf_token %}
|
||||
<center>
|
||||
{% csrf_token %}
|
||||
<center>
|
||||
<label for="csv_file">{{_('User File')}}:</label>
|
||||
<input type="file" accept=".csv" id="csv_file">
|
||||
<a href="{{url('import_users_sample')}}">{{_('Sample')}}</a>
|
||||
<div style="display: inline-flex">
|
||||
<button id="load_button" style="margin-left: 1em">{{_('Load')}}</button>
|
||||
<button id="confirm_button" style="margin-left: 1em" class="disabled">{{_('Import')}}</button>
|
||||
<button id="load_button" style="margin-left: 1em">{{_('Load')}}</button>
|
||||
<button id="confirm_button" style="margin-left: 1em" class="disabled">{{_('Import')}}</button>
|
||||
</div>
|
||||
</center>
|
||||
<br>
|
||||
<table id="table_csv" class="table"></table>
|
||||
<p style="margin-left: 2em" id="log"></p>
|
||||
</center>
|
||||
<br>
|
||||
<table id="table_csv" class="table"></table>
|
||||
<p style="margin-left: 2em" id="log"></p>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th>{{_('ID')}}</th>
|
||||
<th>{{_('Username')}}</th>
|
||||
<th>{{_('Password')}}</th>
|
||||
<th>{{_('Name')}}</th>
|
||||
<th>{{_('School')}}</th>
|
||||
<th>{{_('Email')}}</th>
|
||||
<th>{{_('Organizations')}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{_('ID')}}</th>
|
||||
<th>{{_('Username')}}</th>
|
||||
<th>{{_('Password')}}</th>
|
||||
<th>{{_('Name')}}</th>
|
||||
<th>{{_('School')}}</th>
|
||||
<th>{{_('Email')}}</th>
|
||||
<th>{{_('Organizations')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in data %}
|
||||
{% for i in data %}
|
||||
<tr>
|
||||
<td>{{loop.index}}</td>
|
||||
<td>{{i.username}}</td>
|
||||
<td>{{i.password}}</td>
|
||||
<td>{{i.name}}</td>
|
||||
<td>{{i.school}}</td>
|
||||
<td>{{i.email}}</td>
|
||||
<td>{{i.organizations}}</td>
|
||||
<td>{{loop.index}}</td>
|
||||
<td>{{i.username}}</td>
|
||||
<td>{{i.password}}</td>
|
||||
<td>{{i.name}}</td>
|
||||
<td>{{i.school}}</td>
|
||||
<td>{{i.email}}</td>
|
||||
<td>{{i.organizations}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{% for user in users -%}
|
||||
{{ link_user(user) }}{% if not loop.last %}, {% endif %}
|
||||
{{ link_user(user) }}{% if not loop.last %}, {% endif %}
|
||||
{%- endfor %}
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
{% extends "user/base-users-two-col.html" %}
|
||||
|
||||
{% block users_media %}
|
||||
<style>
|
||||
#users-table td:nth-child(3), #users-table th:nth-child(3) {
|
||||
text-align: left;
|
||||
}
|
||||
#users-table td:nth-child(2), #users-table th:nth-child(2) {
|
||||
border-right: none;
|
||||
}
|
||||
.rank-td {
|
||||
font-family: "Jersey M54";
|
||||
font-size: large;
|
||||
}
|
||||
.user-points, .user-problem-count, .rating-td {
|
||||
font-family: cursive;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
#users-table td:nth-child(3), #users-table th:nth-child(3) {
|
||||
text-align: left;
|
||||
}
|
||||
#users-table td:nth-child(2), #users-table th:nth-child(2) {
|
||||
border-right: none;
|
||||
}
|
||||
.rank-td {
|
||||
font-family: "Jersey M54";
|
||||
font-size: large;
|
||||
}
|
||||
.user-points, .user-problem-count, .rating-td {
|
||||
font-family: cursive;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block title_ruler %}{% endblock %}
|
||||
|
@ -23,9 +23,9 @@
|
|||
{% block title_row %}{% endblock %}
|
||||
|
||||
{% block left_sidebar %}
|
||||
{% include "user/user-left-sidebar.html" %}
|
||||
{% include "user/user-left-sidebar.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block users_table %}
|
||||
{% include "user/users-table.html" %}
|
||||
{% include "user/users-table.html" %}
|
||||
{% endblock %}
|
|
@ -1,32 +1,32 @@
|
|||
<div class="sub-result {{ breakdown.sub_result_class }}">
|
||||
<div class="score">{{ breakdown.sub_points|floatformat(0) }} / {{ breakdown.sub_total|floatformat(0) }}</div>
|
||||
<div class="state">
|
||||
<span title="{{ breakdown.sub_long_status }}" class="status">{{ breakdown.sub_short_status }}</span>
|
||||
|
|
||||
<span class="language">{{ breakdown.sub_lang }}</span>
|
||||
</div>
|
||||
<div class="score">{{ breakdown.sub_points|floatformat(0) }} / {{ breakdown.sub_total|floatformat(0) }}</div>
|
||||
<div class="state">
|
||||
<span title="{{ breakdown.sub_long_status }}" class="status">{{ breakdown.sub_short_status }}</span>
|
||||
|
|
||||
<span class="language">{{ breakdown.sub_lang }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sub-info">
|
||||
<div class="name">
|
||||
<a href="{{ url('problem_detail', breakdown.problem_code) }}">{{ breakdown.problem_name }}</a>
|
||||
</div>
|
||||
<div class="time">{{ relative_time(breakdown.sub_date) }}</div>
|
||||
<div class="name">
|
||||
<a href="{{ url('problem_detail', breakdown.problem_code) }}">{{ breakdown.problem_name }}</a>
|
||||
</div>
|
||||
<div class="time">{{ relative_time(breakdown.sub_date) }}</div>
|
||||
</div>
|
||||
|
||||
<div class="sub-pp sub-usage">
|
||||
<div class="pp">
|
||||
<a href="{{ url('submission_status', breakdown.sub_id) }}">{{ breakdown.points|floatformat(0) }}pp</a>
|
||||
</div>
|
||||
<div class="pp-weighted">
|
||||
{% trans weight=breakdown.weight|floatformat(0) %}
|
||||
weighted <b>{{ weight }}%</b>
|
||||
{% endtrans %}
|
||||
<div class="pp">
|
||||
<a href="{{ url('submission_status', breakdown.sub_id) }}">{{ breakdown.points|floatformat(0) }}pp</a>
|
||||
</div>
|
||||
<div class="pp-weighted">
|
||||
{% trans weight=breakdown.weight|floatformat(0) %}
|
||||
weighted <b>{{ weight }}%</b>
|
||||
{% endtrans %}
|
||||
|
||||
{% if breakdown.scaled_points < 10 %}
|
||||
({{ _('%(pp).1fpp', pp=breakdown.scaled_points) }})
|
||||
{% else %}
|
||||
({{ _('%(pp).0fpp', pp=breakdown.scaled_points) }})
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if breakdown.scaled_points < 10 %}
|
||||
({{ _('%(pp).1fpp', pp=breakdown.scaled_points) }})
|
||||
{% else %}
|
||||
({{ _('%(pp).0fpp', pp=breakdown.scaled_points) }})
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{% for breakdown in pp_breakdown %}
|
||||
<div class="submission-row">{% include "user/pp-row.html" %}</div>
|
||||
<div class="submission-row">{% include "user/pp-row.html" %}</div>
|
||||
{% endfor %}
|
|
@ -1,4 +1,4 @@
|
|||
{{ preview_data|markdown|reference|str|safe }}
|
||||
{% if REQUIRE_JAX %}
|
||||
<div data-config="{{ static('mathjax3_config.js') }}" class="require-mathjax-support"></div>
|
||||
<div data-config="{{ static('mathjax3_config.js') }}" class="require-mathjax-support"></div>
|
||||
{% endif %}
|
|
@ -1,17 +1,17 @@
|
|||
{% spaceless %}
|
||||
<span class="rate-group">
|
||||
{% if rating_class(rating) == 'rate-target' %}
|
||||
<svg class="rate-box rate-target" viewBox="0 0 16 16">
|
||||
<circle cx="8" cy="8" r="7"></circle>
|
||||
<circle cx="8" cy="8" r="3"></circle>
|
||||
</svg>
|
||||
{% else %}
|
||||
<svg class="rate-box {{ rating_class(rating) }}" viewBox="0 0 16 16">
|
||||
<circle cx="8" cy="8" r="7"></circle>
|
||||
<path clip-path="url(#rating-clip)"
|
||||
d="M0 16v-{{ (rating_progress(rating) * 16)|round(2) }}h16 0v16z"></path>
|
||||
</svg>
|
||||
{% endif %}
|
||||
<span class="rating {{ rating_class(rating) }}">{{ rating.rating|default(rating) }}</span>
|
||||
</span>
|
||||
<span class="rate-group">
|
||||
{% if rating_class(rating) == 'rate-target' %}
|
||||
<svg class="rate-box rate-target" viewBox="0 0 16 16">
|
||||
<circle cx="8" cy="8" r="7"></circle>
|
||||
<circle cx="8" cy="8" r="3"></circle>
|
||||
</svg>
|
||||
{% else %}
|
||||
<svg class="rate-box {{ rating_class(rating) }}" viewBox="0 0 16 16">
|
||||
<circle cx="8" cy="8" r="7"></circle>
|
||||
<path clip-path="url(#rating-clip)"
|
||||
d="M0 16v-{{ (rating_progress(rating) * 16)|round(2) }}h16 0v16z"></path>
|
||||
</svg>
|
||||
{% endif %}
|
||||
<span class="rating {{ rating_class(rating) }}">{{ rating.rating|default(rating) }}</span>
|
||||
</span>
|
||||
{% endspaceless %}
|
File diff suppressed because it is too large
Load diff
|
@ -1,143 +1,143 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block media %}
|
||||
{% block user_media %}{% endblock %}
|
||||
{% block user_media %}{% endblock %}
|
||||
|
||||
<style>
|
||||
.user-gravatar {
|
||||
display: block;
|
||||
padding-right: 15px;
|
||||
width: 145px;
|
||||
}
|
||||
<style>
|
||||
.user-gravatar {
|
||||
display: block;
|
||||
padding-right: 15px;
|
||||
width: 145px;
|
||||
}
|
||||
|
||||
.user-gravatar img {
|
||||
width: 145px;
|
||||
height: 145px;
|
||||
display: block;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.user-gravatar img {
|
||||
width: 145px;
|
||||
height: 145px;
|
||||
display: block;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.page-title {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
font-size: 1.4em;
|
||||
line-height: 1.225;
|
||||
font-weight: 500;
|
||||
}
|
||||
.user-info {
|
||||
font-size: 1.4em;
|
||||
line-height: 1.225;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.user-info-container {
|
||||
display: grid;
|
||||
grid-column-gap: .5rem;
|
||||
grid-row-gap: 1rem;
|
||||
grid-template-columns: repeat(6, minmax(10rem, 1fr));
|
||||
}
|
||||
.user-info-container {
|
||||
display: grid;
|
||||
grid-column-gap: .5rem;
|
||||
grid-row-gap: 1rem;
|
||||
grid-template-columns: repeat(6, minmax(10rem, 1fr));
|
||||
}
|
||||
|
||||
.user-info-card {
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
}
|
||||
.user-info-card {
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.user-info-body {
|
||||
font-weight: bold;
|
||||
}
|
||||
.user-info-body {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.user-info-container {
|
||||
grid-template-columns: repeat(2, minmax(10rem, 1fr));
|
||||
}
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
.user-info-container {
|
||||
grid-template-columns: repeat(2, minmax(10rem, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.user-stat {
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
.user-stat {
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.user-stat-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.user-stat-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#awards img {
|
||||
height: 105px;
|
||||
margin-right: 1em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
#awards img {
|
||||
height: 105px;
|
||||
margin-right: 1em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.bookmark-group {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
</style>
|
||||
.bookmark-group {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_media %}
|
||||
{% block user_js_media %}{% endblock %}
|
||||
{% block user_js_media %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="user-info-page">
|
||||
<div class="user-sidebar">
|
||||
<div class="user-gravatar">
|
||||
<img src="{{ gravatar(user, 145) }}" width="145px" height="145px">
|
||||
</div>
|
||||
<br>
|
||||
{% if request.user != user.user %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button class="small {{ 'unfollow' if followed else 'follow' }}" style="width:145px">
|
||||
{% if followed %}
|
||||
<i class="fa fa-remove"></i>
|
||||
{{ _('Unfollow') }}
|
||||
{% else %}
|
||||
<i class="fa fa-user-plus"></i>
|
||||
{{ _('Follow') }}
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<br>
|
||||
<div>
|
||||
<form action="{{ url('all_user_submissions', user.user.username) }}">
|
||||
<input type="submit" value="{{ _('View submissions') }}" class="small" style="width:145px; padding-left: 1px; padding-right: 1px">
|
||||
</form>
|
||||
</div>
|
||||
{% if request.user.is_authenticated %}
|
||||
<br>
|
||||
<div>
|
||||
<form action="{{ url('get_or_create_room') }}" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" value="{{ chat_param(request.profile, user) }}" name="other">
|
||||
<input type="submit" value="{{ _('Send message') }}" style="width:145px" class="small btn-midnightblue">
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if ratings %}
|
||||
<br>
|
||||
<div style="border: 3px dashed darkgray; padding: 0.3em; margin-right: 15px; border-radius: 6px;">
|
||||
<div class="user-stat-container">
|
||||
<div class="user-stat-header">{{_('Contests written')}}:</div>
|
||||
<div class="user-stat">{{ratings|length}}</div>
|
||||
</div>
|
||||
<div class="user-stat-container">
|
||||
<div class="user-stat-header">{{ _('Min. rating:') }}</div>
|
||||
<div class="user-stat">{{ rating_number(min_rating) }}</div>
|
||||
</div>
|
||||
<div class="user-stat-container">
|
||||
<div class="user-stat-header">{{ _('Max rating:') }}</div>
|
||||
<div class="user-stat">{{ rating_number(max_rating) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-info-page">
|
||||
<div class="user-sidebar">
|
||||
<div class="user-gravatar">
|
||||
<img src="{{ gravatar(user, 145) }}" width="145px" height="145px">
|
||||
</div>
|
||||
<br>
|
||||
{% if request.user != user.user %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button class="small {{ 'unfollow' if followed else 'follow' }}" style="width:145px">
|
||||
{% if followed %}
|
||||
<i class="fa fa-remove"></i>
|
||||
{{ _('Unfollow') }}
|
||||
{% else %}
|
||||
<i class="fa fa-user-plus"></i>
|
||||
{{ _('Follow') }}
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<br>
|
||||
<div>
|
||||
<form action="{{ url('all_user_submissions', user.user.username) }}">
|
||||
<input type="submit" value="{{ _('View submissions') }}" class="small" style="width:145px; padding-left: 1px; padding-right: 1px">
|
||||
</form>
|
||||
</div>
|
||||
{% if request.user.is_authenticated %}
|
||||
<br>
|
||||
<div>
|
||||
<form action="{{ url('get_or_create_room') }}" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" value="{{ chat_param(request.profile, user) }}" name="other">
|
||||
<input type="submit" value="{{ _('Send message') }}" style="width:145px" class="small btn-midnightblue">
|
||||
</form>
|
||||
</div>
|
||||
<div class="user-content">{% block user_content %}{% endblock %}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if ratings %}
|
||||
<br>
|
||||
<div style="border: 3px dashed darkgray; padding: 0.3em; margin-right: 15px; border-radius: 6px;">
|
||||
<div class="user-stat-container">
|
||||
<div class="user-stat-header">{{_('Contests written')}}:</div>
|
||||
<div class="user-stat">{{ratings|length}}</div>
|
||||
</div>
|
||||
<div class="user-stat-container">
|
||||
<div class="user-stat-header">{{ _('Min. rating:') }}</div>
|
||||
<div class="user-stat">{{ rating_number(min_rating) }}</div>
|
||||
</div>
|
||||
<div class="user-stat-container">
|
||||
<div class="user-stat-header">{{ _('Max rating:') }}</div>
|
||||
<div class="user-stat">{{ rating_number(max_rating) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="user-content">{% block user_content %}{% endblock %}</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,92 +3,92 @@
|
|||
{% block title_ruler %}{% endblock %}
|
||||
|
||||
{% block title_row %}
|
||||
{% set tab = 'bookmark' %}
|
||||
{% include "user/user-tabs.html" %}
|
||||
{% set tab = 'bookmark' %}
|
||||
{% include "user/user-tabs.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block user_content %}
|
||||
{% if blogs %}
|
||||
<div class="bookmark-group">
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Posts') }} ({{ blogs|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
<tbody>
|
||||
{% for post in blogs %}
|
||||
{% if post.bookmark.page_object() %}
|
||||
<tr>
|
||||
<td class="bookmark-name">
|
||||
<a href="{{ url('blog_post', post.bookmark.page_object().id, post.bookmark.page_object().slug) }}">{{ post.bookmark.page_object().title}} </a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if problems %}
|
||||
{% if blogs %}
|
||||
<div class="bookmark-group">
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Problems') }} ({{ problems|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
<tbody>
|
||||
{% for problem in problems %}
|
||||
{% if problem.bookmark.page_object() %}
|
||||
<tr>
|
||||
<td class="bookmark-name">
|
||||
<a href="{{ url('problem_detail', problem.bookmark.page_object().code) }}">{{ problem.bookmark.page_object().name}} </a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Posts') }} ({{ blogs|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
<tbody>
|
||||
{% for post in blogs %}
|
||||
{% if post.bookmark.page_object() %}
|
||||
<tr>
|
||||
<td class="bookmark-name">
|
||||
<a href="{{ url('blog_post', post.bookmark.page_object().id, post.bookmark.page_object().slug) }}">{{ post.bookmark.page_object().title}} </a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if contests %}
|
||||
{% endif %}
|
||||
{% if problems %}
|
||||
<div class="bookmark-group">
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Contests') }} ({{ contests|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for contest in contests %}
|
||||
{% if contest.bookmark.page_object() %}
|
||||
<tr>
|
||||
<td class="bookmark-name">
|
||||
<a href="{{ url('contest_view', contest.bookmark.page_object().key) }}">{{ contest.bookmark.page_object().name}} </a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Problems') }} ({{ problems|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
<tbody>
|
||||
{% for problem in problems %}
|
||||
{% if problem.bookmark.page_object() %}
|
||||
<tr>
|
||||
<td class="bookmark-name">
|
||||
<a href="{{ url('problem_detail', problem.bookmark.page_object().code) }}">{{ problem.bookmark.page_object().name}} </a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if solutions %}
|
||||
{% endif %}
|
||||
{% if contests %}
|
||||
<div class="bookmark-group">
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Editorials') }} ({{ solutions|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for solution in solutions %}
|
||||
{% if solution.bookmark.page_object() %}
|
||||
<tr>
|
||||
<td class="bookmark-name">
|
||||
<a href="{{ url('problem_editorial', solution.bookmark.page_object().problem.code) }}">{{ solution.bookmark.page_object().problem.name}} </a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Contests') }} ({{ contests|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for contest in contests %}
|
||||
{% if contest.bookmark.page_object() %}
|
||||
<tr>
|
||||
<td class="bookmark-name">
|
||||
<a href="{{ url('contest_view', contest.bookmark.page_object().key) }}">{{ contest.bookmark.page_object().name}} </a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if solutions %}
|
||||
<div class="bookmark-group">
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Editorials') }} ({{ solutions|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for solution in solutions %}
|
||||
{% if solution.bookmark.page_object() %}
|
||||
<tr>
|
||||
<td class="bookmark-name">
|
||||
<a href="{{ url('problem_editorial', solution.bookmark.page_object().problem.code) }}">{{ solution.bookmark.page_object().problem.name}} </a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<div class="left-sidebar">
|
||||
{{ make_tab_item('list', 'fa fa-trophy', url('user_list'), _('Leaderboard')) }}
|
||||
{{ make_tab_item('friends', 'fa fa-users', url('user_list') + '?friend=true', _('Friends')) }}
|
||||
{{ make_tab_item('organizations', 'fa fa-university', url('organization_list'), _('Groups')) }}
|
||||
{% if request.user.is_superuser %}
|
||||
{{ make_tab_item('import', 'fa fa-table', url('import_users'), _('Import')) }}
|
||||
{% endif %}
|
||||
<div class="left-sidebar">
|
||||
{{ make_tab_item('list', 'fa fa-trophy', url('user_list'), _('Leaderboard')) }}
|
||||
{{ make_tab_item('friends', 'fa fa-users', url('user_list') + '?friend=true', _('Friends')) }}
|
||||
{{ make_tab_item('organizations', 'fa fa-university', url('organization_list'), _('Groups')) }}
|
||||
{% if request.user.is_superuser %}
|
||||
{{ make_tab_item('import', 'fa fa-table', url('import_users'), _('Import')) }}
|
||||
{% endif %}
|
||||
</div>
|
|
@ -1,10 +1,10 @@
|
|||
{% extends "tabs-base.html" %}
|
||||
|
||||
{% block tabs %}
|
||||
{{ make_tab('list', 'fa-trophy', url('user_list'), _('Leaderboard')) }}
|
||||
{{ make_tab('friends', 'fa-users', url('user_list') + '?friend=true', _('Friends')) }}
|
||||
{{ make_tab('organizations', 'fa-university', url('organization_list'), _('Groups')) }}
|
||||
{% if request.user.is_superuser %}
|
||||
{{ make_tab('import', 'fa-table', url('import_users'), _('Import')) }}
|
||||
{% endif %}
|
||||
{{ make_tab('list', 'fa-trophy', url('user_list'), _('Leaderboard')) }}
|
||||
{{ make_tab('friends', 'fa-users', url('user_list') + '?friend=true', _('Friends')) }}
|
||||
{{ make_tab('organizations', 'fa-university', url('organization_list'), _('Groups')) }}
|
||||
{% if request.user.is_superuser %}
|
||||
{{ make_tab('import', 'fa-table', url('import_users'), _('Import')) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,119 +1,119 @@
|
|||
{% extends "user/user-base.html" %}
|
||||
|
||||
{% block user_js_media %}
|
||||
<script type="text/javascript">
|
||||
window.show_pp_base = 1;
|
||||
window.currently_requesting_pp = false;
|
||||
window.load_more_pp = function () {
|
||||
if (window.currently_requesting_pp) return;
|
||||
window.currently_requesting_pp = true;
|
||||
<script type="text/javascript">
|
||||
window.show_pp_base = 1;
|
||||
window.currently_requesting_pp = false;
|
||||
window.load_more_pp = function () {
|
||||
if (window.currently_requesting_pp) return;
|
||||
window.currently_requesting_pp = true;
|
||||
|
||||
$.get('{{ url('user_pp_ajax', user.user.username) }}', {
|
||||
start: window.show_pp_base * 10,
|
||||
end: (window.show_pp_base + 1) * 10
|
||||
}).done(function (data) {
|
||||
$('.pp-table').append(data['results']);
|
||||
window.show_pp_base++;
|
||||
if (!data['has_more']) {
|
||||
$("#pp-load-link-wrapper").hide();
|
||||
}
|
||||
window.currently_requesting_pp = false;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
$.get('{{ url('user_pp_ajax', user.user.username) }}', {
|
||||
start: window.show_pp_base * 10,
|
||||
end: (window.show_pp_base + 1) * 10
|
||||
}).done(function (data) {
|
||||
$('.pp-table').append(data['results']);
|
||||
window.show_pp_base++;
|
||||
if (!data['has_more']) {
|
||||
$("#pp-load-link-wrapper").hide();
|
||||
}
|
||||
window.currently_requesting_pp = false;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block title_ruler %}{% endblock %}
|
||||
|
||||
{% block title_row %}
|
||||
{% set tab = 'problems' %}
|
||||
{% include "user/user-tabs.html" %}
|
||||
{% set tab = 'problems' %}
|
||||
{% include "user/user-tabs.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block user_content %}
|
||||
{% if pp_breakdown %}
|
||||
<h3 class="pp-breakdown-header">{{ _('Points Breakdown') }}</h3>
|
||||
<div id="submissions-table" class="pp-table table">
|
||||
{% include "user/pp-table-body.html" %}
|
||||
</div>
|
||||
{% if pp_has_more %}
|
||||
<div id="pp-load-link-wrapper">
|
||||
<a id="pp-load-more-link" href="javascript:load_more_pp()">{{ _('Load more...') }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<i>{{ _('This user has not yet solved any problems.') }}</i>
|
||||
{% if pp_breakdown %}
|
||||
<h3 class="pp-breakdown-header">{{ _('Points Breakdown') }}</h3>
|
||||
<div id="submissions-table" class="pp-table table">
|
||||
{% include "user/pp-table-body.html" %}
|
||||
</div>
|
||||
{% if pp_has_more %}
|
||||
<div id="pp-load-link-wrapper">
|
||||
<a id="pp-load-more-link" href="javascript:load_more_pp()">{{ _('Load more...') }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<i>{{ _('This user has not yet solved any problems.') }}</i>
|
||||
{% endif %}
|
||||
|
||||
{% if authored %}
|
||||
<div class="user-problem-group">
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Authored Problems') }} ({{ authored|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ _('Problem') }}</th>
|
||||
<th>{{ _('Category') }}</th>
|
||||
<th>{{ _('Points') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for problem in authored %}
|
||||
<tr>
|
||||
<td class="problem-name">
|
||||
<a href="{{ url('problem_detail', problem.code) }}">{{ problem.name }}</a>
|
||||
</td>
|
||||
<td class="problem-category">{{ problem.group.full_name }}</td>
|
||||
<td class="problem-score"><a href="{{ url('ranked_submissions', problem.code) }}">
|
||||
{{ problem.points|floatformat }}{% if problem.partial %}p{% endif %}
|
||||
</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if authored %}
|
||||
<div class="user-problem-group">
|
||||
<h3 class="unselectable toggle closed">
|
||||
<span class="fa fa-chevron-right fa-fw"></span>{{ _('Authored Problems') }} ({{ authored|length }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ _('Problem') }}</th>
|
||||
<th>{{ _('Category') }}</th>
|
||||
<th>{{ _('Points') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for problem in authored %}
|
||||
<tr>
|
||||
<td class="problem-name">
|
||||
<a href="{{ url('problem_detail', problem.code) }}">{{ problem.name }}</a>
|
||||
</td>
|
||||
<td class="problem-category">{{ problem.group.full_name }}</td>
|
||||
<td class="problem-score"><a href="{{ url('ranked_submissions', problem.code) }}">
|
||||
{{ problem.points|floatformat }}{% if problem.partial %}p{% endif %}
|
||||
</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.is_authenticated and request.user != user.user %}
|
||||
<div class="hide-solved-problems"><span>
|
||||
<form name="form" action="" method="get">
|
||||
<input id="hide_solved" style="vertical-align:middle" onclick="form.submit()" type="checkbox"
|
||||
name="hide_solved"{% if hide_solved %} checked{% endif %} value="1">
|
||||
<label style="vertical-align:middle" for="hide_solved">{{ _("Hide problems I've solved") }}</label>
|
||||
</form>
|
||||
</span></div>
|
||||
{% else %}
|
||||
<hr>
|
||||
{% endif %}
|
||||
{% if request.user.is_authenticated and request.user != user.user %}
|
||||
<div class="hide-solved-problems"><span>
|
||||
<form name="form" action="" method="get">
|
||||
<input id="hide_solved" style="vertical-align:middle" onclick="form.submit()" type="checkbox"
|
||||
name="hide_solved"{% if hide_solved %} checked{% endif %} value="1">
|
||||
<label style="vertical-align:middle" for="hide_solved">{{ _("Hide problems I've solved") }}</label>
|
||||
</form>
|
||||
</span></div>
|
||||
{% else %}
|
||||
<hr>
|
||||
{% endif %}
|
||||
|
||||
{% for group in best_submissions %}
|
||||
<div class="user-problem-group">
|
||||
<h3 class="unselectable toggle closed"><span class="fa fa-chevron-right fa-fw"></span>
|
||||
{{ group.name }} ({{ _('%(points).1f points', points=group.points) }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ _('Problem') }}</th>
|
||||
<th>{{ _('Score') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in group.problems %}
|
||||
<tr>
|
||||
<td class="problem-name">
|
||||
<a href="{{ url('problem_detail', entry.code) }}">{{ entry.name }}</a>
|
||||
</td>
|
||||
<td class="problem-score">
|
||||
<a href="{{ url('user_submissions', entry.code, user.user.username) }}">
|
||||
{{ _('%(points)s / %(total)s', points=entry.points, total=entry.total) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% for group in best_submissions %}
|
||||
<div class="user-problem-group">
|
||||
<h3 class="unselectable toggle closed"><span class="fa fa-chevron-right fa-fw"></span>
|
||||
{{ group.name }} ({{ _('%(points).1f points', points=group.points) }})
|
||||
</h3>
|
||||
<table style="display: none" class="table toggled">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ _('Problem') }}</th>
|
||||
<th>{{ _('Score') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in group.problems %}
|
||||
<tr>
|
||||
<td class="problem-name">
|
||||
<a href="{{ url('problem_detail', entry.code) }}">{{ entry.name }}</a>
|
||||
</td>
|
||||
<td class="problem-score">
|
||||
<a href="{{ url('user_submissions', entry.code, user.user.username) }}">
|
||||
{{ _('%(points)s / %(total)s', points=entry.points, total=entry.total) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
{% extends "tabs-base.html" %}
|
||||
|
||||
{% block tabs %}
|
||||
{{ make_tab('about', 'fa-info-circle', url('user_page', user.user.username), _('About')) }}
|
||||
{{ make_tab('problems', 'fa-puzzle-piece', url('user_problems', user.user.username), _('Problems')) }}
|
||||
{% if request.user.is_superuser and user.user != request.user and not user.user.is_superuser %}
|
||||
{{ make_tab('impersonate', 'fa-eye', url('impersonate-start', user.user.id), _('Impersonate')) }}
|
||||
{{ make_tab('about', 'fa-info-circle', url('user_page', user.user.username), _('About')) }}
|
||||
{{ make_tab('problems', 'fa-puzzle-piece', url('user_problems', user.user.username), _('Problems')) }}
|
||||
{% if request.user.is_superuser and user.user != request.user and not user.user.is_superuser %}
|
||||
{{ make_tab('impersonate', 'fa-eye', url('impersonate-start', user.user.id), _('Impersonate')) }}
|
||||
{% endif %}
|
||||
{% if user.user == request.user %}
|
||||
{{ make_tab('bookmark', 'fa-bookmark', url('user_bookmark'), _('Bookmark')) }}
|
||||
{{ make_tab('edit', 'fa-edit', url('user_edit_profile'), _('Edit profile')) }}
|
||||
{% else %}
|
||||
{% if perms.auth.change_user %}
|
||||
{{ make_tab('edit', 'fa-edit', url('admin:auth_user_change', user.user.id), _('Admin User')) }}
|
||||
{% endif %}
|
||||
{% if user.user == request.user %}
|
||||
{{ make_tab('bookmark', 'fa-bookmark', url('user_bookmark'), _('Bookmark')) }}
|
||||
{{ make_tab('edit', 'fa-edit', url('user_edit_profile'), _('Edit profile')) }}
|
||||
{% else %}
|
||||
{% if perms.auth.change_user %}
|
||||
{{ make_tab('edit', 'fa-edit', url('admin:auth_user_change', user.user.id), _('Admin User')) }}
|
||||
{% endif %}
|
||||
{% if perms.judge.change_profile %}
|
||||
{{ make_tab('edit', 'fa-edit', url('admin:judge_profile_change', user.id), _('Admin Profile')) }}
|
||||
{% endif %}
|
||||
{% if perms.judge.change_profile %}
|
||||
{{ make_tab('edit', 'fa-edit', url('admin:judge_profile_change', user.id), _('Admin Profile')) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
{% extends "user/base-users-table.html" %}
|
||||
|
||||
{% block after_rank_head %}
|
||||
<th></th>
|
||||
<th></th>
|
||||
{% endblock %}
|
||||
|
||||
{% block after_rank %}
|
||||
<td><img style="border: 2px solid lightblue; max-width: none; border-radius: 50%" src="{{ gravatar(user, 45) }}" height="45px" width="45px"></td>
|
||||
<td><img style="border: 2px solid lightblue; max-width: none; border-radius: 50%" src="{{ gravatar(user, 45) }}" height="45px" width="45px"></td>
|
||||
{% endblock %}
|
||||
|
||||
{% block user_footer %}
|
||||
<span style="margin-left: 0.5em">{% if user.rating %}{{ rating_number(user) }}{% endif %}</span>
|
||||
<div class="gray" style="font-weight: 600; margin-top: 0.2em">{{ user.user.first_name if user.user.first_name else ''}}</div>
|
||||
<span style="margin-left: 0.5em">{% if user.rating %}{{ rating_number(user) }}{% endif %}</span>
|
||||
<div class="gray" style="font-weight: 600; margin-top: 0.2em">{{ user.user.first_name if user.user.first_name else ''}}</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block after_point_head %}
|
||||
<th class="problems">
|
||||
{% if sort_links %}<a href="{{ sort_links.problem_count }}">{% endif %}
|
||||
{{ _('Problems') }}
|
||||
{%- if sort_links %}{{ sort_order.problem_count }}</a>{% endif %}
|
||||
</th>
|
||||
<th class="about-column">{{ _('About') }}</th>
|
||||
<th class="problems">
|
||||
{% if sort_links %}<a href="{{ sort_links.problem_count }}">{% endif %}
|
||||
{{ _('Problems') }}
|
||||
{%- if sort_links %}{{ sort_order.problem_count }}</a>{% endif %}
|
||||
</th>
|
||||
<th class="about-column">{{ _('About') }}</th>
|
||||
{% endblock %}
|
||||
|
||||
{% block username_head_extra %}
|
||||
<span style="margin-left: 0.5em" class="header rank">
|
||||
{% if sort_links %}<a href="{{ sort_links.rating }}">{% endif %}
|
||||
<span class="rate-group">
|
||||
<svg class="rate-box" viewBox="0 0 16 16">
|
||||
<circle cx="8" cy="8" r="7" stroke="white"></circle>
|
||||
<path clip-path="url(#rating-clip)" d="M0 16v-4.8h16 0v16z" fill="white"></path>
|
||||
</svg>
|
||||
</span>
|
||||
{%- if sort_links %}{{ sort_order.rating }}</a>{% endif %}
|
||||
<span style="margin-left: 0.5em" class="header rank">
|
||||
{% if sort_links %}<a href="{{ sort_links.rating }}">{% endif %}
|
||||
<span class="rate-group">
|
||||
<svg class="rate-box" viewBox="0 0 16 16">
|
||||
<circle cx="8" cy="8" r="7" stroke="white"></circle>
|
||||
<path clip-path="url(#rating-clip)" d="M0 16v-4.8h16 0v16z" fill="white"></path>
|
||||
</svg>
|
||||
</span>
|
||||
{%- if sort_links %}{{ sort_order.rating }}</a>{% endif %}
|
||||
</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block after_point %}
|
||||
<td class="user-problem-count">{{ user.problem_count }}</td>
|
||||
<td>
|
||||
<div class="about-td">
|
||||
{% if user.about %}
|
||||
{% cache 86400 'user_about' user.id MATH_ENGINE %}
|
||||
{{ user.about|markdown(lazy_load=True)|reference|str|safe }}
|
||||
{% endcache %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
<td class="user-problem-count">{{ user.problem_count }}</td>
|
||||
<td>
|
||||
<div class="about-td">
|
||||
{% if user.about %}
|
||||
{% cache 86400 'user_about' user.id MATH_ENGINE %}
|
||||
{{ user.about|markdown(lazy_load=True)|reference|str|safe }}
|
||||
{% endcache %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue