{# app/templates/admin/manage_notifications.html (新文件) #} {% extends "dashboard_base.html" %} {% block dashboard_content %}

通知管理

发布新公告或管理现有通知

创建新通知
{{ form.hidden_tag() }}
{{ form.title.label(class="form-label fw-bold small text-uppercase text-muted") }} {{ form.title(class="form-control", placeholder="输入通知标题") }}
{{ form.content.label(class="form-label fw-bold small text-uppercase text-muted") }} {{ form.content(class="form-control", rows=3, placeholder="输入通知内容...") }}
{{ form.submit(class="btn btn-primary px-4") }}
{% for notification in notifications %}
{{ notification.title }}
{% if notification.is_published %} 已发布 {% else %} 草稿 {% endif %}

{{ notification.content }}

{{ notification.author.username }} • {{ notification.timestamp.strftime('%Y-%m-%d %H:%M') }}
{% else %}

暂无通知

{% endfor %}
{% endblock %}