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

{{ article.title }} {{ article.subtitle }} {{ moment(article.update_time).format('YYYY-MM-DD HH:mm:ss') }} / {{ moment(article.create_time).format('YYYY-MM-DD HH:mm:ss') }}

点击量: {{ article.clicks }} {% for archive in article.archive %} {{ archive.name }} {% endfor %} 下载
{% if can_update %} {{ view.hidden_tag() }} {{ view.blog_id() }} {% endif %}
{{ view.content(class="form-control mb-2", style="display:none;") }}
{% for error in view.content.errors %}
{{ error }}
{% endfor %} {% if can_update %} {% endif %}
{% if can_update %}
更新博文 {% if article.top %} 取消置顶 {% else %} 置顶文章 {% endif %} 更新归档
{% endif %}
{% endif %}
{% if current_user.check_role("WriteComment") %}
{{ form.hidden_tag() }}
{{ form.content(class="form-control mb-2", rows="3") }} {% for error in form.content.errors %}
{{ error }}
{% endfor %}

{% endif %} {% if current_user.check_role("ReadComment") %} {% for comment in article.comment %} {{ render_comment(comment, show_delete) }} {% endfor %} {% endif %}
{% endblock %} {% block javascript %} {{ super() }} {% endblock %}