docs: 加入三個原版對照資料夾
This commit is contained in:
@@ -165,22 +165,6 @@ function modules(): array
|
||||
],
|
||||
'list' => ['display_name', 'media_type', 'category', 'file_path', 'status', 'updated_at'],
|
||||
],
|
||||
'dance_practices' => [
|
||||
'label' => '練舞清單', 'item_label' => '練舞項目', 'list_title' => '練舞清單', 'icon' => 'list-check', 'table' => 'dance_practice_items', 'order' => 'sort_order, id', 'group' => 'dance',
|
||||
'fields' => [
|
||||
'title' => ['label' => '歌曲名稱', 'type' => 'text', 'required' => true],
|
||||
'tags' => ['label' => '練習分類', 'type' => 'text'],
|
||||
'practice_focus' => ['label' => '練習重點', 'type' => 'textarea', 'required' => true],
|
||||
'video_url' => ['label' => '參考影片網址', 'type' => 'url'],
|
||||
'difficulty' => ['label' => '難度', 'type' => 'select', 'default' => 'medium', 'required' => true, 'options' => ['easy' => '入門', 'medium' => '中等', 'hard' => '挑戰']],
|
||||
'progress_status' => ['label' => '練習進度', 'type' => 'select', 'default' => 'not_started', 'required' => true, 'options' => ['not_started' => '未開始', 'practicing' => '練習中', 'review' => '待複習', 'completed' => '已完成']],
|
||||
'note_text' => ['label' => '補充說明', 'type' => 'text'],
|
||||
'is_featured' => ['label' => '優先練習', 'type' => 'checkbox'],
|
||||
'sort_order' => ['label' => '排序', 'type' => 'number', 'default' => '0'],
|
||||
'status' => ['label' => '公開狀態', 'type' => 'status', 'required' => true],
|
||||
],
|
||||
'list' => ['title', 'difficulty', 'progress_status', 'is_featured', 'sort_order', 'status', 'updated_at'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -199,51 +183,6 @@ function status_label(string $status): string
|
||||
return ['draft' => '草稿', 'coming_soon' => '籌備中', 'published' => '公開', 'archived' => '封存', 'available' => '可使用'][$status] ?? $status;
|
||||
}
|
||||
|
||||
function dance_application_statuses(): array
|
||||
{
|
||||
return [
|
||||
'new' => '新報名',
|
||||
'contacted' => '已聯絡',
|
||||
'confirmed' => '確認參與',
|
||||
'declined' => '暫不參與',
|
||||
'archived' => '已封存',
|
||||
];
|
||||
}
|
||||
|
||||
function dance_attendance_label(?string $value): string
|
||||
{
|
||||
return [
|
||||
'attended' => '參加過 20TH',
|
||||
'watched_video' => '看過 20TH 影片',
|
||||
'first_time' => '第一次知道',
|
||||
][$value ?? ''] ?? '未填寫';
|
||||
}
|
||||
|
||||
function dance_song_label(?string $value): string
|
||||
{
|
||||
return [
|
||||
'couple' => 'Couple',
|
||||
'comeback' => "Com' Back",
|
||||
'road_fighter' => 'Road Fighter',
|
||||
'pom_saeng_pom_sa' => 'Pom Saeng Pom Sa',
|
||||
'other' => '其他',
|
||||
][$value ?? ''] ?? '未選擇';
|
||||
}
|
||||
|
||||
function dance_content_labels(?string $value): array
|
||||
{
|
||||
$labels = [
|
||||
'cover' => '翻跳',
|
||||
'medley' => '串燒聯舞',
|
||||
'blessing' => '祝福影片',
|
||||
'graphic' => '圖文應援',
|
||||
'editing' => '影片剪輯',
|
||||
'archive' => '資料整理',
|
||||
];
|
||||
$selected = array_filter(array_map('trim', explode(',', (string) $value)));
|
||||
return array_map(static fn (string $item): string => $labels[$item] ?? $item, $selected);
|
||||
}
|
||||
|
||||
function audit(string $action, string $entityType, ?int $entityId, array $details = []): void
|
||||
{
|
||||
$stmt = db()->prepare('INSERT INTO audit_logs (admin_user_id, action_name, entity_type, entity_id, details_json, ip_address) VALUES (?, ?, ?, ?, ?, ?)');
|
||||
@@ -279,15 +218,8 @@ function render_header(string $title, string $active = ''): void
|
||||
<a class="<?= $active === 'dashboard' ? 'active' : '' ?>" href="index.php"><i class="bi bi-speedometer2"></i>控制台</a>
|
||||
<p>內容資料</p>
|
||||
<?php foreach ($mods as $key => $mod): ?>
|
||||
<?php if (($mod['group'] ?? 'content') === 'dance') continue; ?>
|
||||
<a class="<?= $active === $key ? 'active' : '' ?>" href="records.php?module=<?= h($key) ?>"><i class="bi bi-<?= h($mod['icon']) ?>"></i><?= h($mod['label']) ?></a>
|
||||
<?php endforeach; ?>
|
||||
<p>水晶熱舞社</p>
|
||||
<?php foreach ($mods as $key => $mod): ?>
|
||||
<?php if (($mod['group'] ?? 'content') !== 'dance') continue; ?>
|
||||
<a class="<?= $active === $key ? 'active' : '' ?>" href="records.php?module=<?= h($key) ?>"><i class="bi bi-<?= h($mod['icon']) ?>"></i><?= h($mod['label']) ?></a>
|
||||
<?php endforeach; ?>
|
||||
<a class="<?= $active === 'dance-applications' ? 'active' : '' ?>" href="dance-applications.php"><i class="bi bi-person-hearts"></i>30TH 應援報名</a>
|
||||
<p>系統</p>
|
||||
<a class="<?= $active === 'publishing' ? 'active' : '' ?>" href="publishing.php"><i class="bi bi-eye"></i>公開狀態</a>
|
||||
<a class="<?= $active === 'admins' ? 'active' : '' ?>" href="admins.php"><i class="bi bi-shield-lock"></i>管理者帳號</a>
|
||||
|
||||
Reference in New Issue
Block a user