source:
src/main/webapp/pages/university-list.jsp
| Last change on this file was 1eb7a55, checked in by , 11 days ago | |
|---|---|
|
|
| File size: 2.1 KB | |
| Line | |
|---|---|
| 1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
| 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
| 3 | <html> |
| 4 | <head> |
| 5 | <title>List of Universities</title> |
| 6 | <link rel="stylesheet" |
| 7 | href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" |
| 8 | integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" |
| 9 | crossorigin="anonymous"> |
| 10 | </head> |
| 11 | <body> |
| 12 | <div class="container-fluid mt-4"> |
| 13 | <div class="container"> |
| 14 | <h3 class="text-center">List of Universities</h3> |
| 15 | <hr> |
| 16 | |
| 17 | <!-- Add New University Button --> |
| 18 | <div class="mb-3"> |
| 19 | <a href="${pageContext.request.contextPath}/university/new" class="btn btn-success">Add New University</a> |
| 20 | <a href="${pageContext.request.contextPath}/" class="btn btn-outline-secondary">Back to Home</a> |
| 21 | |
| 22 | </div> |
| 23 | |
| 24 | <!-- Table for Listing Universities --> |
| 25 | <table class="table table-bordered table-striped"> |
| 26 | <thead class="thead-dark"> |
| 27 | <tr> |
| 28 | <th>ID</th> |
| 29 | <th>Name</th> |
| 30 | <th>Location</th> |
| 31 | <th>Private</th> |
| 32 | <th>Actions</th> |
| 33 | </tr> |
| 34 | </thead> |
| 35 | <tbody> |
| 36 | <c:forEach var="university" items="${universities}"> |
| 37 | <tr> |
| 38 | <td><c:out value="${university.id}" /></td> |
| 39 | <td><c:out value="${university.name}" /></td> |
| 40 | <td><c:out value="${university.location}" /></td> |
| 41 | <td><c:out value="${university.isPrivate ? 'Yes' : 'No'}" /></td> |
| 42 | <td> |
| 43 | <a href="${pageContext.request.contextPath}/university/edit?id=${university.id}" class="btn btn-warning btn-sm">Edit</a> |
| 44 | <a href="${pageContext.request.contextPath}/university/delete?id=${university.id}" class="btn btn-danger btn-sm">Delete</a> |
| 45 | </td> |
| 46 | </tr> |
| 47 | </c:forEach> |
| 48 | </tbody> |
| 49 | </table> |
| 50 | </div> |
| 51 | </div> |
| 52 | </body> |
| 53 | </html> |
Note:
See TracBrowser
for help on using the repository browser.
