63 lines
2.2 KiB
HTML
63 lines
2.2 KiB
HTML
|
{% extends 'layout.html' %}
|
||
|
{% block content %}
|
||
|
|
||
|
<div class="container">
|
||
|
<div class="panel panel-default">
|
||
|
<!-- Default panel contents -->
|
||
|
<div class="panel-heading">
|
||
|
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
|
||
|
部门批量导入
|
||
|
</div>
|
||
|
<div class="panel-body">
|
||
|
<form enctype="multipart/form-data" method="post" action="/depart/multi/">
|
||
|
{% csrf_token %}
|
||
|
<div class="form-group">
|
||
|
<label for="exampleInputFile">请选择Excel文件</label>
|
||
|
<input type="file" name="exc">
|
||
|
</div>
|
||
|
<button type="submit" class="btn btn-default">上传</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div style="margin-bottom:10px">
|
||
|
<a class="btn btn-success" href="/depart/add/">
|
||
|
<span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
|
||
|
新建部门
|
||
|
</a>
|
||
|
</div>
|
||
|
|
||
|
<div class="panel panel-default">
|
||
|
<!-- Default panel contents -->
|
||
|
<div class="panel-heading">
|
||
|
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
|
||
|
部门列表
|
||
|
</div>
|
||
|
|
||
|
<!-- Table -->
|
||
|
<table class="table table-bordered">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>ID</th>
|
||
|
<th>部门名称</th>
|
||
|
<th>操作</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{% for item in queryset %}
|
||
|
<tr>
|
||
|
<th>{{ item.id }}</th>
|
||
|
<td>{{ item.title }}</td>
|
||
|
<td>
|
||
|
<a class="btn btn-primary btn-xs" href="/depart/{{ item.id }}/edit/">修改</a>
|
||
|
<a class="btn btn-danger btn-xs" href="/depart/delete/?nid={{ item.id }}">删除</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
{% endblock %}
|