source: src/main/webapp/pages/subject-list.jsp@ 1eb7a55

Last change on this file since 1eb7a55 was 1eb7a55, checked in by Elena Markovska <elena.elenamarkovska@…>, 11 days ago

Initial commit - Scholaris project code

  • Property mode set to 100644
File size: 2.0 KB
Line 
1<%@ page contentType="text/html;charset=UTF-8" language="java" %>
2<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
3
4<!DOCTYPE html>
5<html lang="en">
6<head>
7 <title>Subject List</title>
8 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
9</head>
10<body>
11<div class="container mt-5">
12 <h2 class="text-center mb-4">Subjects</h2>
13
14 <div class="d-flex align-items-center gap-2 mb-4">
15 <a href="${pageContext.request.contextPath}/subject/new" class="btn btn-success mr-2">Add New Subject</a>
16 <a href="${pageContext.request.contextPath}/" class="btn btn-outline-secondary">Back to Home</a>
17 </div>
18
19 <table class="table table-bordered table-striped">
20 <thead class="thead-dark">
21 <tr>
22 <th>ID</th>
23 <th>Name</th>
24 <th>Semester</th>
25 <th>Credits</th>
26 <th>Actions</th>
27 </tr>
28 </thead>
29 <tbody class="align-middle">
30 <c:forEach var="subject" items="${listSubject}">
31 <tr style="vertical-align: middle;">
32 <td class="align-middle">${subject.id}</td>
33 <td class="align-middle">${subject.name}</td>
34 <td class="align-middle">${subject.semester}</td>
35 <td class="align-middle">${subject.credits}</td>
36 <td class="align-middle">
37 <a href="${pageContext.request.contextPath}/subject/edit?id=${subject.id}" class="btn btn-primary btn-sm">Edit</a>
38 <a href="${pageContext.request.contextPath}/subject/delete?id=${subject.id}"
39 onclick="return confirm('Are you sure you want to delete this subject?');"
40 class="btn btn-danger btn-sm">Delete</a>
41 </td>
42 </tr>
43 </c:forEach>
44 <c:if test="${empty listSubject}">
45 <tr>
46 <td colspan="5" class="text-center">No subjects found.</td>
47 </tr>
48 </c:if>
49 </tbody>
50 </table>
51</div>
52</body>
53</html>
Note: See TracBrowser for help on using the repository browser.