|
|
|
@ -45,11 +45,16 @@ if (contest) {
|
|
|
|
|
<div class="row"> |
|
|
|
|
<div class="column"> |
|
|
|
|
<div class="ui buttons"> |
|
|
|
|
<a class="small ui primary button" href="#submit_code">提交</a> |
|
|
|
|
<% if (contest) { %> |
|
|
|
|
<% if (typeof contest !== 'undefined' && contest) { %> |
|
|
|
|
<% if (!contest.ended) { %> |
|
|
|
|
<a class="small ui primary button" href="#submit_code">提交</a> |
|
|
|
|
<% } else { %> |
|
|
|
|
<a class="small ui primary button" href="<%= syzoj.utils.makeUrl(['problem', problem.id]) %>">转到题库</a> |
|
|
|
|
<% } %> |
|
|
|
|
<a class="small ui positive button" href="<%= syzoj.utils.makeUrl(['contest', contest.id, 'submissions'], { problem_id: pid }) %>">提交记录</a> |
|
|
|
|
<a href="<%= syzoj.utils.makeUrl(['contest', contest.id]) %>" class="ui orange button">返回比赛</a> |
|
|
|
|
<% } else { %> |
|
|
|
|
<a class="small ui primary button" href="#submit_code">提交</a> |
|
|
|
|
<a class="small ui positive button" href="<%= syzoj.utils.makeUrl(['submissions'], { problem_id: problem.id }) %>">提交记录</a> |
|
|
|
|
<a class="small ui orange button" href="<%= syzoj.utils.makeUrl(['problem', problem.id, 'statistics', 'fastest']) %>">统计</a> |
|
|
|
|
<a class="small ui yellow button" href="<%= syzoj.utils.makeUrl(['problem', problem.id, 'download']) %>">下载测试数据</a> |
|
|
|
@ -112,6 +117,13 @@ if (contest) {
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<% } %> |
|
|
|
|
<% let noSubmit = false; %> |
|
|
|
|
<% |
|
|
|
|
if (typeof contest !== 'undefined' && contest && contest.ended) { |
|
|
|
|
noSubmit = true; |
|
|
|
|
} |
|
|
|
|
%> |
|
|
|
|
<% if (!noSubmit) { %> |
|
|
|
|
<div class="row"> |
|
|
|
|
<div class="column"> |
|
|
|
|
<% |
|
|
|
@ -147,6 +159,7 @@ if (contest) {
|
|
|
|
|
</form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<% } %> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<script src="https://cdn.bootcss.com/ace/1.2.6/ace.js"></script> |
|
|
|
|