Files
ap-ds-git-code/templates/admin_feedbacks.html
T

62 lines
2.6 KiB
HTML

{% extends "base.html" %}
{% block title %}反馈管理 - ap_ds{% endblock %}
{% block content %}
<div class="repo-container">
<div class="repo-flex repo-justify-between repo-items-center repo-mb-6">
<h1 class="repo-text-2xl repo-font-bold">反馈管理</h1>
<a href="{{ url_for('admin_dashboard') }}" class="repo-btn repo-btn--ghost">返回仪表板</a>
</div>
<div class="repo-card">
<div class="repo-card__body">
{% if feedbacks %}
<table class="repo-table">
<thead>
<tr>
<th>ID</th>
<th>时间</th>
<th>邮箱</th>
<th>内容</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for f in feedbacks|reverse %}
<tr>
<td>{{ f.id }}</td>
<td class="repo-text-sm">{{ f.created }}</td>
<td class="repo-text-sm">{{ f.email }}</td>
<td class="repo-text-sm" style="max-width: 400px;">
<div class="repo-line-clamp-2">{{ f.content }}</div>
</td>
<td>
{% if f.status == 'unread' %}
<span class="repo-tag repo-tag--danger">未读</span>
{% else %}
<span class="repo-tag repo-tag--default">已读</span>
{% endif %}
</td>
<td>
<div class="repo-flex repo-gap-2">
{% if f.status == 'unread' %}
<a href="{{ url_for('admin_feedback_mark_read', feedback_id=f.id) }}" class="repo-btn repo-btn--sm repo-btn--primary">标记已读</a>
{% endif %}
<a href="{{ url_for('admin_feedback_delete', feedback_id=f.id) }}"
class="repo-btn repo-btn--sm repo-btn--danger"
onclick="return confirm('确定要删除这条反馈吗?')">删除</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="repo-text-secondary repo-text-center">暂无反馈</p>
{% endif %}
</div>
</div>
</div>
{% endblock %}