更新
This commit is contained in:
60
Python-100-Days/Day41-55/oa/templates/emp.html
Normal file
60
Python-100-Days/Day41-55/oa/templates/emp.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
{% load static %}
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>员工</title>
|
||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-12 column">
|
||||
<h3>{{ dept_name }}员工信息</h3>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-8 column">
|
||||
{% if emp_list %}
|
||||
<table id="dept" class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>编号</th>
|
||||
<th>姓名</th>
|
||||
<th>职位</th>
|
||||
<th>月薪</th>
|
||||
<th>部门名称</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for emp in emp_list %}
|
||||
<tr>
|
||||
<td>{{ emp.no }}</td>
|
||||
<td>{{ emp.name }}</td>
|
||||
<td>{{ emp.job }}</td>
|
||||
<td>{{ emp.sal }}</td>
|
||||
<td>{{ dept_name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<h2>此部门暂时没有员工!</h2>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-4 column">
|
||||
</div>
|
||||
</div>
|
||||
<a href="{% url 'depts' %}">返回部门列表</a>
|
||||
</div>
|
||||
<script src="{% static 'js/jquery.min.js' %}"></script>
|
||||
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#dept tbody tr:even').addClass('info');
|
||||
$('#dept tbody tr:odd').addClass('warning');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user