This commit is contained in:
unknown
2026-03-21 07:26:38 +09:00
parent 166d94fca4
commit 40150cd66d
406 changed files with 34179 additions and 55658 deletions
+78 -51
View File
@@ -98,6 +98,26 @@
margin-bottom: 1rem;
}
/* 테이블 뷰 스타일 */
#xmlFileTable {
font-size: 0.85rem;
}
.table-hover tbody tr:hover {
background-color: #f8fafc;
}
.file-icon-wrapper-sm {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background-color: #eff6ff;
color: #3b82f6;
border-radius: 6px;
}
.card-actions {
display: flex;
gap: 0.5rem;
@@ -215,58 +235,56 @@
<div class="card-body bg-light">
{% if xml_files %}
<!-- 카드 크기 조정: 한 줄에 4개(xxl), 3개(xl) 등으로 조금 더 키움 -->
<div class="row row-cols-1 row-cols-lg-2 row-cols-xl-3 row-cols-xxl-4 g-3">
{% for xml_file in xml_files %}
<div class="col">
<div class="xml-file-card position-relative p-3 h-100 d-flex flex-column">
<div class="position-absolute top-0 end-0 p-2 me-1">
<input type="checkbox" class="form-check-input file-selector border-secondary"
value="{{ xml_file }}" style="cursor: pointer;">
</div>
<div class="d-flex align-items-center mb-3">
<div class="file-icon-wrapper me-3 mb-0 shadow-sm"
style="width: 42px; height: 42px; font-size: 1.4rem;">
<i class="bi bi-filetype-xml"></i>
</div>
<div class="file-name text-truncate fw-bold mb-0 text-dark"
style="max-width: 140px; font-size: 0.95rem;" title="{{ xml_file }}">
{{ xml_file }}
</div>
</div>
<div class="mt-auto pt-3 border-top">
<div class="d-flex gap-2">
<!-- 배포 버튼 -->
<button type="button"
class="btn btn-sm btn-primary flex-fill d-flex align-items-center justify-content-center gap-1"
onclick="openDeployModal('{{ xml_file }}')" title="배포">
<i class="bi bi-send-fill"></i> <span class="small fw-bold">배포</span>
</button>
<!-- 편집 버튼 -->
<a href="{{ url_for('xml.edit_xml', filename=xml_file) }}"
class="btn btn-sm btn-white border flex-fill d-flex align-items-center justify-content-center gap-1 text-dark bg-white"
title="편집">
<i class="bi bi-pencil-fill text-secondary"></i> <span
class="small fw-bold">편집</span>
</a>
<!-- 삭제 버튼 -->
<form action="{{ url_for('xml.delete_xml', filename=xml_file) }}" method="POST"
class="d-flex flex-fill m-0" style="min-width: 0;">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<button type="submit"
class="btn btn-sm btn-white border w-100 d-flex align-items-center justify-content-center gap-1 text-danger bg-white"
onclick="return confirm('정말 삭제하시겠습니까?')" title="삭제">
<i class="bi bi-trash-fill"></i> <span class="small fw-bold">삭제</span>
<div class="table-responsive">
<table class="table table-hover table-sm align-middle mb-0" id="xmlFileTable">
<thead class="table-light">
<tr>
<th scope="col" style="width: 50px;" class="text-center">
<input type="checkbox" class="form-check-input" id="checkAll">
</th>
<th scope="col">파일명</th>
<th scope="col" style="width: 180px;" class="text-center">관리</th>
</tr>
</thead>
<tbody>
{% for xml_file in xml_files %}
<tr>
<td class="text-center">
<input type="checkbox" class="form-check-input file-selector"
value="{{ xml_file }}">
</td>
<td>
<div class="d-flex align-items-center">
<div class="file-icon-wrapper-sm me-3">
<i class="bi bi-filetype-xml fs-5"></i>
</div>
<span class="fw-bold text-dark">{{ xml_file }}</span>
</div>
</td>
<td class="text-center">
<div class="d-flex justify-content-center gap-1">
<button type="button" class="btn btn-sm btn-outline-primary"
onclick="openDeployModal('{{ xml_file }}')" title="배포">
<i class="bi bi-send-fill"></i>
</button>
</form>
</div>
</div>
</div>
</div>
{% endfor %}
<a href="{{ url_for('xml.edit_xml', filename=xml_file) }}"
class="btn btn-sm btn-outline-secondary" title="편집">
<i class="bi bi-pencil-fill"></i>
</a>
<form action="{{ url_for('xml.delete_xml', filename=xml_file) }}"
method="POST" class="d-inline-block m-0">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<button type="submit" class="btn btn-sm btn-outline-danger"
onclick="return confirm('정말 삭제하시겠습니까?')" title="삭제">
<i class="bi bi-trash-fill"></i>
</button>
</form>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="text-center py-5 my-5">
@@ -519,6 +537,15 @@
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
});
// 전체 선택 체크박스 로직
const checkAll = document.getElementById('checkAll');
if (checkAll) {
checkAll.addEventListener('change', function () {
const checkboxes = document.querySelectorAll('.file-selector');
checkboxes.forEach(cb => cb.checked = checkAll.checked);
});
}
});
</script>
{% endblock %}