64 lines
2.9 KiB
HTML
64 lines
2.9 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>{{ page_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>{{ page_title }}</h1>
|
||
<nav>
|
||
<a href="{{ cancel_url }}">← 评论列表</a>
|
||
<a href="{{ url_for('admin_forum_posts') }}">帖子管理</a>
|
||
<a href="{{ url_for('admin_users') }}">用户管理</a>
|
||
<a href="{{ url_for('admin_forum_tracking') }}">埋点看板</a>
|
||
<a href="{{ url_for('admin_dashboard') }}">总览</a>
|
||
<a href="{{ url_for('admin_logout') }}">退出</a>
|
||
</nav>
|
||
</header>
|
||
<main class="admin-main">
|
||
<section class="dashboard-section">
|
||
{% if error %}
|
||
<p class="error-msg">{{ error }}</p>
|
||
{% endif %}
|
||
<form method="post" action="{{ action_url }}" class="admin-form">
|
||
<div class="form-row">
|
||
<div class="form-group">
|
||
<label for="post_id">所属帖子 *</label>
|
||
<select id="post_id" name="post_id" required>
|
||
<option value="">请选择帖子</option>
|
||
{% for p in post_options %}
|
||
<option value="{{ p.id }}" {{ 'selected' if selected_post_id == p.id else '' }}>#{{ p.id }} {{ p.title }}</option>
|
||
{% endfor %}
|
||
</select>
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="user_id">作者 *</label>
|
||
<select id="user_id" name="user_id" required>
|
||
<option value="">请选择作者</option>
|
||
{% for u in user_options %}
|
||
<option value="{{ u.id }}" {{ 'selected' if selected_user_id == u.id else '' }}>{{ u.username }}</option>
|
||
{% endfor %}
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="content">评论内容 *</label>
|
||
<textarea id="content" name="content" rows="8" required minlength="2" placeholder="至少 2 个字符">{{ content_val or '' }}</textarea>
|
||
</div>
|
||
{% if comment_id %}
|
||
<p class="admin-note">当前编辑评论 ID:#{{ comment_id }}</p>
|
||
{% endif %}
|
||
<div class="form-actions">
|
||
<button type="submit">{{ submit_text }}</button>
|
||
<a href="{{ cancel_url }}" class="btn-cancel">取消</a>
|
||
</div>
|
||
</form>
|
||
</section>
|
||
</main>
|
||
</body>
|
||
</html>
|