Merge branch 'dev' into hohoTT-dev
Conflicts: contest_submission/tests.py
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
<th>创建时间</th>
|
||||
<th>更新时间</th>
|
||||
<th>创建者</th>
|
||||
<td>可见范围</td>
|
||||
<th>状态</th>
|
||||
<th>类型</th>
|
||||
<th>可见</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr ms-repeat="announcementList">
|
||||
@@ -18,7 +18,7 @@
|
||||
<td>{{ el.last_update_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
||||
<td>{{ el.created_by.username }}</td>
|
||||
<td ms-text="el.is_global?'全局可见':'组内可见'"></td>
|
||||
<td>{{ getState(el)}}</td>
|
||||
<td ms-text="el.visible?'可见':'不可见'"></td>
|
||||
<td>
|
||||
<button class="btn-sm btn-info" ms-click="editAnnouncement(el)">编辑</button>
|
||||
</td>
|
||||
@@ -38,7 +38,8 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label>标题</label>
|
||||
<input name="title" type="text" class="form-control" id="newTitle" placeholder="公告标题" value="" ms-duplex="newTitle"></div>
|
||||
<input name="title" type="text" class="form-control" id="newTitle" placeholder="公告标题" value=""
|
||||
ms-duplex="newTitle"></div>
|
||||
<div class="form-group">
|
||||
<label>内容</label>
|
||||
<textarea id="edit-announcement-editor"></textarea>
|
||||
@@ -66,7 +67,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button ms-click="submitChange()" class="btn btn-primary">提交</button>
|
||||
<button ms-click="submitChange()" class="btn btn-success">保存修改</button>
|
||||
|
||||
<button ms-click="cancelEdit()" class="btn btn-danger">取消</button>
|
||||
</div>
|
||||
@@ -78,12 +79,14 @@
|
||||
<label>标题</label>
|
||||
<input name="title" type="text" class="form-control" id="title" placeholder="公告标题"
|
||||
data-error="请填写公告标题(标题不得超过50字)" maxlength="50" required>
|
||||
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>内容</label>
|
||||
<textarea id="create-announcement-editor" placeholder="公告内容" maxlength="10000" required>
|
||||
</textarea>
|
||||
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -91,10 +94,16 @@
|
||||
|
||||
<div>
|
||||
<span ms-if="showGlobalViewRadio">
|
||||
<input type="radio" value="true" name="isGlobal" ms-duplex-boolean="isGlobal">全局可见
|
||||
<label>
|
||||
<small><input type="radio" value="true" name="isGlobal" ms-duplex-boolean="isGlobal">全局可见
|
||||
</small>
|
||||
</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="radio" value="false" name="isGlobal" ms-duplex-boolean="isGlobal">小组内可见
|
||||
<label>
|
||||
<small><input type="radio" value="false" name="isGlobal" ms-duplex-boolean="isGlobal">小组内可见
|
||||
</small>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -106,7 +115,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
<button type="submit" class="btn btn-success">发布公告</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<textarea id="editor" placeholder="这里输入内容" autofocus ms-duplex="description"></textarea>
|
||||
|
||||
<div class="help-block with-errors"></div>
|
||||
<small ms-visible="description==''" style="color:red">请填写比赛描述</small>
|
||||
<p class="error-info" ms-visible="description==''">请填写比赛描述</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>比赛</th>
|
||||
<th>公开排名</th>
|
||||
<th>可见</th>
|
||||
<th>排名</th>
|
||||
<th>创建时间</th>
|
||||
<th>创建者</th>
|
||||
<th>可见</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr ms-repeat="contestList">
|
||||
<td>{{ el.id }}</td>
|
||||
<td>{{ el.title }}</td>
|
||||
<td>{{ getYesOrNo(el.show_rank) }}</td>
|
||||
<td>{{ getYesOrNo(el.visible) }}</td>
|
||||
<td ms-text="el.show_rank?'公开':'不公开'"></td>
|
||||
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
||||
<td>{{ el.created_by.username }}</td>
|
||||
<td ms-text="el.visible?'可见':'不可见'"></td>
|
||||
<td>
|
||||
<a class="btn btn-info" href="javascript:void(0)" ms-click="showEditContestArea($index+1)">编辑</a>
|
||||
<a class="btn btn-primary" href="javascript:void(0)" ms-click="showEditProblemArea($index+1)">编辑问题</a>
|
||||
<a class="btn btn-info btn-sm" href="javascript:void(0)" ms-click="showEditContestArea($index+1)">编辑</a>
|
||||
<a class="btn btn-info btn-sm" href="javascript:void(0)" ms-click="showEditProblemArea($index+1)">题目</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -63,7 +63,7 @@
|
||||
<textarea id="editor" placeholder="这里输入内容" autofocus ms-duplex="editDescription"></textarea>
|
||||
|
||||
<div class="help-block with-errors"></div>
|
||||
<small ms-visible="editDescription==''" style="color:red">请填写比赛描述</small>
|
||||
<p class="error-info" ms-visible="editDescription==''" >请填写比赛描述</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -152,13 +152,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-primary" type="submit">保存修改</button>
|
||||
<button class="btn btn-success" type="submit">保存修改</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-12" ms-visible="editingProblemContestIndex">
|
||||
<label>题目列表</label>
|
||||
<a href="javascript:void(0)" class="btn btn-success btn-sm" ms-click="add_problem()">添加</a>
|
||||
<a href="javascript:void(0)" class="btn btn-primary btn-sm" ms-click="addProblem()">添加题目</a>
|
||||
<a href="javascript:void(0)" class="btn btn-info btn-sm" ms-click="showSubmissionPage()">查看提交</a>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>编号</th>
|
||||
@@ -176,7 +177,9 @@
|
||||
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss") }}</td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="btn-sm btn-info"
|
||||
ms-click="showProblemEditor(el)">编辑</a>
|
||||
ms-click="showProblemEditPage(el)">编辑</a>
|
||||
<a href="javascript:void(0)" class="btn-sm btn-info"
|
||||
ms-click="showSubmissionPage(el)">提交</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="form-group col-md-12">
|
||||
<label>题目描述</label>
|
||||
<textarea id="problemDescription" placeholder="这里输入内容(此内容不能为空)" ms-duplex="description"></textarea>
|
||||
<small ms-visible="description==''" style="color:red">请填写题目描述</small>
|
||||
<p class="error-info" ms-visible="description==''">请填写题目描述</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<textarea id="hint" placeholder="这里输入内容" ms-duplex="hint"></textarea>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<input type="submit" class="btn btn-success btn-lg" value="发布题目" id="submitBtn">
|
||||
<button type="submit" class="btn btn-success btn-lg">发布题目</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
37
template/src/admin/contest/submission_list.html
Normal file
37
template/src/admin/contest/submission_list.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<div ms-controller="contestSubmissionList" class="col-md-9">
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li class="previous" ms-click="goBack()"><a href="javascript:void(0)"><span
|
||||
aria-hidden="true">←</span> 返回</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h1>提交列表</h1>
|
||||
<a href="javascript:void(0)" class="btn btn-sm btn-primary" ms-click="getPage(1)">
|
||||
<span class="glyphicon glyphicon-refresh"></span> 刷新
|
||||
</a>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>创建时间</th>
|
||||
<th>作者</th>
|
||||
<td>结果</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr ms-repeat="submissionList">
|
||||
<td>{{ el.id }}</td>
|
||||
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
||||
<td>{{ el.user }}</td>
|
||||
<td>{{ results[el.result] }}</td>
|
||||
<td>
|
||||
<a class="btn btn-info" ms-attr-href="'/submission/' + el.id + '/'" target="_blank">详情</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="text-right">
|
||||
页数:{{ page }}/{{ totalPage }}
|
||||
<button ms-attr-class="getBtnClass('pre')" ms-click="getPrevious">上一页</button>
|
||||
<button ms-attr-class="getBtnClass('next')" ms-click="getNext">下一页</button>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/js/app/admin/contest/submissionList.js"></script>
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="form-group col-md-12">
|
||||
<label>题目描述</label>
|
||||
<textarea id="problemDescription" placeholder="这里输入内容(此内容不能为空)" ms-duplex="description"></textarea>
|
||||
<small ms-visible="description==''" style="color:red">请填写题目描述</small>
|
||||
<p class="error-info" ms-visible="description==''">请填写题目描述</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="form-group col-md-12">
|
||||
<label>题目描述</label>
|
||||
<textarea id="problemDescription" placeholder="这里输入内容(此内容不能为空)" ms-duplex="description"></textarea>
|
||||
<small ms-visible="description==''" style="color:red">请填写题目描述</small>
|
||||
<p class="error-info" ms-visible="description==''">请填写题目描述</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
<th>题目</th>
|
||||
<th>创建时间</th>
|
||||
<th>作者</th>
|
||||
<td>通过次数/提交总数</td>
|
||||
<th>可见</th>
|
||||
<th>通过次数/提交总数</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr ms-repeat="problemList">
|
||||
@@ -25,6 +26,7 @@
|
||||
<td>{{ el.title }}</td>
|
||||
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
||||
<td>{{ el.created_by.username }}</td>
|
||||
<td ms-text="el.visible?'可见':'不可见'">{{ getYesOrNo(el.visible) }}</td>
|
||||
<td>{{ el.total_accepted_number }}/{{ el.total_submit_number }}</td>
|
||||
<td>
|
||||
<button class="btn-sm btn-info" ms-click="showEditProblemPage(el.id)">编辑</button>
|
||||
@@ -32,6 +34,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="form-group">
|
||||
<label>仅显示可见 <input ms-duplex-checked="showVisibleOnly" type="checkbox"/></label>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
页数:{{ page }}/{{ totalPage }}
|
||||
<button ms-attr-class="getBtnClass('pre')" ms-click="getPrevious">上一页</button>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<td>{{ el.user }}</td>
|
||||
<td>{{ results[el.result] }}</td>
|
||||
<td>
|
||||
<a class="btn btn-info" ms-attr-href="'/my_submission/' + el.id + '/'" target="_blank">详情</a>
|
||||
<a class="btn btn-info" ms-attr-href="'/submission/' + el.id + '/'" target="_blank">详情</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user