|
Last change
on this file since 5ea00d7 was 5ea00d7, checked in by Malek Alavi <malekalavi7@…>, 3 days ago |
|
Initial project upload
|
-
Property mode
set to
100644
|
|
File size:
2.1 KB
|
| Line | |
|---|
| 1 | <!DOCTYPE html>
|
|---|
| 2 | <html xmlns:th="http://www.thymeleaf.org">
|
|---|
| 3 | <head>
|
|---|
| 4 | <meta charset="UTF-8">
|
|---|
| 5 | <title>Courses</title>
|
|---|
| 6 | <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|---|
| 7 | </head>
|
|---|
| 8 | <body>
|
|---|
| 9 | <div class="container mt-5">
|
|---|
| 10 | <!-- Back to Home link -->
|
|---|
| 11 | <a th:href="@{/}" class="btn btn-secondary mb-3">Back to Home</a>
|
|---|
| 12 |
|
|---|
| 13 | <h1 class="mb-4">Available Courses</h1>
|
|---|
| 14 | <div class="row">
|
|---|
| 15 | <div class="col-md-4 mb-3" th:each="course : ${availableCourses}">
|
|---|
| 16 | <div class="card h-100 shadow-sm">
|
|---|
| 17 | <div class="card-body">
|
|---|
| 18 | <h5 class="card-title" th:text="${course.name}">Course Name</h5>
|
|---|
| 19 | <p class="card-text">Price: <span th:text="${course.price}">100</span> €</p>
|
|---|
| 20 | <p class="card-text">
|
|---|
| 21 | Categories:
|
|---|
| 22 | <span th:each="cat : ${course.categories}" class="badge bg-primary me-1" th:text="${cat.name}">Category</span>
|
|---|
| 23 | </p>
|
|---|
| 24 | <a th:href="@{'/course/enroll/' + ${course.courseId}}" class="btn btn-success mt-2">Enroll</a>
|
|---|
| 25 | </div>
|
|---|
| 26 | </div>
|
|---|
| 27 | </div>
|
|---|
| 28 | </div>
|
|---|
| 29 |
|
|---|
| 30 | <h1 class="mt-5 mb-4">Enrolled Courses</h1>
|
|---|
| 31 | <div class="row">
|
|---|
| 32 | <div class="col-md-4 mb-3" th:each="course : ${unavailableCourses}">
|
|---|
| 33 | <div class="card h-100 shadow-sm">
|
|---|
| 34 | <div class="card-body">
|
|---|
| 35 | <h5 class="card-title" th:text="${course.name}">Course Name</h5>
|
|---|
| 36 | <p class="card-text">Price: <span th:text="${course.price}">100</span> €</p>
|
|---|
| 37 | <p class="card-text">
|
|---|
| 38 | Categories:
|
|---|
| 39 | <span th:each="cat : ${course.categories}" class="badge bg-secondary me-1" th:text="${cat.name}">Category</span>
|
|---|
| 40 | </p>
|
|---|
| 41 | <a th:href="@{'/course/' + ${course.courseId}}" class="btn btn-primary mt-2">Go to Course</a>
|
|---|
| 42 | </div>
|
|---|
| 43 | </div>
|
|---|
| 44 | </div>
|
|---|
| 45 | </div>
|
|---|
| 46 | </div>
|
|---|
| 47 | <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|---|
| 48 | </body>
|
|---|
| 49 | </html>
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.