{% extends "base.html" %} {% import "macro.html" as macro %} {% block title %} 文档 {% endblock %} {% block style %} {{ super() }} {% endblock %} {% block context %}
{% if current_user.check_role("ReadBlog") %} {# 检查是否具有读取权限 #}

{{ article.title }} {{ article.subtitle }} {{ article.update_time}}

{% for archive in article.archive %} {{ archive.name }} {% endfor %} 下载
{{ article.context | safe }}
{% endif %} {% if current_user.check_role("ReadComment") %}

评论

{{ form.hidden_tag() }} {{ form.context(class="form-control mb-2", rows="3") }}

{% for comment in article.comment %} {% if show_delete %} {% endif %}

{% if show_email %} {# 判断是否可读取用户信息 #} {{ comment.auth.email }} {% else %} {{ comment.auth.s_email }} {% endif %} {% if show_delete %} × {% endif %}
{{ comment.update_time }}

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

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