|
|
@ -21,13 +21,18 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endmacro %}
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
{% macro render_comment(comment, editform) %}
|
|
|
|
{% macro render_comment(comment, editform, comment_link=None, user_link=None) %}
|
|
|
|
<article id="comment-{{ comment.id }}" class="comment editingable">
|
|
|
|
<article id="comment-{{ comment.id }}" class="comment editingable">
|
|
|
|
<form action="{{ url_for('post.comment') }}" method="post">
|
|
|
|
<form action="{{ url_for('post.comment') }}" method="post">
|
|
|
|
{{ editform.csrf_token }}
|
|
|
|
{{ editform.csrf_token }}
|
|
|
|
{{ editform.id() }}
|
|
|
|
{{ editform.id() }}
|
|
|
|
<div class="comment-head">
|
|
|
|
<div class="comment-head">
|
|
|
|
<a href="{{ url_for('user.profile', username=comment.user.username).replace('%40', '@') }}"><h4>{{ comment.user.username or "Deleted account" }}</h4></a>
|
|
|
|
<div class="head-left">
|
|
|
|
|
|
|
|
{%if user_link%}<a href="{{ user_link }}">{%endif-%}
|
|
|
|
|
|
|
|
<h4>{{ comment.user.username or "Deleted account" }}</h4>
|
|
|
|
|
|
|
|
{%-if user_link%}</a>{%endif%}
|
|
|
|
|
|
|
|
<span class="time">Posted {{ comment.natural_created() }}{%if comment.created!=comment.updated%}, edited {{ comment.natural_updated() }}{%endif%}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<span class="controls">
|
|
|
|
<span class="controls">
|
|
|
|
{% if current_user.is_moderator %}
|
|
|
|
{% if current_user.is_moderator %}
|
|
|
|
{% if not comment.deleted %}
|
|
|
|
{% if not comment.deleted %}
|
|
|
@ -47,7 +52,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div class="comment-editform baseform">
|
|
|
|
<div class="comment-editform baseform">
|
|
|
|
{% if not comment.deleted or comment.is_author or current_user.is_moderator %}
|
|
|
|
{% if not comment.deleted or comment.is_author or current_user.is_moderator %}
|
|
|
|
|
|
|
|
{%if comment_link%}<a href="{{ comment_link }}">{%endif-%}
|
|
|
|
<p class="{%if comment.is_author%}jsoff-show {%endif%}comment-content notedit">{{ comment.content }}</p>
|
|
|
|
<p class="{%if comment.is_author%}jsoff-show {%endif%}comment-content notedit">{{ comment.content }}</p>
|
|
|
|
|
|
|
|
{%-if comment_link%}</a>{%endif%}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if comment.is_author %}
|
|
|
|
{% if comment.is_author %}
|
|
|
|
{{ editform.content(class="jsoff-show edit") }}
|
|
|
|
{{ editform.content(class="jsoff-show edit") }}
|
|
|
|