|
楼主 |
发表于 2022-12-7 15:31:35
|
显示全部楼层
<!DOCTYPE html>
<html lang="en">
{% load static %}
{% load staticfiles %}
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Educational Administration System</title>
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" />
<link href="{% static 'css/styles.css' %}" rel="stylesheet" />
<script src="https://use.fontawesome.com/releases/v6.1.0/js/all.js" crossorigin="anonymous"></script>
</head>
<body class="sb-nav-fixed">
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
<!-- Navbar Brand-->
<a class="navbar-brand ps-3" href="#">教务管理系统</a>
<!-- Sidebar Toggle-->
<button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa-bars"></i></button>
<!-- Navbar Search-->
<form class="d-none d-md-inline-block form-inline ms-auto me-0 me-md-3 my-2 my-md-0">
<div class="input-group">
<input class="form-control" type="text" placeholder="搜索" aria-label="搜索" aria-describedby="btnNavbarSearch" />
<button class="btn btn-primary" id="btnNavbarSearch" type="button"><i class="fas fa-search"></i></button>
</div>
</form>
<!-- Navbar-->
<ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-user fa-fw"></i></a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#">设置</a></li>
<li><a class="dropdown-item" href="#">更换头像</a></li>
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="{% url 'logout' %}">退出</a></li>
</ul>
</li>
</ul>
</nav>
<div id="layoutSidenav">
{% block layout %}
<div id="layoutSidenav_nav">
<nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
<div class="sb-sidenav-menu">
<div class="nav">
<div class="sb-sidenav-menu-heading"></div>
<a class="nav-link" href="{% url 'optional' %}">
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
选课列表
</a>
<a class="nav-link" href="{% url 'course_choosed' 1 %}">
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
已选课程
</a>
<div class="sb-sidenav-menu-heading"></div>
<a class="nav-link" href="{% url 'chachengji' %}">
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
学期成绩
</a>
<a class="nav-link" href="{% url 'kebiaochaxun' %}">
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
课表
</a>
<div class="sb-sidenav-menu-heading"></div>
<a class="nav-link" href="{% url 'edit' %}">
<div class="sb-nav-link-icon"><i class="fas fa-chart-area"></i></div>
个人信息
</a>
</div>
</div>
<div class="sb-sidenav-footer">
<div class="small">登录用户:</div>
{{name}}
</div>
</nav>
</div>
{% endblock %}
<div id="layoutSidenav_content">
<main>
<div class="container-fluid px-4">
{% block title %}
<h1 class="mt-4">Dashboard</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item active">Dashboard</li>
</ol>
{% endblock %}
{% block main_body %}
<div class="card mb-4">
<div class="card-header">
<i class="fas fa-table me-1"></i>
选课课表
</div>
<div class="card-body">
<table id="datatablesSimple">
<thead>
<tr>
<th>课程编号</th>
<th>课程名</th>
<th>学分</th>
<th>教师</th>
<th>所属专业</th>
</tr>
</thead>
<tfoot>
<tr>
<th>课程编号</th>
<th>课程名</th>
<th>学分</th>
<th>教师</th>
<th>所属专业</th>
</tr>
</tfoot>
<tbody>
{% for course in course_list %}
<tr>
<td>{{course.cno}}</td>
<td>{{course.cname}}</td>
<td>{{course.ccredit}}</td>
<td>{{course.cteacher}}</td>
<td>{{course.cdeptno}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}
</div>
</main>
<footer class="py-4 bg-light mt-auto">
<div class="container-fluid px-4">
<div class="d-flex align-items-center justify-content-between small">
</div>
</div>
</footer>
</div>
</div>
<script type="text/javascript">
function searchForName() {
var input, filter, table, tr, td, i, j;
input = document.getElementById("dataTable-Input");
filter = input.value.toUpperCase();
table = document.getElementById("datatablesSimple");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
tr[i].style.display = "none";
for (j = 0; j < 7; j++) {
td = tr[i].getElementsByTagName("td")[j];
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1)
tr[i].style.display = "";
}
}
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="{% static 'js/scripts.js' %}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>
<script src="{% static 'assets/demo/chart-area-demo.js' %}"></script>
<script src="{% static 'assets/demo/chart-bar-demo.js' %}"></script>
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" crossorigin="anonymous"></script>
<script src="{% static 'js/datatables-simple-demo.js' %}"></script>
</body>
</html>
|
|