feat(ui): integrate project and task pages with shell

This commit is contained in:
sechmachine
2026-08-15 01:35:30 +07:00
parent b1c6b170d0
commit 401f67671a
12 changed files with 297 additions and 136 deletions
+29 -13
View File
@@ -1,19 +1,35 @@
<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head><meta charset="utf-8"><title>Create Project</title></head>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
th:replace="~{fragments/layout :: shell(
pageTitle='Create Project',
section='Projects',
activeNav='projects',
primaryAction=~{},
content=~{::main})}">
<body>
<main>
<h1>Create Project</h1>
<form method="post" th:action="@{/projects}" th:object="${projectForm}">
<label for="name">Name</label><input id="name" th:field="*{name}" required maxlength="160">
<p th:errors="*{name}"></p>
<label for="description">Description</label><textarea id="description" th:field="*{description}"></textarea>
<label for="startDate">Start date</label><input id="startDate" type="date" th:field="*{startDate}" required>
<label for="endDate">End date</label><input id="endDate" type="date" th:field="*{endDate}" required>
<label for="leader">Initial Leader user ID</label><input id="leader" type="number" min="1" th:field="*{initialLeaderUserId}" required>
<p th:errors="*{initialLeaderUserId}"></p>
<button type="submit">Create Project</button>
</form>
<p class="page-description">Define the initial Project window and Leader. Membership changes remain server-authorized.</p>
<form class="panel form-panel form-grid" method="post" th:action="@{/projects}" th:object="${projectForm}">
<div class="field">
<label class="field-label" for="name">Name</label>
<input class="control" id="name" th:field="*{name}" required maxlength="160" th:attr="aria-invalid=${#fields.hasErrors('name')}">
<p class="field-error" role="alert" th:if="${#fields.hasErrors('name')}" th:errors="*{name}">Name error</p>
</div>
<div class="field">
<label class="field-label" for="description">Description</label>
<textarea class="control" id="description" rows="5" th:field="*{description}"></textarea>
</div>
<div class="form-grid form-grid-three">
<div class="field"><label class="field-label" for="startDate">Start date</label><input class="control" id="startDate" type="date" th:field="*{startDate}" required></div>
<div class="field"><label class="field-label" for="endDate">End date</label><input class="control" id="endDate" type="date" th:field="*{endDate}" required></div>
<div class="field">
<label class="field-label" for="leader">Initial Leader user ID</label>
<input class="control" id="leader" type="number" min="1" th:field="*{initialLeaderUserId}" required th:attr="aria-invalid=${#fields.hasErrors('initialLeaderUserId')}">
<p class="field-error" role="alert" th:if="${#fields.hasErrors('initialLeaderUserId')}" th:errors="*{initialLeaderUserId}">Leader error</p>
</div>
</div>
<div class="form-actions"><a class="button" th:href="@{/projects}">Cancel</a><button class="button button-primary" type="submit">Create Project</button></div>
</form>
</main>
</body>
</html>