Accept Merge Request #142 添加前台小组页面,个页面样式功能的统一调整 : (dev-sxw -> dev)
Merge Request: 添加前台小组页面,个页面样式功能的统一调整 Created By: @esp Accepted By: @virusdefender URL: https://coding.net/u/virusdefender/p/qduoj/git/merge/142
This commit is contained in:
@@ -343,7 +343,7 @@ def contest_list_page(request, page=1):
|
|||||||
# 搜索的情况
|
# 搜索的情况
|
||||||
keyword = request.GET.get("keyword", None)
|
keyword = request.GET.get("keyword", None)
|
||||||
if keyword:
|
if keyword:
|
||||||
contests = contests.filter(title__contains=keyword)
|
contests = contests.filter(Q(title__contains=keyword) | Q(description__contains=keyword))
|
||||||
|
|
||||||
# 筛选我能参加的比赛
|
# 筛选我能参加的比赛
|
||||||
join = request.GET.get("join", None)
|
join = request.GET.get("join", None)
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ from rest_framework.test import APITestCase, APIClient
|
|||||||
from account.models import User, REGULAR_USER, ADMIN, SUPER_ADMIN
|
from account.models import User, REGULAR_USER, ADMIN, SUPER_ADMIN
|
||||||
from group.models import Group, UserGroupRelation, JoinGroupRequest
|
from group.models import Group, UserGroupRelation, JoinGroupRequest
|
||||||
|
|
||||||
|
from django.test import TestCase, Client
|
||||||
|
|
||||||
|
|
||||||
class GroupAPITest(APITestCase):
|
class GroupAPITest(APITestCase):
|
||||||
pass
|
pass
|
||||||
@@ -254,3 +256,28 @@ class JoinGroupRequestAdminAPITest(APITestCase):
|
|||||||
response = self.client.put(self.url, data=data)
|
response = self.client.put(self.url, data=data)
|
||||||
self.assertEqual(response.data, {"code": 1, "data": u"加入失败,已经在本小组内"})
|
self.assertEqual(response.data, {"code": 1, "data": u"加入失败,已经在本小组内"})
|
||||||
|
|
||||||
|
|
||||||
|
class ProblemListPageTest(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.client = Client()
|
||||||
|
self.url = reverse('group_list_page')
|
||||||
|
self.url = reverse('problem_list_page', kwargs={"page": 1})
|
||||||
|
self.user = User.objects.create(username="test", admin_type=SUPER_ADMIN)
|
||||||
|
self.user.set_password("testaa")
|
||||||
|
self.user.save()
|
||||||
|
self.group = Group.objects.create(name="group1",
|
||||||
|
description="description1",
|
||||||
|
# 0是公开 1是需要申请后加入 2是不允许任何人加入
|
||||||
|
join_group_setting = 1,
|
||||||
|
admin=User.objects.get(username="test"))
|
||||||
|
|
||||||
|
def get_group_list_page_successful(self):
|
||||||
|
self.client.login(username="test", password="testaa")
|
||||||
|
response = self.client.get(self.url)
|
||||||
|
self.assertEqual(response.status_coed, 200)
|
||||||
|
|
||||||
|
def get_group_list_page_successful_with_keyword(self):
|
||||||
|
self.client.login(username="test", password="testaa")
|
||||||
|
response = self.client.get(self.url+"?keyword=gro")
|
||||||
|
self.assertEqual(response.status_coed, 200)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from django.db import IntegrityError
|
|||||||
|
|
||||||
from rest_framework.views import APIView
|
from rest_framework.views import APIView
|
||||||
|
|
||||||
from utils.shortcuts import error_response, serializer_invalid_response, success_response, paginate
|
from utils.shortcuts import error_response, serializer_invalid_response, success_response, paginate, error_page
|
||||||
from account.models import REGULAR_USER, ADMIN, SUPER_ADMIN
|
from account.models import REGULAR_USER, ADMIN, SUPER_ADMIN
|
||||||
from account.decorators import login_required
|
from account.decorators import login_required
|
||||||
|
|
||||||
@@ -13,6 +13,9 @@ from .serializers import (CreateGroupSerializer, EditGroupSerializer,
|
|||||||
CreateJoinGroupRequestSerializer, GroupSerializer,
|
CreateJoinGroupRequestSerializer, GroupSerializer,
|
||||||
GroupMemberSerializer, EditGroupMemberSerializer,
|
GroupMemberSerializer, EditGroupMemberSerializer,
|
||||||
JoinGroupRequestSerializer, PutJoinGroupRequestSerializer)
|
JoinGroupRequestSerializer, PutJoinGroupRequestSerializer)
|
||||||
|
from announcement.models import Announcement
|
||||||
|
from django.core.paginator import Paginator
|
||||||
|
from django.db.models import Q
|
||||||
|
|
||||||
|
|
||||||
class GroupAPIViewBase(object):
|
class GroupAPIViewBase(object):
|
||||||
@@ -244,3 +247,39 @@ class JoinGroupRequestAdminAPIView(APIView, GroupAPIViewBase):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
return serializer_invalid_response(serializer)
|
return serializer_invalid_response(serializer)
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def group_list_page(request, page=1):
|
||||||
|
# 右侧的公告列表
|
||||||
|
announcements = Announcement.objects.filter(is_global=True, visible=True).order_by("-create_time")
|
||||||
|
|
||||||
|
groups = Group.objects.filter(visible=True, join_group_setting__lte=2)
|
||||||
|
# 搜索的情况
|
||||||
|
keyword = request.GET.get("keyword", None)
|
||||||
|
if keyword:
|
||||||
|
groups = groups.filter(Q(name__contains=keyword) | Q(description__contains=keyword))
|
||||||
|
|
||||||
|
paginator = Paginator(groups, 20)
|
||||||
|
try:
|
||||||
|
current_page = paginator.page(int(page))
|
||||||
|
except Exception:
|
||||||
|
return error_page(request, u"不存在的页码")
|
||||||
|
|
||||||
|
previous_page = next_page = None
|
||||||
|
|
||||||
|
try:
|
||||||
|
previous_page = current_page.previous_page_number()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
next_page = None
|
||||||
|
try:
|
||||||
|
next_page = current_page.next_page_number()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return render(request, "oj/group/group_list.html", {
|
||||||
|
"groups": groups, "announcements": announcements,
|
||||||
|
"contests": current_page, "page": int(page),
|
||||||
|
"previous_page": previous_page, "next_page": next_page,
|
||||||
|
"keyword": keyword, "announcements": announcements,
|
||||||
|
})
|
||||||
|
|||||||
@@ -100,6 +100,9 @@ urlpatterns = [
|
|||||||
url(r'^submissions/$', "submission.views.my_submission_list_page", name="my_submission_list_page"),
|
url(r'^submissions/$', "submission.views.my_submission_list_page", name="my_submission_list_page"),
|
||||||
url(r'^submissions/(?P<page>\d+)/$', "submission.views.my_submission_list_page", name="my_submission_list_page"),
|
url(r'^submissions/(?P<page>\d+)/$', "submission.views.my_submission_list_page", name="my_submission_list_page"),
|
||||||
|
|
||||||
url(r'^contest/(?P<contest_id>\d+)/rank/$', "contest.views.contest_rank_page", name="contest_rank_page")
|
url(r'^contest/(?P<contest_id>\d+)/rank/$', "contest.views.contest_rank_page", name="contest_rank_page"),
|
||||||
|
|
||||||
|
url(r'^groups/$', "group.views.group_list_page", name="group_list_page"),
|
||||||
|
url(r'^groups/(?P<page>\d+)/$', "group.views.group_list_page", name="group_list_page")
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ def problem_list_page(request, page=1):
|
|||||||
# 搜索的情况
|
# 搜索的情况
|
||||||
keyword = request.GET.get("keyword", None)
|
keyword = request.GET.get("keyword", None)
|
||||||
if keyword:
|
if keyword:
|
||||||
problems = problems.filter(title__contains=keyword)
|
problems = problems.filter(Q(title__contains=keyword) | Q(description__contains=keyword))
|
||||||
|
|
||||||
# 按照标签筛选
|
# 按照标签筛选
|
||||||
tag_text = request.GET.get("tag", None)
|
tag_text = request.GET.get("tag", None)
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ class SubmissionsListPageTest(TestCase):
|
|||||||
self.user.set_password("666666")
|
self.user.set_password("666666")
|
||||||
self.user.save()
|
self.user.save()
|
||||||
self.user2.save()
|
self.user2.save()
|
||||||
# self.client.login(username="gogoing", password="666666")
|
|
||||||
self.submission = Submission.objects.create(user_id=self.user.id,
|
self.submission = Submission.objects.create(user_id=self.user.id,
|
||||||
language=1,
|
language=1,
|
||||||
code='#include "stdio.h"\nint main(){\n\treturn 0;\n}',
|
code='#include "stdio.h"\nint main(){\n\treturn 0;\n}',
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ def my_submission_list_page(request, page=1):
|
|||||||
"""
|
"""
|
||||||
我的所有提交的列表页
|
我的所有提交的列表页
|
||||||
"""
|
"""
|
||||||
submissions = Submission.objects.filter(user_id=request.user.id). \
|
submissions = Submission.objects.filter(user_id=request.user.id, contest_id__isnull=True). \
|
||||||
values("id", "result", "create_time", "accepted_answer_time", "language").order_by("-create_time")
|
values("id", "result", "create_time", "accepted_answer_time", "language").order_by("-create_time")
|
||||||
language = request.GET.get("language", None)
|
language = request.GET.get("language", None)
|
||||||
filter = None
|
filter = None
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
<td>{{ el.sort_index }}</td>
|
<td>{{ el.sort_index }}</td>
|
||||||
<td>{{ el.title }}</td>
|
<td>{{ el.title }}</td>
|
||||||
<td ms-visible="editMode=='2'">{{ el.score}}</td>
|
<td ms-visible="editMode=='2'">{{ el.score}}</td>
|
||||||
<td>{{ getYesOrNo(el.visible) }}</td>
|
<td ms-text="el.visible?'可见':'不可见'"></td>
|
||||||
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss") }}</td>
|
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss") }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="javascript:void(0)" class="btn-sm btn-info"
|
<a href="javascript:void(0)" class="btn-sm btn-info"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<td>{{ el.title }}</td>
|
<td>{{ el.title }}</td>
|
||||||
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
||||||
<td>{{ el.created_by.username }}</td>
|
<td>{{ el.created_by.username }}</td>
|
||||||
<td ms-text="el.visible?'可见':'不可见'">{{ getYesOrNo(el.visible) }}</td>
|
<td ms-text="el.visible?'可见':'不可见'"></td>
|
||||||
<td>{{ el.total_accepted_number }}/{{ el.total_submit_number }}</td>
|
<td>{{ el.total_accepted_number }}/{{ el.total_submit_number }}</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn-sm btn-info" ms-click="showEditProblemPage(el.id)">编辑</button>
|
<button class="btn-sm btn-info" ms-click="showEditProblemPage(el.id)">编辑</button>
|
||||||
|
|||||||
71
template/src/oj/group/group_list.html
Normal file
71
template/src/oj/group/group_list.html
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
{% extends "oj_base.html" %}
|
||||||
|
{% block body %}
|
||||||
|
{% load problem %}
|
||||||
|
<div class="container main">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-9 col-lg-9">
|
||||||
|
<div class="row">
|
||||||
|
<div class="right">
|
||||||
|
<form class="form-inline" method="get">
|
||||||
|
<div class="form-group-sm">
|
||||||
|
<input name="keyword" class="form-control" placeholder="请输入关键词">
|
||||||
|
<input type="submit" value="搜索" class="btn btn-primary">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>名称</th>
|
||||||
|
<th>加入方式</th>
|
||||||
|
<th>创建者</th>
|
||||||
|
<th>创建时间</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for item in groups %}
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><a href="/group/{{ item.id }}/" target="_blank">{{ item.id }}</a></th>
|
||||||
|
<td><a href="/group/{{ item.id }}/" target="_blank">{{ item.name }}</a></td>
|
||||||
|
<td>
|
||||||
|
{% if item.join_group_setting %}
|
||||||
|
需要申请
|
||||||
|
{% else %}
|
||||||
|
无需申请
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>{{ item.admin }}</td>
|
||||||
|
<td>{{ item.create_time }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<nav>
|
||||||
|
<ul class="pager">
|
||||||
|
{% if previous_page %}
|
||||||
|
<li class="previous"><a
|
||||||
|
href="/groups/{{ previous_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}">
|
||||||
|
<span aria-hidden="true">←</span> 上一页</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if next_page %}
|
||||||
|
<li class="next">
|
||||||
|
<a href="/groups/{{ next_page }}/{% if keyword %}?keyword={{ keyword }}{% endif %}">
|
||||||
|
下一页 <span aria-hidden="true">→</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3 col-lg-3">
|
||||||
|
{% include "oj/announcement/_announcement_panel.html" %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="/static/css/fullpage/jquery.fullPage.css">
|
<link rel="stylesheet" type="text/css" href="/static/css/fullpage/jquery.fullPage.css">
|
||||||
<style>
|
<style>
|
||||||
html, textarea, input, option, select, button {
|
html, textarea, input, option, select, button {
|
||||||
font: 1em "Helvetica Neue", Helvetica, "Lantinghei SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "STHeiti", "WenQuanYi Micro Hei", SimSun, sans-serif;
|
font: 1em "Helvetica Neue", Helvetica, "Lantinghei SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑",
|
||||||
|
"STHeiti", "WenQuanYi Micro Hei", SimSun, sans-serif;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,6 +33,12 @@
|
|||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#nav-left{
|
||||||
|
display: inline;
|
||||||
|
position:relative;
|
||||||
|
float: right;
|
||||||
|
margin-right: 28px;
|
||||||
|
}
|
||||||
.section {
|
.section {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@@ -84,13 +91,34 @@
|
|||||||
loopBottom: true
|
loopBottom: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<span id="name">qduoj</span>
|
<span id="name">qduoj</span>
|
||||||
<a href="/problems/">题目</a> <a href="/contests/">比赛</a> <a href="#">小组</a>
|
<a href="/problems/">题目</a>
|
||||||
|
<a href="/submissions/">提交</a>
|
||||||
|
<a href="/contests/">比赛</a>
|
||||||
|
<a href="/groups/">小组</a>
|
||||||
|
<a href="/about/">关于</a>
|
||||||
|
<div id="nav-left">
|
||||||
|
{% if request.user.is_authenticated %}
|
||||||
|
<a href="#">{{ request.user.username }}</a>
|
||||||
|
<a href="/logout/">退出</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="/login/">
|
||||||
|
登录
|
||||||
|
</a>
|
||||||
|
<a href="/register/">
|
||||||
|
注册
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="fullpage">
|
<div id="fullpage">
|
||||||
|
|||||||
@@ -17,17 +17,19 @@
|
|||||||
<tr class="" success>
|
<tr class="" success>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th>提交时间</th>
|
<th>提交时间</th>
|
||||||
<th>结果</th>
|
|
||||||
<th>运行时间</th>
|
|
||||||
<th>语言</th>
|
<th>语言</th>
|
||||||
|
<th>运行时间</th>
|
||||||
|
<th>结果</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for item in submissions %}
|
{% for item in submissions %}
|
||||||
<tr class="{{ item.result|translate_result_class }}">
|
<tr>
|
||||||
<th scope="row"><a href="/submission/{{ item.id }}/">{{ forloop.counter }}</a></th>
|
<th scope="row"><a href="/submission/{{ item.id }}/">{{ forloop.counter }}</a></th>
|
||||||
<td>{{ item.create_time }}</td>
|
<td>{{ item.create_time }}</td>
|
||||||
<td>{{ item.result|translate_result }}</td>
|
<td>
|
||||||
|
{{ item.language|translate_language }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if item.accepted_answer_time %}
|
{% if item.accepted_answer_time %}
|
||||||
{{ item.accepted_answer_time }}ms
|
{{ item.accepted_answer_time }}ms
|
||||||
@@ -35,8 +37,8 @@
|
|||||||
--
|
--
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="alert-{{ item.result|translate_result_class }}">
|
||||||
{{ item.language|translate_language }}
|
<strong>{{ item.result|translate_result }}</strong>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -5,13 +5,30 @@
|
|||||||
{% load submission %}
|
{% load submission %}
|
||||||
<div class="container main">
|
<div class="container main">
|
||||||
<div class="col-md-9 col-lg-9">
|
<div class="col-md-9 col-lg-9">
|
||||||
<table class="table table-bordered">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th>提交时间</th>
|
<th>提交时间</th>
|
||||||
<th><div class="dropdown">
|
<th>
|
||||||
<a href="#" class="dropdown-toggle" id="resultFilter" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
<div class="dropdown">
|
||||||
|
<a href="#" class="dropdown-toggle" id="languageFilter" data-toggle="dropdown"
|
||||||
|
aria-haspopup="true" aria-expanded="true">
|
||||||
|
语言<span class="caret"></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu" aria-labelledby="languageFilter">
|
||||||
|
<li><a href="/submissions/?language=1">C</a></li>
|
||||||
|
<li><a href="/submissions/?language=2">C++</a></li>
|
||||||
|
<li><a href="/submissions/?language=3">Java</a></li>
|
||||||
|
<li><a href="/submissions/">取消筛选</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</th>
|
||||||
|
<th>运行时间</th>
|
||||||
|
<th>
|
||||||
|
<div class="dropdown">
|
||||||
|
<a href="#" class="dropdown-toggle" id="resultFilter" data-toggle="dropdown"
|
||||||
|
aria-haspopup="true" aria-expanded="true">
|
||||||
结果<span class="caret"></span>
|
结果<span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu" aria-labelledby="resultFilter">
|
<ul class="dropdown-menu" aria-labelledby="resultFilter">
|
||||||
@@ -23,29 +40,20 @@
|
|||||||
<li><a href="/submissions/?result=4">Compile Error</a></li>
|
<li><a href="/submissions/?result=4">Compile Error</a></li>
|
||||||
<li><a href="/submissions/?result=5">Format Error</a></li>
|
<li><a href="/submissions/?result=5">Format Error</a></li>
|
||||||
<li><a href="/submissions/">取消筛选</a></li>
|
<li><a href="/submissions/">取消筛选</a></li>
|
||||||
</ul></div>
|
</ul>
|
||||||
</th>
|
</div>
|
||||||
<th>运行时间</th>
|
|
||||||
<th><div class="dropdown">
|
|
||||||
<a href="#" class="dropdown-toggle" id="languageFilter" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
||||||
语言<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu" aria-labelledby="languageFilter">
|
|
||||||
<li><a href="/submissions/?language=1">C</a></li>
|
|
||||||
<li><a href="/submissions/?language=2">C++</a></li>
|
|
||||||
<li><a href="/submissions/?language=3">Java</a></li>
|
|
||||||
<li><a href="/submissions/">取消筛选</a></li>
|
|
||||||
</ul></div>
|
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for item in submissions %}
|
{% for item in submissions %}
|
||||||
<tr class="{{ item.result|translate_result_class }}">
|
<tr>
|
||||||
<th scope="row"><a href="/my_submission/{{ item.id }}/" id="id_{{ forloop.counter }}">
|
<th scope="row"><a href="/my_submission/{{ item.id }}/" id="id_{{ forloop.counter }}">
|
||||||
{{ forloop.counter |add:start_id }}</a></th>
|
{{ forloop.counter |add:start_id }}</a></th>
|
||||||
<td>{{ item.create_time }}</td>
|
<td>{{ item.create_time }}</td>
|
||||||
<td>{{ item.result|translate_result }}</td>
|
<td>
|
||||||
|
{{ item.language|translate_language }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if item.accepted_answer_time %}
|
{% if item.accepted_answer_time %}
|
||||||
{{ item.accepted_answer_time }}ms
|
{{ item.accepted_answer_time }}ms
|
||||||
@@ -53,9 +61,10 @@
|
|||||||
--
|
--
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="alert-{{ item.result|translate_result_class }}">
|
||||||
{{ item.language|translate_language }}
|
<strong>{{ item.result|translate_result }}</strong>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
<li><a href="/problems/">题目</a></li>
|
<li><a href="/problems/">题目</a></li>
|
||||||
<li><a href="/submissions/">提交</a></li>
|
<li><a href="/submissions/">提交</a></li>
|
||||||
<li><a href="/contests/">比赛</a></li>
|
<li><a href="/contests/">比赛</a></li>
|
||||||
|
<li><a href="/groups/">小组</a></li>
|
||||||
<li><a href="/about/">关于</a></li>
|
<li><a href="/about/">关于</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
|
|||||||
Reference in New Issue
Block a user