3f664bcd5c
- djb 패키지 분리 - 댓글 CRUD/권한/알림 일체 - 같은 법인 공유 - 상세/댓글 조회 정책 일원화 - 작성자명 매핑 - PortalUser/TSEAIRM02 양쪽 조회 - 목록 - 댓글 수 표시 및 첨부 UI/로직 제거 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
113 lines
4.5 KiB
HTML
113 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/djbank_title_layout}">
|
|
|
|
<body>
|
|
<section layout:fragment="title">
|
|
<div class="page-title-banner">
|
|
<img th:src="@{/img/img_title_bg.png}" class="title-image" alt="타이틀 배경">
|
|
<h1>Q&A</h1>
|
|
</div>
|
|
</section>
|
|
|
|
<section layout:fragment="contentFragment">
|
|
<div class="inquiry-detail-container">
|
|
|
|
<!-- Inquiry Header: Status Badge and Title -->
|
|
<div class="inquiry-detail-header">
|
|
<div class="inquiry-header-top">
|
|
<span class="inquiry-status-badge"
|
|
th:classappend="${inquiry.inquiryStatus == 'IN_PROGRESS' ? 'inquiry-status-badge--completed' : (inquiry.inquiryStatus == 'CLOSED' ? 'inquiry-status-badge--closed' : 'inquiry-status-badge--pending')}"
|
|
th:text="${inquiry.inquiryStatus == 'IN_PROGRESS' ? '답변완료' : (inquiry.inquiryStatus == 'CLOSED' ? '종료' : '답변대기')}">
|
|
답변대기
|
|
</span>
|
|
<div class="inquiry-header-right">
|
|
<span class="inquiry-detail-writer"
|
|
th:text="${inquiry.inquirerName != null ? inquiry.inquirerName : (inquiry.inquirer != null ? inquiry.inquirer.userName : '')}">작성자</span>
|
|
<span class="inquiry-detail-divider">|</span>
|
|
<span class="inquiry-detail-date" th:text="${#temporals.format(inquiry.createdDate, 'yyyy.MM.dd')}">2025.11.01</span>
|
|
</div>
|
|
</div>
|
|
<h2 class="inquiry-detail-title" th:text="${inquiry.inquirySubject}">질문 제목</h2>
|
|
</div>
|
|
|
|
<!-- Inquiry Content Section -->
|
|
<div class="inquiry-detail-content">
|
|
<div id="inquiryDetail" class="inquiry-content-body" th:utext="${inquiry.inquiryDetail}">
|
|
문의 내용이 여기에 표시됩니다.
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Admin Response Section -->
|
|
<div class="inquiry-response-section" th:if="${inquiry.inquiryStatus == 'IN_PROGRESS' or inquiry.inquiryStatus == 'CLOSED'}">
|
|
<div class="inquiry-response-header">
|
|
<span class="response-label">관리자 답변</span>
|
|
<span class="response-date" th:text="${#temporals.format(inquiry.responseDate, 'yyyy.MM.dd')}">2025.11.02</span>
|
|
</div>
|
|
<div class="inquiry-response-body" id="responseDetail" th:utext="${inquiry.responseDetail}">
|
|
답변 내용이 여기에 표시됩니다.
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Comment Section (DJBank Custom DJPGPT0002) -->
|
|
<th:block th:replace="~{apps/community/djb/fragments-inquiry-comments :: commentSection(${inquiry}, ${commentWritable})}"></th:block>
|
|
|
|
<!-- Action Buttons -->
|
|
<div class="inquiry-detail-actions">
|
|
<div class="actions-left">
|
|
<button type="button" class="btn-inquiry-list" th:onclick="|location.href='@{/inquiry}'|">목록</button>
|
|
</div>
|
|
<div class="actions-right" th:if="${inquiry.inquiryStatus == 'PENDING' && inquiry.inquirer.id == #authentication.principal.id}">
|
|
<form id="deleteForm" th:action="@{/inquiry/{id}/delete(id=${inquiry.id})}" method="post" style="display: none;"></form>
|
|
<button type="button" class="btn-inquiry-edit" th:onclick="|location.href='@{/inquiry/edit(id=${inquiry.id})}'|">수정</button>
|
|
<button type="button" class="btn-inquiry-delete" onclick="confirmDelete()">삭제</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
|
|
</body>
|
|
|
|
<th:block layout:fragment="contentScript">
|
|
<script th:inline="javascript">
|
|
$(document).ready(function() {
|
|
var successMsg = [[${success}]];
|
|
if (successMsg) {
|
|
customPopups.showAlert(successMsg);
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
function decodeHTMLEntities(text) {
|
|
var textArea = document.createElement('textarea');
|
|
textArea.innerHTML = text;
|
|
return textArea.value;
|
|
}
|
|
|
|
function confirmDelete() {
|
|
customPopups.showConfirm('문의글을 삭제하시겠습니까?', function(result) {
|
|
if (result) {
|
|
document.getElementById('deleteForm').submit();
|
|
}
|
|
});
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
var inquiryElement = document.getElementById('inquiryDetail');
|
|
if (inquiryElement) {
|
|
inquiryElement.innerHTML = decodeHTMLEntities(inquiryElement.innerHTML);
|
|
}
|
|
|
|
var responseElement = document.getElementById('responseDetail');
|
|
if (responseElement) {
|
|
responseElement.innerHTML = decodeHTMLEntities(responseElement.innerHTML);
|
|
}
|
|
});
|
|
</script>
|
|
<script th:src="@{/js/djb/inquiry-comments.js}"></script>
|
|
</th:block>
|
|
|
|
</html>
|