{% extends "base.html" %} {% import "macro.html" as macro %} {% block title %} 留言 {% endblock %} {% block style %} {{ super() }} {% endblock %} {% block context %}
{{ form.hidden_tag() }} {{ form.context(class="form-control mb-2", rows="5") }} {{ form.secret() }} {{ form.secret.label }}

{% if current_user.check_role("ReadMsg") %} {# 检查是否具有读取权限 #}
{% for msg in msg_list %}
{% if show_delete %} {% endif %}

{% if show_email %} {# 判断是否可读取用户信息 #} {{ msg.auth.email }} {% else %} {{ msg.auth.s_email }} {% endif %} {% if show_delete %} × {% endif %}
{{ msg.update_time }} {% if msg.secret == is_secret %} [私密留言] {% endif %}

{{ msg.context.replace('\n', '
') | safe }}

{% endfor %}
{% endif %}
{% endblock %}