Merge branch 'dev' into hohoTT-dev

This commit is contained in:
hohoTT
2015-08-18 16:33:08 +08:00
13 changed files with 281 additions and 51 deletions

View File

@@ -7,6 +7,7 @@
<th>创建时间</th>
<th>更新时间</th>
<th>创建者</th>
<td>可见范围</td>
<th>状态</th>
<th></th>
</tr>
@@ -16,6 +17,7 @@
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
<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>
<button class="btn-sm btn-info" ms-click="editAnnouncement(el)">编辑</button>
@@ -36,7 +38,7 @@
<div class="form-group">
<label>标题</label>
<input name="title" type="text" class="form-control" id="newTitle" placeholder="公告标题" value=""></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>
@@ -44,6 +46,25 @@
<div class="form-group">
<label>可见 <input ms-duplex-checked="announcementVisible" type="checkbox"/></label>
</div>
<div class="form-group">
<label>可见范围</label>
<div>
<span ms-if="showGlobalViewRadio">
<input type="radio" value="true" name="isGlobal" ms-duplex-boolean="isGlobal">全局可见
</span>
<span>
<input type="radio" value="false" name="isGlobal" ms-duplex-boolean="isGlobal">小组内可见
</span>
</div>
</div>
<div class="form-group col-md-12" ms-if="!isGlobal">
<!-- radio 的value 没有用 但是没有的话,表单验证会出错-->
<div ms-repeat="allGroups" class="col-md-4">
<input type="checkbox" value="group_id" ms-duplex-checked="el.isSelected">&nbsp;&nbsp;{{ el.name }}
</div>
</div>
<div class="form-group">
<button ms-click="submitChange()" class="btn btn-primary">提交</button>
&nbsp;&nbsp;
@@ -65,6 +86,25 @@
</textarea>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label>可见范围</label>
<div>
<span ms-if="showGlobalViewRadio">
<input type="radio" value="true" name="isGlobal" ms-duplex-boolean="isGlobal">全局可见
</span>
<span>
<input type="radio" value="false" name="isGlobal" ms-duplex-boolean="isGlobal">小组内可见
</span>
</div>
</div>
<div class="form-group col-md-12" ms-if="!isGlobal">
<!-- radio 的value 没有用 但是没有的话,表单验证会出错-->
<div ms-repeat="allGroups" class="col-md-4">
<input type="checkbox" value="group_id" ms-duplex-checked="el.isSelected">&nbsp;&nbsp;{{ el.name }}
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">提交</button>
</div>

View File

@@ -30,7 +30,7 @@
<th scope="row"><a href="/problem/{{ item.id }}/">{{ item.id }}</a></th>
<td><a href="/problem/{{ item.id }}/">{{ item.title }}</a></td>
<td>{{ item.difficulty }}</td>
<td>{{ item|accepted_radio }}</td>
<td>{{ item|accepted_radio }}%</td>
</tr>
{% endfor %}
</tbody>