feat: PDF/HTML 폴더 분리 및 필터링 개선

- 업로드 시 HTML과 PDF를 별도 폴더에 저장 (/documents/, /pdfs/)
- 프론트엔드 필터링을 폴더 경로 기준으로 단순화
- PDF 삭제 시 외래키 참조 해제 로직 추가
- book-documents.js, book-editor.js 필터링 통일
- HTML 문서 목록에서 PDF 완전 분리
This commit is contained in:
Hyungi Ahn
2025-08-26 07:44:25 +09:00
parent 4038040faa
commit 04ae64fc4d
20 changed files with 1334 additions and 73 deletions

View File

@@ -102,12 +102,12 @@
<!-- 오른쪽: 한영 전환 -->
<div class="flex items-center">
<!-- PDF 다운로드 버튼 (매칭된 PDF가 있는 경우) -->
<button x-show="document.matched_pdf_id"
@click="downloadMatchedPDF()"
<!-- 원본 PDF 다운로드 (항상 표시) -->
<button @click="downloadOriginalFile()"
class="bg-red-600 text-white px-4 py-2 rounded-xl hover:bg-red-700 transition-all duration-200 flex items-center space-x-2 shadow-sm"
title="매칭된 PDF 다운로드">
title="연결된 원본 PDF 다운로드">
<i class="fas fa-file-pdf text-sm"></i>
<span class="font-medium text-sm">PDF 원본</span>
<span class="font-medium text-sm">원본 다운로드</span>
</button>
<button @click="toggleLanguage()"
@@ -391,7 +391,7 @@
<!-- 스크립트 -->
<script src="/static/js/api.js?v=2025012380"></script>
<script src="/static/js/viewer.js?v=2025012225"></script>
<script src="/static/js/viewer.js?v=2025012387"></script>
<style>
[x-cloak] { display: none !important; }