Add school to ranking

This commit is contained in:
cuom1999 2022-11-18 17:59:12 -06:00
parent a35ea0f6d5
commit e229b53226
7 changed files with 59 additions and 37 deletions

View file

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: lqdoj2\n" "Project-Id-Version: lqdoj2\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-19 03:12+0700\n" "POT-Creation-Date: 2022-11-19 07:11+0700\n"
"PO-Revision-Date: 2021-07-20 03:44\n" "PO-Revision-Date: 2021-07-20 03:44\n"
"Last-Translator: Icyene\n" "Last-Translator: Icyene\n"
"Language-Team: Vietnamese\n" "Language-Team: Vietnamese\n"
@ -87,7 +87,7 @@ msgid "Included contests"
msgstr "" msgstr ""
#: judge/admin/contest.py:74 judge/admin/volunteer.py:54 #: judge/admin/contest.py:74 judge/admin/volunteer.py:54
#: templates/contest/clarification.html:42 templates/contest/contest.html:85 #: templates/contest/clarification.html:42 templates/contest/contest.html:90
#: templates/contest/moss.html:43 templates/internal/base.html:29 #: templates/contest/moss.html:43 templates/internal/base.html:29
#: templates/internal/base.html:37 templates/problem/list.html:15 #: templates/internal/base.html:37 templates/problem/list.html:15
#: templates/problem/list.html:30 templates/problem/list.html:146 #: templates/problem/list.html:30 templates/problem/list.html:146
@ -214,7 +214,7 @@ msgid "Taxonomy"
msgstr "" msgstr ""
#: judge/admin/problem.py:216 judge/admin/problem.py:434 #: judge/admin/problem.py:216 judge/admin/problem.py:434
#: templates/contest/contest.html:86 templates/problem/data.html:475 #: templates/contest/contest.html:91 templates/problem/data.html:475
#: templates/problem/list.html:20 templates/problem/list.html:44 #: templates/problem/list.html:20 templates/problem/list.html:44
#: templates/user/base-users-table.html:10 templates/user/user-about.html:36 #: templates/user/base-users-table.html:10 templates/user/user-about.html:36
#: templates/user/user-about.html:52 templates/user/user-problems.html:58 #: templates/user/user-about.html:52 templates/user/user-problems.html:58
@ -463,7 +463,7 @@ msgstr ""
msgid "ICPC" msgid "ICPC"
msgstr "" msgstr ""
#: judge/contest_format/ioi.py:19 #: judge/contest_format/ioi.py:20
msgid "IOI" msgid "IOI"
msgstr "" msgstr ""
@ -780,8 +780,8 @@ msgid ""
"Format hh:mm:ss. For example, if you want to freeze contest after 2 hours, " "Format hh:mm:ss. For example, if you want to freeze contest after 2 hours, "
"enter 02:00:00" "enter 02:00:00"
msgstr "" msgstr ""
"Định dạng hh:mm:ss (giờ:phút:giây). Ví dụ, nếu muốn đóng băng kỳ thi sau 2h, hãy " "Định dạng hh:mm:ss (giờ:phút:giây). Ví dụ, nếu muốn đóng băng kỳ thi sau 2h, "
"nhập 02:00:00" "hãy nhập 02:00:00"
#: judge/models/contest.py:140 judge/models/problem.py:222 #: judge/models/contest.py:140 judge/models/problem.py:222
msgid "publicly visible" msgid "publicly visible"
@ -2942,7 +2942,7 @@ msgstr "Hướng dẫn cho {0}"
msgid "Editorial for <a href=\"{1}\">{0}</a>" msgid "Editorial for <a href=\"{1}\">{0}</a>"
msgstr "Hướng dẫn cho <a href=\"{1}\">{0}</a>" msgstr "Hướng dẫn cho <a href=\"{1}\">{0}</a>"
#: judge/views/problem.py:447 templates/contest/contest.html:81 #: judge/views/problem.py:447 templates/contest/contest.html:86
#: templates/organization/org-left-sidebar.html:4 #: templates/organization/org-left-sidebar.html:4
#: templates/user/user-about.html:28 templates/user/user-bookmarks.html:32 #: templates/user/user-about.html:28 templates/user/user-bookmarks.html:32
#: templates/user/user-tabs.html:5 templates/user/users-table.html:19 #: templates/user/user-tabs.html:5 templates/user/users-table.html:19
@ -3980,17 +3980,25 @@ msgstr ""
msgid "<b>%(length)s</b> long starting on <b>%(start_time)s</b>" msgid "<b>%(length)s</b> long starting on <b>%(start_time)s</b>"
msgstr "Kéo dài <b>%(length)s</b> bắt đầu từ <b>%(start_time)s</b>" msgstr "Kéo dài <b>%(length)s</b> bắt đầu từ <b>%(start_time)s</b>"
#: templates/contest/contest.html:87 #: templates/contest/contest.html:72
msgid "Standing was frozen"
msgstr "Bảng điểm đã đóng băng"
#: templates/contest/contest.html:72
msgid "at"
msgstr "lúc"
#: templates/contest/contest.html:92
msgid "AC Rate" msgid "AC Rate"
msgstr "Tỷ lệ AC" msgstr "Tỷ lệ AC"
#: templates/contest/contest.html:88 templates/contest/list.html:242 #: templates/contest/contest.html:93 templates/contest/list.html:242
#: templates/contest/list.html:291 templates/contest/list.html:376 #: templates/contest/list.html:291 templates/contest/list.html:376
#: templates/problem/list.html:21 #: templates/problem/list.html:21
msgid "Users" msgid "Users"
msgstr "Số lượng" msgstr "Người nộp"
#: templates/contest/contest.html:113 templates/problem/list.html:54 #: templates/contest/contest.html:118 templates/problem/list.html:54
#: templates/problem/list.html:126 #: templates/problem/list.html:126
msgid "Editorial" msgid "Editorial"
msgstr "Hướng dẫn" msgstr "Hướng dẫn"
@ -4141,6 +4149,11 @@ msgstr "Hủy kết quả"
msgid "Fullname" msgid "Fullname"
msgstr "Tên đầy đủ" msgstr "Tên đầy đủ"
#: templates/contest/ranking-table.html:57 templates/user/edit-profile.html:103
#: templates/user/import/table_csv.html:7
msgid "School"
msgstr "Trường"
#: templates/contest/ranking.html:21 #: templates/contest/ranking.html:21
msgid "Are you sure you want to disqualify this participation?" msgid "Are you sure you want to disqualify this participation?"
msgstr "Bạn có chắc muốn hủy kết quả này?" msgstr "Bạn có chắc muốn hủy kết quả này?"
@ -4149,31 +4162,31 @@ msgstr "Bạn có chắc muốn hủy kết quả này?"
msgid "Are you sure you want to un-disqualify this participation?" msgid "Are you sure you want to un-disqualify this participation?"
msgstr "Bạn có chắc muốn khôi phục kết quả này?" msgstr "Bạn có chắc muốn khôi phục kết quả này?"
#: templates/contest/ranking.html:135 #: templates/contest/ranking.html:136
msgid "View user participation" msgid "View user participation"
msgstr "Xem các lần tham gia" msgstr "Xem các lần tham gia"
#: templates/contest/ranking.html:139 #: templates/contest/ranking.html:140
msgid "Show organizations" msgid "Show schools"
msgstr "Hiển thị tổ chức" msgstr "Hiển thị trường"
#: templates/contest/ranking.html:143 #: templates/contest/ranking.html:144
msgid "Show full name" msgid "Show full name"
msgstr "Hiển thị họ tên" msgstr "Hiển thị họ tên"
#: templates/contest/ranking.html:146 #: templates/contest/ranking.html:147
msgid "Show friends only" msgid "Show friends only"
msgstr "Chỉ hiển thị bạn bè" msgstr "Chỉ hiển thị bạn bè"
#: templates/contest/ranking.html:149 #: templates/contest/ranking.html:150
msgid "Total score only" msgid "Total score only"
msgstr "Chỉ hiển thị tổng điểm" msgstr "Chỉ hiển thị tổng điểm"
#: templates/contest/ranking.html:151 #: templates/contest/ranking.html:152
msgid "Show virtual participation" msgid "Show virtual participation"
msgstr "Hiển thị tham gia ảo" msgstr "Hiển thị tham gia ảo"
#: templates/contest/ranking.html:155 #: templates/contest/ranking.html:156
msgid "Download as CSV" msgid "Download as CSV"
msgstr "Tải file CSV" msgstr "Tải file CSV"
@ -5505,10 +5518,6 @@ msgstr "Top Score"
msgid "Rank" msgid "Rank"
msgstr "Rank" msgstr "Rank"
#: templates/user/edit-profile.html:103 templates/user/import/table_csv.html:7
msgid "School"
msgstr "Trường"
#: templates/user/edit-profile.html:109 #: templates/user/edit-profile.html:109
msgid "Self-description" msgid "Self-description"
msgstr "Tự giới thiệu" msgstr "Tự giới thiệu"
@ -5769,6 +5778,12 @@ msgstr "Thông tin"
msgid "Check all" msgid "Check all"
msgstr "Chọn tất cả" msgstr "Chọn tất cả"
#~ msgid "Frozen"
#~ msgstr "Đã đóng băng"
#~ msgid "Show organizations"
#~ msgstr "Hiển thị tổ chức"
#~ msgid "Dislike" #~ msgid "Dislike"
#~ msgstr "Không thích" #~ msgstr "Không thích"

