{% extends 'base.html' %} {% from 'bootstrap5/form.html' import render_form %} {% from 'bootstrap5/pagination.html' import render_pagination %} {% from 'macros.html' import render_inline_form %} {% block title %}{{ post.title }}{% endblock %} {% block content %}
{{ pagination.total }} Comments latest {% if current_user.is_authenticated %}
{{ render_inline_form(
action=url_for('admin.set_comment', post_id=post.id, next=request.full_path),
button_style='outline-warning' if post.can_comment else 'outline-success',
button_text='Disable Comment' if post.can_comment else 'Enable Comment',
confirm=None,
) }}
{% endif %}
{% if comments %}{% for comment in comments %}-
{% if comment.replied %}
Reply
{% if current_user.is_authenticated %}
Email
{{ render_inline_form(
action=url_for('admin.delete_comment', comment_id=comment.id, next=request.full_path),
button_style='outline-danger',
button_text='Delete',
) }}
{% endif %}
{% endfor %}
{% else %}{% if comment.from_admin %}{{ admin.name }}{% else %}{{ comment.author }}{% endif %} {% if comment.from_admin %}Author{% endif %}
{{ comment.created_at }}{{ comment.replied.author }}:
{% endif %}{{ comment.replied.body }}
{{ comment.body }}
No comments.