mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-02 16:21:32 -08:00
update continue_discussion with latest comment display code
This commit is contained in:
parent
7afcb20d08
commit
a8ef0e9d75
1 changed files with 37 additions and 12 deletions
|
@ -9,29 +9,38 @@
|
|||
<div class="row post_replies">
|
||||
<div class="col">
|
||||
{% macro render_comment(comment) %}
|
||||
<div id="comment_{{ comment['comment'].id }}" class="comment">
|
||||
<div id="comment_{{ comment['comment'].id }}" class="comment {% if comment['comment'].author.id == post.author.id %}original_poster{% endif %}">
|
||||
<div class="limit_height">
|
||||
<div class="voting_buttons">
|
||||
{% with comment=comment['comment'] %}
|
||||
{% include "post/_voting_buttons.html" %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="hide_button"><a href='#'>[-] hide</a></div>
|
||||
<div class="comment_author">
|
||||
{% if comment['comment'].author.deleted %}
|
||||
[deleted]
|
||||
{% else %}
|
||||
{% if comment['comment'].author.avatar_id %}
|
||||
{% if comment['comment'].author.avatar_id and comment['comment'].score > -10 and not low_bandwidth %}
|
||||
<a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.ap_id }}">
|
||||
<img src="{{ comment['comment'].author.avatar_image() }}" alt="Avatar" /></a>
|
||||
{% endif %}
|
||||
<a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.link() }}">
|
||||
<strong>{{ comment['comment'].author.user_name}}</strong></a>
|
||||
{{ comment['comment'].author.display_name() }}</a>
|
||||
{% endif %}
|
||||
{% if comment['comment'].author.created_recently() %}
|
||||
<span class="fe fe-new-account small" title="New account"> </span>
|
||||
{% endif %}
|
||||
{% if comment['comment'].author.id != current_user.id %}
|
||||
{% if comment['comment'].author.reputation < -10 %}
|
||||
<span class="fe fe-warning red" title="Very low reputation. Beware."> </span>
|
||||
<span class="fe fe-warning red" title="Very low reputation. Beware!"> </span>
|
||||
{% elif comment['comment'].author.reputation < 0 %}
|
||||
<span class="fe fe-warning orangered" title="Low reputation."> </span>
|
||||
{% endif %}
|
||||
{% if comment['comment'].author.id == post.author.id%}<span title="Submitter of original post" aria-label="submitter">[S]</span>{% endif %}
|
||||
<span class="text-muted small">{{ moment(comment['comment'].posted_at).fromNow(refresh=True) }}</span>
|
||||
{% endif %}
|
||||
{% if comment['comment'].author.id == post.author.id %}<span title="Submitter of original post" aria-label="submitter" class="small">[OP]</span>{% endif %}
|
||||
<span class="text-muted small">{{ moment(comment['comment'].posted_at).fromNow(refresh=True) }}{% if comment['comment'].edited_at %}, edited {{ moment(comment['comment'].edited_at).fromNow(refresh=True) }} {% endif %}</span>
|
||||
<a class="unhide" href="#"><span class="fe fe-expand"></span></a>
|
||||
{% if comment['comment'].reports and current_user.is_authenticated and post.community.is_moderator(current_user)%}
|
||||
<span class="red fe fe-report" title="{{ _('Reported. Check comment for issues.') }}"></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="comment_body hidable">
|
||||
<div class="comment_body hidable {% if comment['comment'].reports and current_user.is_authenticated and post.community.is_moderator(current_user) %}reported{% endif %}">
|
||||
{{ comment['comment'].body_html | safe }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -39,6 +48,22 @@
|
|||
{% if post.comments_enabled %}
|
||||
<a href="{{ url_for('post.add_reply', post_id=post.id, comment_id=comment['comment'].id) }}" rel="nofollow"><span class="fe fe-reply"></span> reply</a>
|
||||
{% endif %}
|
||||
<div class="voting_buttons_new">
|
||||
{% with comment=comment['comment'] %}
|
||||
{% include "post/_comment_voting_buttons.html" %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="hide_button">
|
||||
{% if comment['comment'].score <= -10 %}
|
||||
<a href='#'><span class="fe fe-expand"></span></a>
|
||||
{% else %}
|
||||
<a href='#'><span class="fe fe-collapse"></span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if current_user.is_authenticated and current_user.verified and current_user.id == comment['comment'].author.id %}
|
||||
{% include "post/_reply_notification_toggle.html" %}
|
||||
{% endif %}
|
||||
<a href="{{ url_for('post.post_reply_options', post_id=post.id, comment_id=comment['comment'].id) }}" class="comment_actions_link" rel="nofollow"><span class="fe fe-options" title="Options"> </span></a>
|
||||
</div>
|
||||
{% if comment['replies'] %}
|
||||
<div class="replies hidable">
|
||||
|
|
Loading…
Add table
Reference in a new issue