93 lines
4.5 KiB
HTML
93 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru" xmlns:th="http://www.thymeleaf.org" th:replace="~{fragments/base :: layout(~{::title}, ~{::#content})}">
|
||
<head><title th:text="${course.title} + ' — LMS'">Курс</title></head>
|
||
<body>
|
||
<div id="content">
|
||
<a th:href="@{/teacher}" class="nav-link">← Мои курсы</a>
|
||
|
||
<div class="page-head mb-2">
|
||
<div>
|
||
<h1 class="page-title" th:text="|Курс ${course.courseNo}. ${course.title}|">Курс</h1>
|
||
<div class="meta">
|
||
<span class="badge"
|
||
th:classappend="${course.status == 'ACTIVE' ? 'badge-ok' : 'badge-warn'}"
|
||
th:text="${course.status == 'ACTIVE' ? 'активен' : 'в архиве'}">—</span>
|
||
<span th:text="|Групп: ${#lists.size(groups)}|">Групп: 0</span>
|
||
· <span th:text="|Лабораторных: ${#lists.size(labs)}|">Лабораторных: 0</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row g-4 mt-4">
|
||
<div class="col-lg-6">
|
||
<h2 class="section-title">Группы курса</h2>
|
||
<div class="card card-flush">
|
||
<table>
|
||
<thead><tr><th>Группа</th><th>Добавлена</th></tr></thead>
|
||
<tbody>
|
||
<tr th:each="group : ${groups}">
|
||
<td>
|
||
<a th:if="${currentUser.admin}"
|
||
th:href="@{/admin/groups/{id}(id=${group.groupId})}"
|
||
class="font-mono"
|
||
th:text="${group.groupId}">—</a>
|
||
<span th:unless="${currentUser.admin}" class="font-mono"
|
||
th:text="${group.groupId}">—</span>
|
||
</td>
|
||
<td class="text-muted" th:text="${group.addedAt}">—</td>
|
||
</tr>
|
||
<tr th:if="${#lists.isEmpty(groups)}">
|
||
<td colspan="2" class="empty">К курсу не привязано ни одной группы.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<p class="hint mt-2">Состав групп и привязку к курсу изменяет администратор.</p>
|
||
</div>
|
||
|
||
<div class="col-lg-6">
|
||
<h2 class="section-title">Сведения о курсе</h2>
|
||
<div class="card card-body">
|
||
<p class="text-sm">Создан: <span th:text="${course.createdAt}">—</span></p>
|
||
<p class="text-sm">Обновлён: <span th:text="${course.updatedAt}">—</span></p>
|
||
<p class="text-sm" th:if="${!#lists.isEmpty(course.teachers)}">
|
||
Преподавателей на курсе: <span th:text="${#lists.size(course.teachers)}">0</span>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<h2 class="section-title mt-8 mb-2">Лабораторные курса</h2>
|
||
<div class="card card-flush">
|
||
<table>
|
||
<thead>
|
||
<tr><th>№</th><th>Название</th><th>Статус</th><th>Вариантов</th><th>Срок сдачи</th><th>Защита</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr th:each="lab : ${labs}">
|
||
<td th:text="${lab.number}">1</td>
|
||
<td>
|
||
<a th:if="${currentUser.admin}"
|
||
th:href="@{/admin/labs/{id}(id=${lab.id})}"
|
||
th:text="${lab.title}">—</a>
|
||
<span th:unless="${currentUser.admin}" th:text="${lab.title}">—</span>
|
||
</td>
|
||
<td>
|
||
<span class="badge"
|
||
th:classappend="${lab.status == 'published' ? 'badge-ok' : 'badge-warn'}"
|
||
th:text="${lab.status == 'published' ? 'Опубликована' : (lab.status == 'archived' ? 'В архиве' : 'Черновик')}">—</span>
|
||
</td>
|
||
<td th:text="${lab.variantCount}">0</td>
|
||
<td class="text-muted" th:text="${lab.deadlineMsk ?: '—'}">—</td>
|
||
<td class="text-muted" th:text="${lab.defenseMsk ?: '—'}">—</td>
|
||
</tr>
|
||
<tr th:if="${#lists.isEmpty(labs)}">
|
||
<td colspan="6" class="empty">В курсе пока нет лабораторных.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|