Files
sam-manage/resources/views/boards/partials/table.blade.php
hskwon 2846d6c034 style: 관리자 패널 UI 개선 및 스크럼 모달 통합
- 테이블 헤더 스타일 통일 (menus, roles, permissions, boards 등)
- 권한 매트릭스 체크박스/버튼 크기 20x20으로 표준화
- 스크럼 항목 추가/수정 모달 통합 (코드 중복 제거)
- daily-logs API URL 경로 수정 (/pm/ 제거)
- 타임존 Asia/Seoul로 변경
- flow-tester 액션 아이콘 크기 조정
2025-12-03 16:47:57 +09:00

106 lines
5.7 KiB
PHP

<!-- 게시판 테이블 -->
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-3 py-2 text-center text-sm font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap">ID</th>
<th class="px-3 py-2 text-center text-sm font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap">코드</th>
<th class="px-3 py-2 text-center text-sm font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap">게시판명</th>
<th class="px-3 py-2 text-center text-sm font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap">유형</th>
<th class="px-3 py-2 text-center text-sm font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap">필드 </th>
<th class="px-3 py-2 text-center text-sm font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap">상태</th>
<th class="px-3 py-2 text-center text-sm font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap">생성일</th>
<th class="px-3 py-2 text-center text-sm font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap">액션</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@forelse($boards as $board)
<tr class="{{ $board->trashed() ? 'bg-red-50' : '' }} hover:bg-gray-50 cursor-pointer"
onclick="window.location='{{ route('boards.posts.index', $board->id) }}'">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
{{ $board->id }}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm">
<span class="font-mono text-blue-600">{{ $board->board_code }}</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">{{ $board->name }}</div>
@if($board->description)
<div class="text-sm text-gray-500 truncate max-w-xs">{{ $board->description }}</div>
@endif
</td>
<td class="px-6 py-4 whitespace-nowrap">
@if($board->board_type)
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full
@switch($board->board_type)
@case('notice') bg-purple-100 text-purple-800 @break
@case('qna') bg-blue-100 text-blue-800 @break
@case('faq') bg-green-100 text-green-800 @break
@case('free') bg-gray-100 text-gray-800 @break
@default bg-yellow-100 text-yellow-800
@endswitch
">
{{ $board->board_type }}
</span>
@else
<span class="text-gray-400">-</span>
@endif
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
{{ $board->fields_count ?? 0 }}
</td>
<td class="px-6 py-4 whitespace-nowrap">
@if($board->trashed())
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
삭제됨
</span>
@elseif($board->is_active)
<button onclick="event.stopPropagation(); toggleActive({{ $board->id }})"
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800 hover:bg-green-200 cursor-pointer">
활성
</button>
@else
<button onclick="event.stopPropagation(); toggleActive({{ $board->id }})"
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800 hover:bg-gray-200 cursor-pointer">
비활성
</button>
@endif
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
{{ $board->created_at->format('Y-m-d') }}
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium space-x-2">
@if($board->trashed())
<!-- 삭제된 항목 - 복원은 일반관리자도 가능, 영구삭제는 슈퍼관리자만 -->
<button onclick="confirmRestore({{ $board->id }}, '{{ $board->name }}')"
class="text-green-600 hover:text-green-900">복원</button>
@if(auth()->user()?->is_super_admin)
<button onclick="confirmForceDelete({{ $board->id }}, '{{ $board->name }}')"
class="text-red-600 hover:text-red-900">영구삭제</button>
@endif
@else
<!-- 일반 항목 액션 -->
<a href="{{ route('boards.edit', $board->id) }}"
onclick="event.stopPropagation()"
class="text-indigo-600 hover:text-indigo-900">수정</a>
<button onclick="event.stopPropagation(); confirmDelete({{ $board->id }}, '{{ $board->name }}')"
class="text-red-600 hover:text-red-900">삭제</button>
@endif
</td>
</tr>
@empty
<tr>
<td colspan="8" class="px-6 py-12 text-center text-gray-500">
게시판이 없습니다.
</td>
</tr>
@endforelse
</tbody>
</table>
<!-- 페이지네이션 -->
@if($boards->hasPages())
<div class="px-6 py-4 border-t border-gray-200">
{{ $boards->withQueryString()->links() }}
</div>
@endif