kcgFileManager/src/main/resources/templates/board/contentWrite.html

123 lines
5.9 KiB
HTML
Raw Normal View History

2021-12-10 09:13:03 +00:00
<!DOCTYPE html>
<html lang="ko"
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="css">
<style>
.col-form-label{
text-align: right;
}
</style>
</th:block>
<th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/board/contentWrite.js}"></script>
</th:block>
<div layout:fragment="content">
<main class="pt-3">
<h4>자료 등록</h4>
<div class="row mx-0">
<div class="col-7 card">
<div class="card-body">
2021-12-13 09:16:18 +00:00
<div class="row mb-3 justify-content-end">
<div class="col-auto">
<button class="bi bi-save btn btn-primary" id="saveBtn"> 저장</button>
2021-12-10 09:13:03 +00:00
</div>
2021-12-13 09:16:18 +00:00
</div>
<form id="contentForm" th:action="@{/board/saveContent}" method="post">
<div class="row mb-3">
<label for="title" class="col-sm-2 col-form-label">분류 선택</label>
<div class="col-sm">
<select class="form-select categorySelector" data-depth="1">
<option selected>분류를 선택해주세요</option>
<th:block th:each="depth1:${session.categoryList}">
<option th:value="${depth1.categorySeq}" th:text="${depth1.categoryName}"></option>
2021-12-10 09:13:03 +00:00
</th:block>
2021-12-13 09:16:18 +00:00
</select>
</div>
<div class="col-sm">
<select class="form-select categorySelector" data-depth="2" disabled>
<option selected>분류를 선택해주세요</option>
<th:block th:each="depth1:${session.categoryList}">
<th:block th:each="depth2:${depth1.childCategoryList}">
<option th:value="${depth2.categorySeq}" th:data-parentseq="${depth2.parentSeq}" th:text="${depth2.categoryName}"></option>
2021-12-10 09:13:03 +00:00
</th:block>
</th:block>
2021-12-13 09:16:18 +00:00
</select>
</div>
<div class="col-sm">
<select class="form-select categorySelector" data-depth="3" disabled>
<option selected>분류를 선택해주세요</option>
<th:block th:each="depth1:${session.categoryList}">
<th:block th:each="depth2:${depth1.childCategoryList}">
<th:block th:each="depth3:${depth2.childCategoryList}">
<option th:value="${depth3.categorySeq}" th:data-parentseq="${depth3.parentSeq}" th:text="${depth3.categoryName}"></option>
2021-12-10 09:13:03 +00:00
</th:block>
</th:block>
</th:block>
2021-12-13 09:16:18 +00:00
</select>
</div>
<div class="col-sm">
<select class="form-select categorySelector" data-depth="4" name="categorySeq" disabled>
<option selected>분류를 선택해주세요</option>
<th:block th:each="depth1:${session.categoryList}">
<th:block th:each="depth2:${depth1.childCategoryList}">
<th:block th:each="depth3:${depth2.childCategoryList}">
<th:block th:each="depth4:${depth3.childCategoryList}">
<option th:value="${depth4.categorySeq}" th:data-parentseq="${depth4.parentSeq}" th:text="${depth4.categoryName}"></option>
</th:block>
</th:block>
</th:block>
</th:block>
</select>
</div>
2021-12-10 09:13:03 +00:00
</div>
2021-12-13 09:16:18 +00:00
<div class="row mb-3">
<label for="title" class="col-sm-2 col-form-label">제목</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="title" name="title" autocomplete="off">
</div>
2021-12-10 09:13:03 +00:00
</div>
2021-12-13 09:16:18 +00:00
<div class="row mb-3">
<label for="createName" class="col-sm-2 col-form-label">작성자</label>
<div class="col-sm-4">
<input type="hidden" name="createId" th:value="${userId}">
<input type="text" class="form-control" id="createName" th:value="${userName}" readonly>
</div>
<label for="createDate" class="col-sm-2 col-form-label">작성일</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="createDate" value="저장시 생성" readonly>
</div>
2021-12-10 09:13:03 +00:00
</div>
2021-12-13 09:16:18 +00:00
<div class="row mb-3">
<label for="files" class="col-sm-2 col-form-label">업로드 자료</label>
<div class="col-sm-10" style="min-height: 70px;">
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
<br>파일을 업로드 해주세요.
</div>
2021-12-10 09:13:03 +00:00
</div>
</div>
2021-12-13 09:16:18 +00:00
<div class="row mb-3">
<label for="description" class="col-sm-2 col-form-label">설명</label>
<div class="col-sm-10">
<textarea id="description" name="description"></textarea>
</div>
2021-12-10 09:13:03 +00:00
</div>
2021-12-13 09:16:18 +00:00
<div class="row mb-3">
<label for="hashTag" class="col-sm-2 col-form-label">해시태그</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="hashTag" name="hashTagStr" placeholder="태그는 앞에 #을 붙여 띄어쓰기 없이 작성해주세요. ex) #태그1, #태그2, ..." autocomplete="off">
</div>
2021-12-10 09:13:03 +00:00
</div>
2021-12-13 09:16:18 +00:00
</form>
<form id="fileForm" class="d-none" th:action="@{/board/uploadFiles}" method="post" enctype="multipart/form-data">
<input type="text" id="contentSeq" name="contentSeq">
<input type="file" id="fileInputer" name="fileInputer" multiple>
</form>
2021-12-10 09:13:03 +00:00
</div>
</div>
</div>
</main>
</div>
</html>