fix: 기본코드관리 표 텍스트 세로 줄바꿈 방지(whitespace-nowrap)

코드명 등 폭 미지정 열이 좁아지면 글자 단위로 줄바꿈되어 세로로
표시되던 문제. 두 테이블의 모든 th/td에 whitespace-nowrap을 추가해
가로로 표시되게 하고, 필요 시 컨테이너의 overflow-auto로 가로 스크롤.
This commit is contained in:
taekyoungc
2026-07-02 11:18:47 +09:00
parent aca40797aa
commit f76892a6ce

View File

@@ -36,14 +36,14 @@ $stateBadge = static function (int $state): string {
<table class="w-full text-[13px]">
<thead>
<tr class="text-left text-[11px] font-semibold text-gray-500 border-b border-gray-200">
<th class="py-2.5 px-2 w-12 text-left">번호</th>
<th class="py-2.5 px-2 w-20">코드</th>
<th class="py-2.5 px-2">코드명</th>
<th class="py-2.5 px-2 w-20 text-left">세부코드</th>
<th class="py-2.5 px-2 w-16 text-left">상태</th>
<th class="py-2.5 px-2 w-32">등록일</th>
<th class="py-2.5 px-2 w-12 text-left whitespace-nowrap">번호</th>
<th class="py-2.5 px-2 w-20 whitespace-nowrap">코드</th>
<th class="py-2.5 px-2 whitespace-nowrap">코드명</th>
<th class="py-2.5 px-2 w-20 text-left whitespace-nowrap">세부코드</th>
<th class="py-2.5 px-2 w-16 text-left whitespace-nowrap">상태</th>
<th class="py-2.5 px-2 w-32 whitespace-nowrap">등록일</th>
<?php if ($showKindActions): ?>
<th class="py-2.5 px-2 w-28 text-left">작업</th>
<th class="py-2.5 px-2 w-28 text-left whitespace-nowrap">작업</th>
<?php endif; ?>
</tr>
</thead>
@@ -56,14 +56,14 @@ $stateBadge = static function (int $state): string {
?>
<tr class="border-b border-gray-200 last:border-0 cursor-pointer hover:bg-blue-50/60 <?= $isSelected ? 'bg-blue-50' : '' ?>"
onclick="window.location.href='<?= esc($detailUrl, 'attr') ?>'">
<td class="py-2.5 px-2 text-left text-gray-500"><?= (string) $i ?></td>
<td class="py-2.5 px-2 text-left font-mono text-gray-700"><?= esc($row->ck_code) ?></td>
<td class="py-2.5 px-2 font-medium text-gray-900"><?= esc($row->ck_name) ?></td>
<td class="py-2.5 px-2 text-left text-gray-600"><?= (int) ($countMap[$row->ck_idx] ?? 0) ?>개</td>
<td class="py-2.5 px-2 text-left"><?= $stateBadge((int) ($row->ck_state ?? 0)) ?></td>
<td class="py-2.5 px-2 text-gray-500 text-[12px]"><?= esc($row->ck_regdate ?? '') ?></td>
<td class="py-2.5 px-2 text-left text-gray-500 whitespace-nowrap"><?= (string) $i ?></td>
<td class="py-2.5 px-2 text-left font-mono text-gray-700 whitespace-nowrap"><?= esc($row->ck_code) ?></td>
<td class="py-2.5 px-2 font-medium text-gray-900 whitespace-nowrap"><?= esc($row->ck_name) ?></td>
<td class="py-2.5 px-2 text-left text-gray-600 whitespace-nowrap"><?= (int) ($countMap[$row->ck_idx] ?? 0) ?>개</td>
<td class="py-2.5 px-2 text-left whitespace-nowrap"><?= $stateBadge((int) ($row->ck_state ?? 0)) ?></td>
<td class="py-2.5 px-2 text-gray-500 text-[12px] whitespace-nowrap"><?= esc($row->ck_regdate ?? '') ?></td>
<?php if ($showKindActions): ?>
<td class="py-2.5 px-2 text-left text-xs" onclick="event.stopPropagation()">
<td class="py-2.5 px-2 text-left text-xs whitespace-nowrap" onclick="event.stopPropagation()">
<a href="<?= base_url('admin/code-kinds/edit/' . (int) $row->ck_idx) ?>" class="text-blue-600 hover:underline mr-1">수정</a>
<form action="<?= base_url('admin/code-kinds/delete/' . (int) $row->ck_idx) ?>" method="POST" class="inline" onsubmit="return confirm('이 코드 종류를 삭제하시겠습니까?');">
<?= csrf_field() ?>
@@ -102,15 +102,15 @@ $stateBadge = static function (int $state): string {
<table class="w-full text-[13px]">
<thead>
<tr class="text-left text-[11px] font-semibold text-gray-500 border-b border-gray-200">
<th class="py-2.5 px-2 w-12 text-left">번호</th>
<th class="py-2.5 px-2 w-20">코드</th>
<th class="py-2.5 px-2">코드명</th>
<th class="py-2.5 px-2 w-16 text-left">범위</th>
<th class="py-2.5 px-2 w-14 text-left">정렬</th>
<th class="py-2.5 px-2 w-16 text-left">상태</th>
<th class="py-2.5 px-2 w-32">등록일</th>
<th class="py-2.5 px-2 w-12 text-left whitespace-nowrap">번호</th>
<th class="py-2.5 px-2 w-20 whitespace-nowrap">코드</th>
<th class="py-2.5 px-2 whitespace-nowrap">코드명</th>
<th class="py-2.5 px-2 w-16 text-left whitespace-nowrap">범위</th>
<th class="py-2.5 px-2 w-14 text-left whitespace-nowrap">정렬</th>
<th class="py-2.5 px-2 w-16 text-left whitespace-nowrap">상태</th>
<th class="py-2.5 px-2 w-32 whitespace-nowrap">등록일</th>
<?php if ($canManageDetails): ?>
<th class="py-2.5 px-2 w-24 text-left">작업</th>
<th class="py-2.5 px-2 w-24 text-left whitespace-nowrap">작업</th>
<?php endif; ?>
</tr>
</thead>
@@ -122,17 +122,17 @@ $stateBadge = static function (int $state): string {
$scopeLabel = $isPlatform ? '공통' : '지자체';
?>
<tr class="border-b border-gray-200 last:border-0 hover:bg-gray-50">
<td class="py-2.5 px-2 text-left text-gray-500"><?= (string) $dNo ?></td>
<td class="py-2.5 px-2 text-left font-mono text-gray-700"><?= esc($row->cd_code) ?></td>
<td class="py-2.5 px-2 font-medium text-gray-900"><?= esc($row->cd_name) ?></td>
<td class="py-2.5 px-2 text-left">
<td class="py-2.5 px-2 text-left text-gray-500 whitespace-nowrap"><?= (string) $dNo ?></td>
<td class="py-2.5 px-2 text-left font-mono text-gray-700 whitespace-nowrap"><?= esc($row->cd_code) ?></td>
<td class="py-2.5 px-2 font-medium text-gray-900 whitespace-nowrap"><?= esc($row->cd_name) ?></td>
<td class="py-2.5 px-2 text-left whitespace-nowrap">
<span class="inline-block px-2 py-0.5 rounded-full text-[11px] font-medium <?= $isPlatform ? 'bg-blue-50 text-blue-700' : 'bg-amber-50 text-amber-700' ?>"><?= esc($scopeLabel) ?></span>
</td>
<td class="py-2.5 px-2 text-left text-gray-600"><?= (int) ($row->cd_sort ?? 0) ?></td>
<td class="py-2.5 px-2 text-left"><?= $stateBadge((int) ($row->cd_state ?? 0)) ?></td>
<td class="py-2.5 px-2 text-gray-500 text-[12px]"><?= esc($row->cd_regdate ?? '') ?></td>
<td class="py-2.5 px-2 text-left text-gray-600 whitespace-nowrap"><?= (int) ($row->cd_sort ?? 0) ?></td>
<td class="py-2.5 px-2 text-left whitespace-nowrap"><?= $stateBadge((int) ($row->cd_state ?? 0)) ?></td>
<td class="py-2.5 px-2 text-gray-500 text-[12px] whitespace-nowrap"><?= esc($row->cd_regdate ?? '') ?></td>
<?php if ($canManageDetails): ?>
<td class="py-2.5 px-2 text-left text-xs">
<td class="py-2.5 px-2 text-left text-xs whitespace-nowrap">
<?php if (! empty($rowCanEdit[$row->cd_idx])): ?>
<a href="<?= base_url('admin/code-details/edit/' . (int) $row->cd_idx) ?>" class="text-blue-600 hover:underline">수정</a>
<form action="<?= base_url('admin/code-details/delete/' . (int) $row->cd_idx) ?>" method="POST" class="ml-1 inline" onsubmit="return confirm('이 세부코드를 삭제하시겠습니까?');">