View file

@ -111,7 +111,7 @@
} }
} }
#time { .time {
text-align: center; text-align: center;
display: block; display: block;
color: rgb(85, 85, 85); color: rgb(85, 85, 85);

View file

@ -56,7 +56,7 @@
{% endif %} {% endif %}
{%- endif -%} {%- endif -%}
</a> </a>
<div id="time"> <div class="time">
{% if contest.time_limit %} {% 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') %} {% 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> <b>{{ time_limit }}</b> window between <b>{{ start_time }}</b> and <b>{{ end_time }}</b>
@ -67,6 +67,11 @@
{% endtrans %} {% endtrans %}
{% endif %} {% endif %}
</div> </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>
<div class="content-description"> <div class="content-description">

View file

@ -58,7 +58,7 @@
function renew_filter(need_update=true) { function renew_filter(need_update=true) {
var checkboxes = [ var checkboxes = [
'#show-organizations-checkbox', '#show-schools-checkbox',
'#show-fullnames-checkbox', '#show-fullnames-checkbox',
'#show-total-score-checkbox', '#show-total-score-checkbox',
]; ];
@ -171,8 +171,8 @@
window.location.href = url.replace('__username__', $(this).val()); window.location.href = url.replace('__username__', $(this).val());
}); });
$('#show-organizations-checkbox').click(function () { $('#show-schools-checkbox').click(function () {
$('.organization').toggle(); $('.school').toggle();
}); });
$('#show-fullnames-checkbox').click(function () { $('#show-fullnames-checkbox').click(function () {
$('.fullname').toggle(); $('.fullname').toggle();

View file

@ -36,7 +36,7 @@
} }
.frozen { .frozen {
background: #a5c5d9 !important; background: lightskyblue !important;
} }
.rank { .rank {

View file

@ -20,9 +20,9 @@
{{ user.user.first_name if user.user.first_name else ''}} {{ user.user.first_name if user.user.first_name else ''}}
</div> </div>
{% endif %} {% endif %}
{% if user.organization %} {% if user.user.last_name %}
<div class="organization" style="display: none"><a style="color: gray; font-weight: 600" href="{{ user.organization.get_absolute_url() }}"> <div class="school" style="display: none"><a style="color: gray; font-weight: 600">
{{- user.organization.short_name -}} {{- user.user.last_name -}}
</a></div> </a></div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
@ -54,6 +54,7 @@
{% block before_point_head %} {% block before_point_head %}
<th class="full-name" style="display:none;">{{ _('Fullname') }}</th> <th class="full-name" style="display:none;">{{ _('Fullname') }}</th>
<th class="school" style="display:none;">{{ _('School') }}</th>
{% for problem in problems %} {% for problem in problems %}
<th class="points header problem-score-col" title="{{ problem.problem.name }}"><a href="{{ url('problem_detail', problem.problem.code) }}"> <th class="points header problem-score-col" title="{{ problem.problem.name }}"><a href="{{ url('problem_detail', problem.problem.code) }}">
{{- contest.get_label_for_problem(loop.index0) }} {{- contest.get_label_for_problem(loop.index0) }}

View file

@ -103,8 +103,9 @@
if ($col.hasClass('rating-column')) { if ($col.hasClass('rating-column')) {
return; return;
} else if ($col.hasClass('user-name')) { } else if ($col.hasClass('user-name')) {
row_data.push(clean_text($col.ignore('.fullname').ignore('.organization').text())); row_data.push(clean_text($col.ignore('.fullname').ignore('.school').text()));
row_data.push(clean_text($col.ignore('.user').ignore('.organization').text())); row_data.push(clean_text($col.ignore('.user').ignore('.school').text()));
row_data.push(clean_text($col.ignore('.user').ignore('.fullname').text()));
} else { } else {
row_data.push(clean_text($col.ignore('.solving-time').text())); row_data.push(clean_text($col.ignore('.solving-time').text()));
} }
@ -135,8 +136,8 @@
<input id="search-contest" type="text" placeholder="{{ _('View user participation') }}"> <input id="search-contest" type="text" placeholder="{{ _('View user participation') }}">
{% endif %} {% endif %}
{% endif %} {% endif %}
<input id="show-organizations-checkbox" type="checkbox" style="vertical-align: bottom"> <input id="show-schools-checkbox" type="checkbox" style="vertical-align: bottom">
<label for="show-organizations-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show organizations') }}</label> <label for="show-schools-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show schools') }}</label>
<input id="show-fullnames-checkbox" type="checkbox" style="vertical-align: bottom"> <input id="show-fullnames-checkbox" type="checkbox" style="vertical-align: bottom">