121 lines
6.2 KiB
HTML
121 lines
6.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>论坛举报审核 - 后台</title>
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
<link rel="stylesheet" href="/static/css/admin.css">
|
|
</head>
|
|
<body class="admin-page">
|
|
<header class="admin-header">
|
|
<h1>论坛举报审核</h1>
|
|
<nav>
|
|
<a href="{{ url_for('admin_forum_reports') }}">举报列表</a>
|
|
<a href="{{ url_for('admin_users') }}">用户管理</a>
|
|
<a href="{{ url_for('admin_forum_posts') }}">帖子管理</a>
|
|
<a href="{{ url_for('admin_forum_comments') }}">评论管理</a>
|
|
<a href="{{ url_for('admin_forum_categories') }}">论坛分类</a>
|
|
<a href="{{ url_for('admin_forum_tracking') }}">埋点看板</a>
|
|
<a href="{{ url_for('admin_dashboard') }}">返回总览</a>
|
|
<a href="{{ url_for('index') }}">查看前台</a>
|
|
<a href="{{ url_for('admin_logout') }}">退出</a>
|
|
</nav>
|
|
</header>
|
|
<main class="admin-main">
|
|
{% if msg %}
|
|
<p class="hint success-msg">{{ msg }}</p>
|
|
{% endif %}
|
|
{% if error %}
|
|
<p class="error-msg">{{ error }}</p>
|
|
{% endif %}
|
|
|
|
<section class="dashboard-section">
|
|
<div class="admin-topline">
|
|
<h2>举报队列</h2>
|
|
<div class="report-tabs">
|
|
{% set all_count = (status_count_map.get('pending', 0) + status_count_map.get('processed', 0) + status_count_map.get('rejected', 0)) %}
|
|
<a class="{{ 'active' if status == 'pending' else '' }}" href="{{ url_for('admin_forum_reports', status='pending') }}">待处理 {{ status_count_map.get('pending', 0) }}</a>
|
|
<a class="{{ 'active' if status == 'processed' else '' }}" href="{{ url_for('admin_forum_reports', status='processed') }}">已处理 {{ status_count_map.get('processed', 0) }}</a>
|
|
<a class="{{ 'active' if status == 'rejected' else '' }}" href="{{ url_for('admin_forum_reports', status='rejected') }}">已驳回 {{ status_count_map.get('rejected', 0) }}</a>
|
|
<a class="{{ 'active' if status == 'all' else '' }}" href="{{ url_for('admin_forum_reports', status='all') }}">全部 {{ all_count }}</a>
|
|
</div>
|
|
</div>
|
|
|
|
<table class="admin-table report-table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>类型</th>
|
|
<th>举报人</th>
|
|
<th>原因</th>
|
|
<th>目标内容</th>
|
|
<th>状态</th>
|
|
<th>举报时间</th>
|
|
<th>处理</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in report_items %}
|
|
{% set r = item.report %}
|
|
{% set t = item.target %}
|
|
<tr>
|
|
<td>#{{ r.id }}</td>
|
|
<td>{{ '帖子' if r.target_type == 'post' else '评论' }}</td>
|
|
<td>{{ item.reporter_name }}</td>
|
|
<td>
|
|
<div>{{ r.reason }}</div>
|
|
{% if r.detail %}
|
|
<div class="muted-text">{{ r.detail }}</div>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<div class="report-target-title">{{ t.title or '(无标题)' }}</div>
|
|
{% if t.author_name %}
|
|
<div class="muted-text">作者:{{ t.author_name }}</div>
|
|
{% endif %}
|
|
{% if t.content %}
|
|
<div class="muted-text">{{ t.content }}</div>
|
|
{% endif %}
|
|
<div class="muted-text">
|
|
{% if t.exists and t.post_id %}
|
|
<a href="{{ url_for('forum_post_detail', post_id=t.post_id) }}" target="_blank" rel="noopener">查看原帖</a>
|
|
{% else %}
|
|
目标内容已不存在
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="status-pill {{ 'active' if r.status == 'processed' else 'inactive' }}">
|
|
{{ status_labels.get(r.status, r.status) }}
|
|
</span>
|
|
{% if r.review_note %}
|
|
<div class="muted-text">{{ r.review_note }}</div>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ r.created_at.strftime('%Y-%m-%d %H:%M') if r.created_at else '—' }}</td>
|
|
<td>
|
|
{% if r.status == 'pending' %}
|
|
<form method="post" action="{{ url_for('admin_forum_report_process', report_id=r.id) }}" class="report-action-form">
|
|
<input type="text" name="review_note" maxlength="500" placeholder="处理备注(可选)">
|
|
<div class="report-action-buttons">
|
|
<button type="submit" name="action" value="delete_target" class="btn-danger">删除内容</button>
|
|
<button type="submit" name="action" value="keep" class="btn-inline">保留内容</button>
|
|
<button type="submit" name="action" value="reject" class="btn-inline">驳回</button>
|
|
</div>
|
|
</form>
|
|
{% else %}
|
|
<span class="muted-text">已处理</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="8">暂无举报记录。</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|