Browse Source

Add back to problem button on upload testdata page

pull/6/head
Menci 8 years ago
parent
commit
1f11d6a63b
  1. 49
      views/upload_testdata.ejs

49
views/upload_testdata.ejs

@ -1,17 +1,17 @@
<% this.title = '上传测试数据'; %> <% this.title = '上传测试数据'; %>
<% include header %> <% include header %>
<div class="padding"> <div class="padding">
<div class="ui grid"> <div class="ui grid">
<div class="row"> <div class="row">
<div class="seven wide column"> <div class="seven wide column">
<% if (problem.testdata) { %> <% if (problem.testdata) { %>
<p>数据包:<%= problem.testdata.filename %></p> <p>数据包:<%= problem.testdata.filename %></p>
<% <%
try { try {
let list = syzoj.utils.parseTestData(problem.testdata.getPath()); let list = syzoj.utils.parseTestData(problem.testdata.getPath());
%> %>
<table class="ui very basic table"> <table class="ui very basic table">
<thead> <thead>
<tr> <tr>
<th>输入文件</th> <th>输入文件</th>
<th>输出文件</th> <th>输出文件</th>
@ -25,26 +25,26 @@
</tr> </tr>
<% } %> <% } %>
</tbody> </tbody>
</table> </table>
<% } catch (e) { %> <% } catch (e) { %>
<h3>数据包错误:<%= e %></h3> <h3>数据包错误:<%= e %></h3>
<% } %> <% } %>
<% } else { %> <% } else { %>
<h3>数据未上传</h3> <h3>数据未上传</h3>
<% } %> <% } %>
</div> </div>
<div class="nine wide column"> <div class="nine wide column">
<form class="ui form" action="<%= syzoj.utils.makeUrl(['problem', problem.id, 'upload']) %>" method="post" enctype="multipart/form-data"> <form class="ui form" action="<%= syzoj.utils.makeUrl(['problem', problem.id, 'upload']) %>" method="post" enctype="multipart/form-data">
<div class="two fields"> <div class="two fields">
<div class="field"> <div class="field">
<label for="doc-ds-ipt-1">时间限制(单位: ms)</label> <label for="doc-ds-ipt-1">时间限制(单位: ms)</label>
<input type="number" name="time_limit" value="<%= problem.time_limit %>"> <input type="number" name="time_limit" value="<%= problem.time_limit %>">
</div> </div>
<div class="field"> <div class="field">
<label for="doc-ds-ipt-1">内存限制(单位: MiB)</label> <label for="doc-ds-ipt-1">内存限制(单位: MiB)</label>
<input type="number" name="memory_limit" value="<%= problem.memory_limit %>"> <input type="number" name="memory_limit" value="<%= problem.memory_limit %>">
</div> </div>
</div> </div>
<% if (!problem.file_io) { %> <% if (!problem.file_io) { %>
<div class="inline fields"> <div class="inline fields">
<label>IO 方式</label> <label>IO 方式</label>
@ -99,12 +99,13 @@
</div> </div>
<% } %> <% } %>
<div class="field"> <div class="field">
<label for="testdata">测试数据</label> <label for="testdata">测试数据</label>
<input type="file" id="testdata" name="testdata"> <input type="file" id="testdata" name="testdata">
</div> </div>
<button type="submit" class="ui button">提交</button> <button type="submit" class="ui button">提交</button>
<a href="<%= syzoj.utils.makeUrl(['problem', problem.id]) %>" class="ui blue button">返回题目</a>
</form> </form>
</div> </div>
</div> </div>
<div> <div>
<script> <script>

Loading…
Cancel
Save