dept.html 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
<!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>部门信息</h3>
            <hr>
		</div>
	</div>
    <div class="row clearfix">
        <div class="col-md-8 column">
            <table id="dept" class="table table-striped table-hover">
                <thead>
                <tr>
                    <th>部门编号</th>
                    <th>部门名称</th>
                    <th>部门所在地</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                    {% for dept in dept_list %}
                    <tr>
                        <td>{{ dept.no }}</td>
                        <td>
                            <a href="/hrs/emps?dno={{ dept.no }}">{{ dept.name }}</a>
                        </td>
                        <td>{{ dept.location }}</td>
                        <td>
                            <a href="/hrs/deldept?dno={{ dept.no }}" class="btn btn-xs btn-warning">删除</a>
                        </td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
        <div class="col-md-4 column">
        </div>
    </div>
</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>