diff --git a/template/src/oj/announcement/_announcement_panel.html b/template/src/oj/announcement/_announcement_panel.html index f17a9ceb..d5936269 100644 --- a/template/src/oj/announcement/_announcement_panel.html +++ b/template/src/oj/announcement/_announcement_panel.html @@ -5,8 +5,13 @@ 公告
- {% for item in announcements %} -

{{ forloop.counter }}.  {{ item.title }}

- {% endfor %} + {% if announcements %} + {% for item in announcements %} +

{{ forloop.counter }}.  {{ item.title }} +

+ {% endfor %} + {% else %} +

暂无可显示的公告

+ {% endif %}
\ No newline at end of file diff --git a/template/src/oj/contest/contest_problems_list.html b/template/src/oj/contest/contest_problems_list.html index 2a863dd3..02895925 100644 --- a/template/src/oj/contest/contest_problems_list.html +++ b/template/src/oj/contest/contest_problems_list.html @@ -26,7 +26,7 @@ -
+
@@ -55,7 +55,7 @@ -
+
{% include "oj/announcement/_announcement_panel.html" %}
diff --git a/template/src/oj/contest/contest_rank.html b/template/src/oj/contest/contest_rank.html index 823b021b..7d17134c 100644 --- a/template/src/oj/contest/contest_rank.html +++ b/template/src/oj/contest/contest_rank.html @@ -20,6 +20,7 @@
+ {% if result %}
@@ -49,6 +50,9 @@ {% endfor %}
+ {% else %} +

还没有结果

+ {% endif %}
diff --git a/template/src/oj/problem/my_submissions_list.html b/template/src/oj/problem/my_submissions_list.html index fb07a4cc..03d7e8c1 100644 --- a/template/src/oj/problem/my_submissions_list.html +++ b/template/src/oj/problem/my_submissions_list.html @@ -11,6 +11,7 @@ 我的提交 {% include "oj/problem/_problem_header.html" %} + {% if submissions %} @@ -42,5 +43,8 @@
+ {% else %} +

你还没有提交该题目

+ {% endif %} {% endblock %} \ No newline at end of file diff --git a/template/src/oj/problem/problem_list.html b/template/src/oj/problem/problem_list.html index a26ae80b..247b07ff 100644 --- a/template/src/oj/problem/problem_list.html +++ b/template/src/oj/problem/problem_list.html @@ -3,7 +3,7 @@ {% load problem %}
-
+
@@ -54,7 +54,7 @@
-
+
{% include "oj/announcement/_announcement_panel.html" %}