Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
Complete User Management UI jsp
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldStarPro committed Dec 7, 2023
1 parent a87b0a4 commit 6ab697e
Showing 1 changed file with 45 additions and 38 deletions.
83 changes: 45 additions & 38 deletions src/main/webapp/view/admin/list_user.jsp
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@

<%@ page contentType="text/html" pageEncoding="UTF-8" %>
<%@page import="io.hardingadonis.miu.services.Singleton"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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="" />
<link rel="icon" href="<%=request.getContextPath()%>/assets/images/favicon/favicon.png" type="image/ico"/>
<title>User Management</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/style.min.css" rel="stylesheet" />
<link href="<%=request.getContextPath()%>/assets/css/admin/styles.css" rel="stylesheet" />
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></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="index.html">Welcome Admin</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-->
<ul class="navbar-nav d-none d-md-inline-block form-inline ms-auto me-0 me-md-3 my-2 my-md-0">
<li class="nav-item dropdown">
Expand Down Expand Up @@ -91,18 +96,21 @@
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Trần Huy Hoàng</td>
<td>2003</td>
<td>Male</td>
<td>[email protected]</td>
<td>Quy Nhon</td>
<td>Active</td>
<td>
<a href="#" class="btn btn-danger btn-tiny" title="Delete"><i class="fa fa-trash"></i></a>
</td>
</tr>
<c:forEach var="c" items="${Singleton.userDAO.getAll()}">
<tr>
<td>${c.ID}</td>
<td>${c.fullName}</td>
<td>${c.birthYear}</td>
<td>${c.gender}</td>
<td>${c.email}</td>
<td>${c.address}</td>
<td>${c.status}</td>
<td>
<a href="#" class="btn btn-danger btn-tiny" title="Delete">
<i class="fa fa-trash"></i></a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
Expand All @@ -125,29 +133,28 @@
</div>


<!-- Delete User Modal -->
<div class="modal fade" id="deleteUserModal" tabindex="-1" role="dialog" aria-labelledby="deleteUserModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteUserModalLabel">Delete User</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="closeDeleteModal()">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete this user?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" onclick="deleteUser()">Delete</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="closeDeleteModal()">Cancel</button>
<!-- Delete User Modal -->
<div class="modal fade" id="deleteUserModal" tabindex="-1" role="dialog" aria-labelledby="deleteUserModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteUserModalLabel">Delete User</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="closeDeleteModal()">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete this user?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" onclick="deleteUser()">Delete</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="closeDeleteModal()">Cancel</button>
</div>
</div>
</div>
</div>
</div>



</div>


<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="<%=request.getContextPath()%>/assets/js/admin/scripts.js"></script>
<script src="<%=request.getContextPath()%>/assets/js/admin/delete-user-modal.js"></script>
Expand All @@ -157,7 +164,7 @@
<script src="<%=request.getContextPath()%>/assets/js/admin/demo/chart-pie-demo.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/simple-datatables.min.js"></script>
<script src="<%=request.getContextPath()%>/assets/js/admin/demo/datatables-simple-demo.js"></script>

</body>
</html>

Expand Down

0 comments on commit 6ab697e

Please sign in to comment.