source: src/main/resources/templates/lesson/lesson.html

Last change on this file was 5ea00d7, checked in by Malek Alavi <malekalavi7@…>, 3 days ago

Initial project upload

  • Property mode set to 100644
File size: 2.5 KB
Line 
1<!DOCTYPE html>
2<html xmlns:th="http://www.thymeleaf.org">
3<head>
4 <meta charset="UTF-8">
5 <title>Lessons</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
10<div class="container mt-5">
11
12 <!-- Navigation -->
13 <div class="d-flex justify-content-between align-items-center mb-4">
14 <div>
15 <a th:href="@{/}" class="btn btn-secondary me-2">Back to Home</a>
16
17 <!-- Back to modules for the course -->
18 <a th:href="@{'/module/' + ${module.course.courseId}}"
19 class="btn btn-outline-dark">
20 Back to Modules
21 </a>
22 </div>
23
24 <a th:href="@{'/lesson/' + ${module.moduleId} + '/add'}"
25 class="btn btn-primary">
26 + Add Lesson
27 </a>
28 </div>
29
30 <h2 class="mb-3">
31 Lessons for Module:
32 <span class="text-primary" th:text="${module.title}">Module Title</span>
33 </h2>
34
35 <div class="row" th:if="${lessons != null and !lessons.isEmpty()}">
36 <div class="col-md-4 mb-3" th:each="lesson : ${lessons}">
37 <div class="card h-100 shadow-sm">
38 <div class="card-body d-flex flex-column">
39 <h5 class="card-title" th:text="${lesson.title}">Lesson Title</h5>
40
41 <p class="card-text text-muted"
42 th:text="${#strings.abbreviate(lesson.material, 120)}">
43 Lesson material preview...
44 </p>
45
46 <div class="mt-auto d-flex justify-content-between align-items-center">
47 <a th:href="@{'/lesson/' + ${module.moduleId} + '/edit/' + ${lesson.lessonId}}"
48 class="btn btn-warning btn-sm">
49 Edit
50 </a>
51
52 <form th:action="@{'/lesson/' + ${module.moduleId} + '/delete/' + ${lesson.lessonId}}"
53 method="post"
54 onsubmit="return confirm('Are you sure you want to delete this lesson?');">
55 <button type="submit" class="btn btn-danger btn-sm">
56 Delete
57 </button>
58 </form>
59 </div>
60
61 </div>
62 </div>
63 </div>
64 </div>
65
66 <div class="alert alert-info mt-4" th:if="${lessons == null or lessons.isEmpty()}">
67 No lessons found for this module.
68 </div>
69
70</div>
71
72</body>
73</html>
Note: See TracBrowser for help on using the repository browser.