{{ photo.comments|length }} 评论 最新 {% if current_user == photo.author %}
{% endif %}


{% if comments %} {% for comment in comments %}
{{ comment.author.name }} {% if comment.author == photo.author %} Author {% endif %} {{ moment(comment.timestamp).fromNow(refresh=True) }} {% if current_user.is_authenticated %} {% if current_user != comment.author %} 回复 {% endif %} {% if current_user == comment.author or current_user == photo.author or current_user.can('MODERATE') %} 删除 {% endif %} {% if current_user != comment.author %}
{% endif %}
{% endif %}

{% if comment.replied %} Reply {{ comment.replied.author.name }}: {% endif %} {{ comment.body }}


{% endfor %} {% else %}

无评论

{% endif %} {% if photo.can_comment %} {% if current_user.is_authenticated %} {% if current_user.can('COMMENT') %} {% if request.args.get('reply') %}
回复给 {{ request.args.get('author') }}: 取消
{% endif %}
{{ render_form(comment_form, action=url_for('.new_comment', photo_id=photo.id, page=pagination.pages or 1, reply=request.args.get('reply')), extra_classes="text-right") }}
{% else %}

无权限

{% endif %} {% else %}

登陆 or 注册 写下评论

{% endif %} {% else %}

评论失败

{% endif %}