Add submission title

This commit is contained in:
cuom1999 2022-06-09 12:43:15 +07:00
parent b523dcd2f6
commit da551060da
3 changed files with 71 additions and 55 deletions

View file

@ -18,6 +18,7 @@ from django.http import (
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.urls import reverse from django.urls import reverse
from django.utils import timezone from django.utils import timezone
from django.utils.html import format_html
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.translation import gettext as _, gettext_lazy, ungettext from django.utils.translation import gettext as _, gettext_lazy, ungettext
@ -401,6 +402,15 @@ class OrganizationSubmissions(
return context return context
def get_content_title(self):
return format_html(
_('All submissions in <a href="{1}">{0}</a>'),
self.organization,
reverse(
"organization_home", args=[self.organization.id, self.organization.slug]
),
)
class OrganizationMembershipChange( class OrganizationMembershipChange(
LoginRequiredMixin, OrganizationMixin, SingleObjectMixin, View LoginRequiredMixin, OrganizationMixin, SingleObjectMixin, View

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-06-08 05:11+0700\n" "POT-Creation-Date: 2022-06-09 12:37+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"
@ -277,7 +277,7 @@ msgid "Limits"
msgstr "Giới hạn" msgstr "Giới hạn"
#: judge/admin/problem.py:191 judge/admin/submission.py:353 #: judge/admin/problem.py:191 judge/admin/submission.py:353
#: templates/stats/base.html:14 templates/submission/list.html:340 #: templates/stats/base.html:14 templates/submission/list.html:342
msgid "Language" msgid "Language"
msgstr "Ngôn ngữ" msgstr "Ngôn ngữ"
@ -520,7 +520,7 @@ msgstr "Đăng ký để nhận thông báo về các kỳ thi"
msgid "Enable experimental features" msgid "Enable experimental features"
msgstr "Sử dụng các tính năng thử nghiệm" msgstr "Sử dụng các tính năng thử nghiệm"
#: judge/forms.py:86 judge/views/organization.py:441 judge/views/register.py:68 #: judge/forms.py:86 judge/views/organization.py:449 judge/views/register.py:68
#, python-brace-format #, python-brace-format
msgid "You may not be part of more than {count} public groups." msgid "You may not be part of more than {count} public groups."
msgstr "Bạn không thể tham gia nhiều hơn {count} nhóm công khai." msgstr "Bạn không thể tham gia nhiều hơn {count} nhóm công khai."
@ -2493,8 +2493,8 @@ msgstr "Bạn phải giải ít nhất 1 bài trước khi được vote."
msgid "You already voted." msgid "You already voted."
msgstr "Bạn đã vote." msgstr "Bạn đã vote."
#: judge/views/comment.py:153 judge/views/organization.py:741 #: judge/views/comment.py:153 judge/views/organization.py:749
#: judge/views/organization.py:833 #: judge/views/organization.py:841
msgid "Edited from site" msgid "Edited from site"
msgstr "Chỉnh sửa từ web" msgstr "Chỉnh sửa từ web"
@ -2671,86 +2671,90 @@ msgstr "Runtimes"
msgid "Notifications (%d unseen)" msgid "Notifications (%d unseen)"
msgstr "Thông báo (%d chưa xem)" msgstr "Thông báo (%d chưa xem)"
#: judge/views/organization.py:133 judge/views/organization.py:139 #: judge/views/organization.py:134 judge/views/organization.py:140
msgid "No such organization" msgid "No such organization"
msgstr "Không có tổ chức như vậy" msgstr "Không có tổ chức như vậy"
#: judge/views/organization.py:134 #: judge/views/organization.py:135
#, python-format #, python-format
msgid "Could not find an organization with the key \"%s\"." msgid "Could not find an organization with the key \"%s\"."
msgstr "Không tìm thấy tổ chức với mã \"%s\"." msgstr "Không tìm thấy tổ chức với mã \"%s\"."
#: judge/views/organization.py:140 #: judge/views/organization.py:141
msgid "Could not find such organization." msgid "Could not find such organization."
msgstr "" msgstr ""
#: judge/views/organization.py:156 #: judge/views/organization.py:157
msgid "Can't edit organization" msgid "Can't edit organization"
msgstr "Không thể chỉnh sửa tổ chức" msgstr "Không thể chỉnh sửa tổ chức"
#: judge/views/organization.py:157 #: judge/views/organization.py:158
msgid "You are not allowed to edit this organization." msgid "You are not allowed to edit this organization."
msgstr "Bạn không được phép chỉnh sửa tổ chức này." msgstr "Bạn không được phép chỉnh sửa tổ chức này."
#: judge/views/organization.py:169 #: judge/views/organization.py:170
#, fuzzy #, fuzzy
#| msgid "Can't edit organization" #| msgid "Can't edit organization"
msgid "Can't access organization" msgid "Can't access organization"
msgstr "Không thể chỉnh sửa tổ chức" msgstr "Không thể chỉnh sửa tổ chức"
#: judge/views/organization.py:170 #: judge/views/organization.py:171
msgid "You are not allowed to access this organization." msgid "You are not allowed to access this organization."
msgstr "Bạn không được phép chỉnh sửa tổ chức này." msgstr "Bạn không được phép chỉnh sửa tổ chức này."
#: judge/views/organization.py:228 judge/views/register.py:49 #: judge/views/organization.py:229 judge/views/register.py:49
#: templates/contest/list.html:109 templates/organization/list.html:31 #: templates/contest/list.html:109 templates/organization/list.html:31
#: templates/problem/list-base.html:96 templates/user/user-left-sidebar.html:4 #: templates/problem/list-base.html:96 templates/user/user-left-sidebar.html:4
#: templates/user/user-list-tabs.html:6 #: templates/user/user-list-tabs.html:6
msgid "Groups" msgid "Groups"
msgstr "Nhóm" msgstr "Nhóm"
#: judge/views/organization.py:303 #: judge/views/organization.py:304
#, python-format #, python-format
msgid "%s Members" msgid "%s Members"
msgstr "%s Thành viên" msgstr "%s Thành viên"
#: judge/views/organization.py:427 judge/views/organization.py:433 #: judge/views/organization.py:407
#: judge/views/organization.py:440 msgid "All submissions in <a href=\"{1}\">{0}</a>"
msgstr "Bài nộp trong <a href=\"{1}\">{0}</a>"
#: judge/views/organization.py:435 judge/views/organization.py:441
#: judge/views/organization.py:448
msgid "Joining group" msgid "Joining group"
msgstr "Tham gia nhóm" msgstr "Tham gia nhóm"
#: judge/views/organization.py:428 #: judge/views/organization.py:436
msgid "You are already in the group." msgid "You are already in the group."
msgstr "Bạn đã ở trong nhóm." msgstr "Bạn đã ở trong nhóm."
#: judge/views/organization.py:433 #: judge/views/organization.py:441
msgid "This group is not open." msgid "This group is not open."
msgstr "Nhóm này là nhóm kín." msgstr "Nhóm này là nhóm kín."
#: judge/views/organization.py:456 #: judge/views/organization.py:464
msgid "Leaving group" msgid "Leaving group"
msgstr "Rời nhóm" msgstr "Rời nhóm"
#: judge/views/organization.py:457 #: judge/views/organization.py:465
#, python-format #, python-format
msgid "You are not in \"%s\"." msgid "You are not in \"%s\"."
msgstr "Bạn không ở trong \"%s\"." msgstr "Bạn không ở trong \"%s\"."
#: judge/views/organization.py:482 #: judge/views/organization.py:490
#, python-format #, python-format
msgid "Request to join %s" msgid "Request to join %s"
msgstr "Đăng ký tham gia %s" msgstr "Đăng ký tham gia %s"
#: judge/views/organization.py:513 #: judge/views/organization.py:521
msgid "Join request detail" msgid "Join request detail"
msgstr "Chi tiết đơn đăng ký" msgstr "Chi tiết đơn đăng ký"
#: judge/views/organization.py:561 #: judge/views/organization.py:569
#, python-format #, python-format
msgid "Managing join requests for %s" msgid "Managing join requests for %s"
msgstr "Quản lý đơn đăng ký cho %s" msgstr "Quản lý đơn đăng ký cho %s"
#: judge/views/organization.py:601 #: judge/views/organization.py:609
#, python-format #, python-format
msgid "" msgid ""
"Your organization can only receive %d more members. You cannot approve %d " "Your organization can only receive %d more members. You cannot approve %d "
@ -2759,71 +2763,71 @@ msgstr ""
"Tổ chức chỉ có thể chứa %d thành viên. Bạn không thể chấp thuận nhiều hơn %d " "Tổ chức chỉ có thể chứa %d thành viên. Bạn không thể chấp thuận nhiều hơn %d "
"người." "người."
#: judge/views/organization.py:619 #: judge/views/organization.py:627
#, python-format #, python-format
msgid "Approved %d user." msgid "Approved %d user."
msgid_plural "Approved %d users." msgid_plural "Approved %d users."
msgstr[0] "Đã chấp thuận %d người." msgstr[0] "Đã chấp thuận %d người."
#: judge/views/organization.py:622 #: judge/views/organization.py:630
#, python-format #, python-format
msgid "Rejected %d user." msgid "Rejected %d user."
msgid_plural "Rejected %d users." msgid_plural "Rejected %d users."
msgstr[0] "Đã từ chối %d người." msgstr[0] "Đã từ chối %d người."
#: judge/views/organization.py:662 #: judge/views/organization.py:670
#, python-format #, python-format
msgid "Add member for %s" msgid "Add member for %s"
msgstr "Thêm thành viên cho %s" msgstr "Thêm thành viên cho %s"
#: judge/views/organization.py:674 #: judge/views/organization.py:682
#, fuzzy #, fuzzy
#| msgid "Edited from site" #| msgid "Edited from site"
msgid "Added members from site" msgid "Added members from site"
msgstr "Chỉnh sửa từ web" msgstr "Chỉnh sửa từ web"
#: judge/views/organization.py:694 judge/views/organization.py:702 #: judge/views/organization.py:702 judge/views/organization.py:710
msgid "Can't kick user" msgid "Can't kick user"
msgstr "Không thể đuổi" msgstr "Không thể đuổi"
#: judge/views/organization.py:695 #: judge/views/organization.py:703
msgid "The user you are trying to kick does not exist!" msgid "The user you are trying to kick does not exist!"
msgstr "" msgstr ""
#: judge/views/organization.py:703 #: judge/views/organization.py:711
#, python-format #, python-format
msgid "The user you are trying to kick is not in organization: %s." msgid "The user you are trying to kick is not in organization: %s."
msgstr "" msgstr ""
#: judge/views/organization.py:724 #: judge/views/organization.py:732
#, fuzzy, python-format #, fuzzy, python-format
#| msgid "Editing %s" #| msgid "Editing %s"
msgid "Edit %s" msgid "Edit %s"
msgstr "Đang chỉnh sửa %s" msgstr "Đang chỉnh sửa %s"
#: judge/views/organization.py:763 #: judge/views/organization.py:771
#, python-format #, python-format
msgid "Add blog for %s" msgid "Add blog for %s"
msgstr "Thêm bài đăng cho %s" msgstr "Thêm bài đăng cho %s"
#: judge/views/organization.py:774 #: judge/views/organization.py:782
msgid "Added from site" msgid "Added from site"
msgstr "Thêm từ web" msgstr "Thêm từ web"
#: judge/views/organization.py:808 #: judge/views/organization.py:816
msgid "Permission denied" msgid "Permission denied"
msgstr "Truy cập bị từ chối" msgstr "Truy cập bị từ chối"
#: judge/views/organization.py:809 #: judge/views/organization.py:817
msgid "Not allowed to edit this blog" msgid "Not allowed to edit this blog"
msgstr "Bạn không được phép chỉnh sửa bài đăng này." msgstr "Bạn không được phép chỉnh sửa bài đăng này."
#: judge/views/organization.py:828 #: judge/views/organization.py:836
#, python-format #, python-format
msgid "Edit blog %s" msgid "Edit blog %s"
msgstr "Chỉnh sửa %s" msgstr "Chỉnh sửa %s"
#: judge/views/organization.py:858 #: judge/views/organization.py:866
#, python-format #, python-format
msgid "Pending blogs in %s" msgid "Pending blogs in %s"
msgstr "Bài đang đợi duyệt trong %s" msgstr "Bài đang đợi duyệt trong %s"
@ -3015,7 +3019,7 @@ msgstr "Xác thực thất bại"
msgid "Language statistics" msgid "Language statistics"
msgstr "Thống kê ngôn ngữ" msgstr "Thống kê ngôn ngữ"
#: judge/views/status.py:27 templates/submission/list.html:331 #: judge/views/status.py:27 templates/submission/list.html:333
msgid "Status" msgid "Status"
msgstr "Kết quả chấm" msgstr "Kết quả chấm"
@ -3405,7 +3409,7 @@ msgstr "Xin chào, <b>%(username)s</b>."
#: templates/organization/org-left-sidebar.html:10 #: templates/organization/org-left-sidebar.html:10
#: templates/problem/left-sidebar.html:5 templates/problem/list-base.html:249 #: templates/problem/left-sidebar.html:5 templates/problem/list-base.html:249
#: templates/problem/problem-list-tabs.html:6 #: templates/problem/problem-list-tabs.html:6
#: templates/submission/info-base.html:12 templates/submission/list.html:384 #: templates/submission/info-base.html:12 templates/submission/list.html:386
#: templates/submission/submission-list-tabs.html:15 #: templates/submission/submission-list-tabs.html:15
msgid "Admin" msgid "Admin"
msgstr "" msgstr ""
@ -3737,7 +3741,7 @@ msgid "Info"
msgstr "Thông tin" msgstr "Thông tin"
#: templates/contest/contest-tabs.html:6 templates/stats/base.html:9 #: templates/contest/contest-tabs.html:6 templates/stats/base.html:9
#: templates/submission/list.html:356 #: templates/submission/list.html:358
msgid "Statistics" msgid "Statistics"
msgstr "Thống kê" msgstr "Thống kê"
@ -4550,7 +4554,7 @@ msgid ""
msgstr "Bạn chuẩn bị {action} vài bài nộp. Tiếp tục?" msgstr "Bạn chuẩn bị {action} vài bài nộp. Tiếp tục?"
#: templates/problem/manage_submission.html:127 #: templates/problem/manage_submission.html:127
#: templates/submission/list.html:327 #: templates/submission/list.html:329
msgid "Filter submissions" msgid "Filter submissions"
msgstr "Lọc bài nộp" msgstr "Lọc bài nộp"
@ -4773,7 +4777,7 @@ msgid "Group"
msgstr "" msgstr ""
#: templates/problem/search-form.html:62 templates/problem/search-form.html:64 #: templates/problem/search-form.html:62 templates/problem/search-form.html:64
#: templates/submission/list.html:373 #: templates/submission/list.html:375
#: templates/submission/submission-list-tabs.html:4 #: templates/submission/submission-list-tabs.html:4
msgid "All" msgid "All"
msgstr "Tất cả" msgstr "Tất cả"
@ -4782,7 +4786,7 @@ msgstr "Tất cả"
msgid "Point range" msgid "Point range"
msgstr "Mốc điểm" msgstr "Mốc điểm"
#: templates/problem/search-form.html:92 templates/submission/list.html:349 #: templates/problem/search-form.html:92 templates/submission/list.html:351
#: templates/ticket/list.html:248 #: templates/ticket/list.html:248
msgid "Go" msgid "Go"
msgstr "Lọc" msgstr "Lọc"
@ -5088,25 +5092,25 @@ msgstr "Lọc theo kết quả..."
msgid "Filter by language..." msgid "Filter by language..."
msgstr "Lọc theo ngôn ngữ..." msgstr "Lọc theo ngôn ngữ..."
#: templates/submission/list.html:304 #: templates/submission/list.html:306
msgid "You were disconnected. Refresh to show latest updates." msgid "You were disconnected. Refresh to show latest updates."
msgstr "Bạn bị ngắt kết nối. Hãy làm mới để xem cập nhật mới nhất." msgstr "Bạn bị ngắt kết nối. Hãy làm mới để xem cập nhật mới nhất."
#: templates/submission/list.html:362 #: templates/submission/list.html:364
msgid "Total:" msgid "Total:"
msgstr "Tổng:" msgstr "Tổng:"
#: templates/submission/list.html:375 #: templates/submission/list.html:377
#: templates/submission/submission-list-tabs.html:6 #: templates/submission/submission-list-tabs.html:6
msgid "Mine" msgid "Mine"
msgstr "Tôi" msgstr "Tôi"
#: templates/submission/list.html:378 #: templates/submission/list.html:380
#: templates/submission/submission-list-tabs.html:9 #: templates/submission/submission-list-tabs.html:9
msgid "Best" msgid "Best"
msgstr "Tốt nhất" msgstr "Tốt nhất"
#: templates/submission/list.html:381 #: templates/submission/list.html:383
#, fuzzy, python-format #, fuzzy, python-format
#| msgid "user" #| msgid "user"
msgid "%(user)s" msgid "%(user)s"

View file

@ -292,13 +292,15 @@
</style> </style>
{% endblock %} {% endblock %}
{% block middle_content %} {% block middle_title %}
{% if page_obj.num_pages > 1 %} <div class="page-title">
<div style="margin-bottom: 6px; margin-top: 11px"> <div class="tabs" style="border: none;">
{% include "list-pages.html" %} <h2>{{content_title}}</h2>
</div> </div>
{% endif %} </div>
{% endblock %}
{% block middle_content %}
<div class="submission"> <div class="submission">
<div class="ws-closed"> <div class="ws-closed">
<a href="javascript:void(0)">{{ _('You were disconnected. Refresh to show latest updates.') }}</a> <a href="javascript:void(0)">{{ _('You were disconnected. Refresh to show latest updates.') }}</a>