From 83c496e03a0b6d9c66801e38858f6ccf3e619dc3 Mon Sep 17 00:00:00 2001 From: Menci Date: Sat, 17 Jun 2017 19:24:22 +0800 Subject: [PATCH] New UI for problem's uploader and publicizer --- views/problem.ejs | 91 +++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 47 deletions(-) diff --git a/views/problem.ejs b/views/problem.ejs index b758701..a49ef57 100644 --- a/views/problem.ejs +++ b/views/problem.ejs @@ -28,29 +28,50 @@ if (contest) { <% } %> -
- 内存限制: <%= problem.memory_limit %> MiB - 时间限制: <%= problem.time_limit %> ms -
-
- <% if (problem.file_io) { %> - 输入文件: <%= problem.file_io_input_name %> - 输出文件: <%= problem.file_io_output_name %> - <% } else { %> - 标准输入输出 - <% } %> -
+ <% if (contest) { %> +
+ 内存限制:<%= problem.memory_limit %> MiB + 时间限制:<%= problem.time_limit %> ms +
+
+ <% if (problem.file_io) { %> + 输入文件:<%= problem.file_io_input_name %> + 输出文件:<%= problem.file_io_output_name %> + <% } else { %> + 标准输入输出 + <% } %> +
+ <% } else { %> +
+ 内存限制:<%= problem.memory_limit %> MiB + 时间限制:<%= problem.time_limit %> ms + <% if (problem.file_io) { %> + 输入文件: <%= problem.file_io_input_name %> + 输出文件: <%= problem.file_io_output_name %> + <% } else { %> + 标准输入输出 + <% } %> +
+
+ 上传者: + <% if (problem.is_anonymous && !problem.allowedManage) { %> + 匿名 + <% } else { %> + <%= problem.user.username %> + <% } %> + + <% if (problem.allowedManage) { %> + 公开者: + <% if (problem.publicizer) { %> + <%= problem.publicizer.username %> + <% } else { %> + 未知 + <% } %> + + <% } %> +
+ <% } %> -
@@ -84,30 +105,6 @@ if (contest) { <% } %> <% } %>
-
-
- <% if (problem.is_anonymous && !problem.allowedManage) { %> - - 匿名用户 - <% } else { %> - - <%= problem.user.username %> - <% } %> -
上传
-
- <% if (problem.is_public) { %> -
- <% if (problem.publicizer) { %> - - <%= problem.publicizer.username %> - <% } else { %> - - LibreOJ 管理员 - <% } %> -
公开
-
- <% } %> -
<% } %>
@@ -215,7 +212,7 @@ if (contest) {
- + <% } %>