MarseyWorld/files/templates/comments.html

532 lines
40 KiB
HTML
Raw Normal View History

2021-07-21 01:12:26 +00:00
{% macro single_comment(c, level=1) %}
<!---beginning of comment {{c.id}}--->
<script>
var date = new Date('{{c.created_datetime}}');
document.getElementById('timestamp-{{c.id}}').title = date.toString();
</script>
{% set ups=c.upvotes %}
{% set downs=c.downvotes %}
{% set score=ups-downs %}
{% include "emoji_modal.html" %}
2021-08-23 18:52:56 +00:00
{% if v and v.shadowbanned %}
{% set replies=c.replies3 %}
{% else %}
{% set replies=c.replies %}
{% endif %}
2021-07-21 01:12:26 +00:00
<!--conditions under which a comment might be hidden-->
2021-07-26 01:26:04 +00:00
{% if (c.is_banned or c.deleted_utc > 0 or c.is_blocking or c.is_blocked) and not (v and v.admin_level>0) and not (v and v.id==c.author_id) %}
2021-07-30 05:31:38 +00:00
<div id="comment-{{c.id}}" class="comment">
2021-07-21 01:12:26 +00:00
2021-07-30 05:31:38 +00:00
<span class="comment-collapse-desktop d-none d-md-block" style="border-left: 2px solid #{{c.author.namecolor}};" onclick="collapse_comment('{{c.id}}')"></span>
2021-07-21 01:12:26 +00:00
<div class="comment-body">
2021-07-30 05:31:38 +00:00
<div id="comment-{{c.id}}-only" class="">
2021-07-21 01:12:26 +00:00
<div class="user-info">
2021-07-30 05:31:38 +00:00
<span class="comment-collapse d-md-none" onclick="collapse_comment('{{c.id}}')"></span>
2021-07-21 01:12:26 +00:00
{% if standalone and c.over_18 %}<span class="badge badge-danger">+18</span> {% endif %}
2021-08-23 22:00:22 +00:00
[{% if c.is_banned %}Removed by admins{% elif c.deleted_utc > 0 %}Deleted by author{% elif c.is_blocking %}You are blocking @{{c.author.username}}{% elif c.is_blocked %}This user has blocked you{% endif %}]
2021-07-21 01:12:26 +00:00
</div>
<div id="comment-banned-warning" class="comment-text text-danger text-small">
{% if c.is_banned and c.ban_reason %}Reason: {{c.ban_reason}}{% endif %}
</div>
</div>
{% if render_replies %}
2021-08-30 13:06:22 +00:00
{% if level<7 %}
2021-07-30 05:31:38 +00:00
<div id="replies-of-{{c.id}}" class="">
2021-07-21 01:12:26 +00:00
{% set standalone=False %}
2021-08-23 18:52:56 +00:00
{% for reply in replies %}
2021-07-21 01:12:26 +00:00
{{single_comment(reply, level=level+1)}}
{% endfor %}
</div>
2021-08-23 18:52:56 +00:00
{% elif replies %}
2021-07-30 05:31:38 +00:00
<div id="replies-of-{{c.id}}" class="d-none d-md-block">
2021-07-21 01:12:26 +00:00
{% set standalone=False %}
2021-08-23 18:52:56 +00:00
{% for reply in replies %}
2021-07-21 01:12:26 +00:00
{{single_comment(reply, level=level+1)}}
{% endfor %}
</div>
2021-07-30 05:31:38 +00:00
<div id="morecomment-{{c.id}}" class="d-block d-md-none mt-2 more-comments text-small">
2021-09-02 20:33:48 +00:00
<a {% if v %}href="{{c.permalink}}?context=5#context"{% else %}href="/logged_out{{c.permalink}}?context=5#context"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
2021-07-21 01:12:26 +00:00
</div>
{% endif %}
{% endif %}
</div>
</div>
{% else %}
{% set score=c.score %}
{% if v %}
2021-08-07 23:03:15 +00:00
{% set voted=c.voted %}
2021-07-21 01:12:26 +00:00
{% else %}
{% set voted=-2 %}
{% endif %}
{% if standalone and level==1 %}
<div class="post-info mt-5 mb-1 mr-2">
{% if c.post and c.post.over_18 %}<span class="badge badge-danger text-small-extra mr-1">+18</span>{% endif %}
<span class="align-top">
2021-08-21 07:02:11 +00:00
{% if c.post %}
2021-07-21 01:12:26 +00:00
{% if c.author_id==v.id and c.child_comments and is_notification_page%}
<span class="font-weight-bold">Comment {{'Replies' if (c.child_comments | length)>1 else 'Reply'}}: <a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
2021-07-25 21:59:20 +00:00
{% elif c.post.author_id==v.id and c.level == 1 and is_notification_page%}
<span class="font-weight-bold">Post Reply: <a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
2021-07-21 01:12:26 +00:00
{% elif is_notification_page and c.parent_submission in v.subscribed_idlist() %}
<span class="font-weight-bold">Subscribed Thread: <a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
2021-07-21 01:12:26 +00:00
{% elif is_notification_page %}
<span class="font-weight-bold">Username Mention: <a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
2021-07-21 01:12:26 +00:00
{% else %}
<span class="font-weight-bold"><a href="{{c.post.permalink}}">{{c.post.realtitle(v) | safe}}</a></span>
2021-07-21 01:12:26 +00:00
{% endif %}
2021-08-21 11:06:28 +00:00
{% elif c.author_id==NOTIFICATIONS_ACCOUNT or c.author_id==AUTOJANNY_ACCOUNT %}
2021-08-19 05:14:52 +00:00
<span class="font-weight-bold">{{'SITE_NAME' | app_config}} Notification</span>
2021-07-21 01:12:26 +00:00
{% else %}
<span class="font-weight-bold">Private Message</span>
{% endif %}
</span>
</div>
{% endif %}
2021-09-01 22:36:22 +00:00
<div id="comment-{{c.id}}" class="{% if c.unread %}context{% endif %} comment {% if standalone and level==1 %} mt-0{% endif %}{% if c.collapse_for_user(v) or (standalone and c.over_18 and not (v and v.over_18)) %} collapsed{% endif %}" style="border-left: 2px solid #{{c.author.namecolor}}; {% if c.unread %}padding: 10px 10px 10px !important;{% endif %}">
2021-07-21 01:12:26 +00:00
2021-09-01 15:59:30 +00:00
<span class="comment-collapse-desktop d-none d-md-block" {% if not c.unread %}style="border-left: 2px solid #{{c.author.namecolor}};"{% endif %} onclick="collapse_comment('{{c.id}}')"></span>
2021-07-21 01:12:26 +00:00
<div class="comment-body">
2021-09-05 13:05:45 +00:00
<div id="{% if comment_info and comment_info.id == c.id %}context{%else%}comment-{{c.id}}-only{% endif %}" class="{% if comment_info and comment_info.id == c.id %}context{%endif%}{% if c.is_banned %} banned{% endif %}{% if c.deleted_utc %} deleted{% endif %}">
2021-07-21 01:12:26 +00:00
2021-08-11 18:08:14 +00:00
<div class="user-info">
2021-07-30 05:31:38 +00:00
<span class="comment-collapse d-md-none" onclick="collapse_comment('{{c.id}}')"></span>
2021-09-05 13:04:57 +00:00
2021-09-05 19:20:32 +00:00
{% if last_view_utc and c.created_utc > last_view_utc and not (v and v.id==c.author_id) and (not v or v.highlightcomments) %}<i style="color:red !important" class="text-admin fas fa-circle" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Unread"></i>{% endif %}
2021-09-05 13:04:57 +00:00
2021-08-03 10:39:09 +00:00
{% if c.awards %}
{% for a in c.awards[:5] %}
<i class="{{a.class_list}} px-1" data-toggle="tooltip" data-placement="bottom" title="{{a.title}} Award given by @{{a.user.username}}"></i>
{% endfor %}
{% endif %}
2021-08-11 22:26:04 +00:00
2021-08-11 22:28:11 +00:00
{% if c.bannedfor %}
2021-08-11 22:26:04 +00:00
<a href="javascript:void(0)"><i class="fad fa-gavel text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="User was banned for this comment by @{{c.author.banned_by.username}}"></i></a>
{% endif %}
2021-08-22 13:21:10 +00:00
{% if c.active_flags %}<a class="btn btn-primary" style="padding:1px 5px; font-size:10px;" href="javascript:void(0)" onclick="document.getElementById('flaggers-{{c.id}}').classList.toggle('d-none')">{{c.active_flags}} Reports</a>{% endif %}
{% if c.over_18 %}<span class="badge badge-danger text-small-extra mr-1">+18</span>{% endif %}
{% if v and v.admin_level==6 and c.author.shadowbanned %}<i class="fas fa-user-times text-admin" data-toggle="tooltip" data-placement="bottom" title="Shadowbanned user"></i>{% endif %}
{% if c.is_pinned %}<i class="text-admin fas fa-thumbtack fa-rotate--45" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Pinned comment"></i>{% endif %}
{% if c.distinguish_level %}<i class="fas fa-broom text-admin" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{'SITE_NAME' | app_config}} Admin, speaking officially"></i>{% endif %}
{% if c.is_op %}<i class="fas fa-microphone-stand text-info" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="OP"></i>{% endif %}
{% if c.is_bot %}<i class="fad fa-robot text-info" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Bot"></i>{% endif %}
{% if c.is_blocking %}<i class="fas fa-user-minus text-warning" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{% if v and v.admin_level >= 2 %}You're blocking this user, but you can see this comment because {{'it\'s an admin comment' if c.distinguish_level else 'you\'re an admin'}}.{% else %}Comment author is banned{% endif %}"></i>{% endif %}
{% if c.is_blocked %}<i class="fas fa-user-minus text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="This user is blocking you, but you can see this comment because {{'it\'s an admin comment' if c.distinguish_level else 'you\'re an admin'}}."></i>{% endif %}
2021-07-21 01:12:26 +00:00
2021-08-26 21:12:38 +00:00
{% if c.author.verified %}<i class="fas fa-badge-check align-middle ml-1" style="color:#1DA1F2" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{c.author.verified}}"></i>
2021-08-21 16:07:07 +00:00
{% endif %}
2021-08-21 15:17:49 +00:00
2021-09-10 21:47:15 +00:00
<a {% if v %}href="{{c.author.url}}"{% else %}href="/logged_out{{c.author.url}}"{% endif %} style="color:#{{c.author.namecolor}}; font-size:12px; font-weight:bold;"><img loading="lazy" src="{{c.author.profile_url}}" class="profile-pic-25 mr-2"/><span {% if c.author.patron and not c.distinguish_level %}class="patron" style="background-color:#{{c.author.namecolor}};"{% elif c.distinguish_level %}class="mod"{% endif %}>{{c.author.username}}</span></a>{% if c.author.customtitle %}&nbsp;<bdi style="color: #{{c.author.titlecolor}}">&nbsp;{% if c.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/PCM/quadrants/{{c.author.quadrant}}.gif">{% endif %}{{c.author.customtitle | safe}}</bdi>{% endif %}
2021-07-21 01:12:26 +00:00
<span id="timestamp-{{c.id}}" data-toggle="tooltip" data-placement="bottom" title="" class="time-stamp">&nbsp;{{c.age_string}}</span>
{% if c.edited_utc %}
<span class="time-edited"><span>&#183;</span> <span class="font-italic">Edited {{c.edited_string}}</span></span>
{% endif %}
</div>
2021-08-21 12:44:02 +00:00
{% if c.active_flags %}
<div id="flaggers-{{c.id}}" class="flaggers d-none">
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
<pre></pre>
<ul style="padding-left:20px; margin-bottom: 0;">
{% for f in c.ordered_flags %}
2021-09-06 22:17:33 +00:00
{% if not f.user.shadowbanned or (v and v.shadowbanned) %}
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.reason | safe}}{% endif %} {% if v.admin_level==6 %}<a href="javascript:void(0)" onclick="post_toast('/del_report/c{{ f.id }}')">[remove]</a>{% endif %}</li>
{% endif %}
2021-08-21 12:44:02 +00:00
{% endfor %}
</ul>
</div>
{% endif %}
2021-07-21 01:12:26 +00:00
{% if c.is_banned and c.ban_reason %}
<div id="comment-banned-warning" class="comment-text text-danger text-small mb-0">Reason: {{c.ban_reason}}</div>
{% endif %}
2021-07-30 05:31:38 +00:00
<div id="comment-text-{{c.id}}" class="comment-text mb-0">
2021-07-21 01:12:26 +00:00
{{c.realbody(v) | safe}}
2021-08-21 11:06:28 +00:00
{% if not c.parent_submission and c.author_id!=NOTIFICATIONS_ACCOUNT and c.author_id!=AUTOJANNY_ACCOUNT and c.author_id!=v.id %}
2021-08-31 17:24:29 +00:00
<a class="btn btn-primary" href="javascript:void(0)" onclick="document.getElementById('reply-m-{{c.id}}').classList.toggle('d-none')">Reply</a>
<pre></pre>
<div id="reply-m-{{c.id}}" class="d-none">
2021-08-31 17:26:52 +00:00
<div id="comment-form-space-{{c.id}}" class="comment-write collapsed child">
2021-08-31 17:25:08 +00:00
<form id="reply-to-message-{{c.id}}" action="/reply" method="post" class="input-group" enctype="multipart/form-data">
2021-08-31 17:24:29 +00:00
<input type="hidden" name="formkey" value="{{v.formkey}}">
<textarea name="body" form="reply-to-t3_{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.id}}" aria-label="With textarea" rows="3"></textarea>
<div class="comment-format" id="comment-format-bar-{{c.id}}">
<label class="btn btn-secondary format d-inline-block m-0" for="gif-reply-btn-{{c.id}}">
2021-08-31 17:24:29 +00:00
<span id="gif-reply-btn-{{c.id}}" class="font-weight-bolder text-uppercase" onclick="commentForm('reply-form-body-{{c.id}}');getGif()" aria-hidden="true" data-toggle="modal" data-target="#gifModal" data-toggle="tooltip" data-placement="bottom" title="Add GIF">GIF</span>
</label>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="gif-reply-btn-{{c.id}}">
2021-08-31 17:24:29 +00:00
<i id="emoji-reply-btn-{{c.id}}" class="fas fa-smile-beam" onclick="loadEmojis('reply-form-body-{{c.id}}')" aria-hidden="true" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"></i>
</label>
&nbsp;
<a href="javascript:void(0)" onclick="document.getElementById('reply-m-{{c.id}}').classList.add('d-none')" class="d-none d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
2021-08-31 17:25:59 +00:00
<a id="save-reply-to-{{c.id}}" class="d-none d-md-block btn btn-primary text-white ml-2" onclick="post_reply('{{c.id}}');" href="javascript:void(0)">Reply</a>
2021-08-31 17:24:29 +00:00
</div>
<a href="javascript:void(0)" onclick="document.getElementById('reply-m-{{c.id}}').classList.add('d-none')" class="d-block d-md-none btn btn-link text-muted ml-auto cancel-form">Cancel</a>
2021-08-31 17:25:59 +00:00
<a id="save-reply-to-{{c.id}}" class="d-block d-md-none btn btn-primary text-white ml-2" onclick="post_reply('{{c.id}}');" href="javascript:void(0)">Reply</a>
2021-08-31 17:24:29 +00:00
</form>
</div>
2021-08-31 17:14:09 +00:00
</div>
2021-07-21 01:12:26 +00:00
{% endif %}
2021-08-31 17:24:29 +00:00
</div>
2021-07-21 01:12:26 +00:00
{% if c.parent_submission %}
2021-08-31 16:50:06 +00:00
{% if v and v.id==c.author_id %}
<div id="comment-edit-{{c.id}}" class="d-none comment-write collapsed child">
<form id="comment-edit-form-{{c.id}}" action="/edit_comment/{{c.id}}" method="post" class="input-group" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<textarea id="comment-edit-body-{{c.id}}" name="body" form="comment-edit-form-{{c.id}}" class="comment-box form-control rounded" id="edit-box-comment-{{c.id}}" aria-label="With textarea" placeholder="Add your comment..." rows="3">{{c.body}}</textarea>
<div class="comment-format">
<small class="btn btn-secondary format d-inline-block m-0"><span class="font-weight-bolder text-uppercase" aria-hidden="true" onclick="commentForm('comment-edit-body-{{c.id}}');getGif()" data-toggle="modal" data-target="#gifModal" data-toggle="tooltip" data-placement="bottom" title="Add GIF">GIF</span></small>
&nbsp;
<small class="btn btn-secondary format d-inline-block m-0"><i class="fas fa-smile-beam" aria-hidden="true" onclick="loadEmojis('comment-edit-body-{{c.id}}')" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"></i></small>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="file-edit-reply-{{c.id}}">
2021-08-31 16:50:06 +00:00
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
</label>
<a id="cancel-edit-{{c.id}}" href="javascript:void(0)" onclick="toggleEdit('{{c.id}}')" class="d-none d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
<a href="javascript:void(0)" form="comment-edit-form-{{c.id}}" class="d-none d-md-block btn btn-primary ml-2" onclick="comment_edit('{{c.id}}')">Save Edit</a>
</div>
<a id="cancel-edit-{{c.id}}" href="javascript:void(0)" onclick="toggleEdit('{{c.id}}')" class="d-block d-md-none btn btn-link text-muted ml-auto cancel-form">Cancel</a>
<a href="javascript:void(0)" form="comment-edit-form-{{c.id}}" class="d-block d-md-none btn btn-primary ml-2" onclick="comment_edit('{{c.id}}')">Save Edit</a>
</form>
</div>
{% endif %}
2021-07-28 02:46:49 +00:00
2021-08-31 16:50:06 +00:00
<div id="comment-{{c.id}}-actions" class="comment-actions{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
<ul class="list-inline text-right text-md-left">
2021-07-21 01:12:26 +00:00
2021-08-31 16:50:06 +00:00
{% if v and request.path.startswith('/@') and v.admin_level == 0%}
2021-09-08 20:47:41 +00:00
{% if voted==1 %}
<li class="list-inline-item arrow-up d-none d-md-inline-block mr-2 comment-{{c.id}}-up active"></li>
{% endif %}
2021-08-31 16:50:06 +00:00
{% elif v %}
2021-07-21 01:12:26 +00:00
2021-09-08 20:47:41 +00:00
<li id="comment-{{c.id}}-up" tabindex="0" class="list-inline-item arrow-up upvote-button d-none d-md-inline-block mr-2 comment-{{c.id}}-up {% if voted==1 %}active{% endif %}" data-id-up="{{c.id}}" data-content-type="comment"></li>
2021-07-21 01:12:26 +00:00
2021-08-31 16:50:06 +00:00
{% else %}
2021-09-08 20:47:41 +00:00
<li id="comment-{{c.id}}-up" tabindex="0" class="list-inline-item arrow-up d-none d-md-inline-block mr-2" onclick="location.href='/login';"></li>
2021-07-21 01:12:26 +00:00
2021-08-31 16:50:06 +00:00
{% endif %}
2021-07-21 01:12:26 +00:00
2021-08-31 16:50:06 +00:00
<li class="list-inline-item d-none d-md-inline-block mr-2">
<span class="points" data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"><span id="comment-score-{{c.id}}" class="score comment-score-{{c.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}">{{score}}</span></span>
</li>
2021-07-21 01:12:26 +00:00
2021-08-31 16:50:06 +00:00
{% if v and request.path.startswith('/@') and v.admin_level == 0 %}
2021-09-08 20:47:41 +00:00
{% if voted==-1 %}
<li class="list-inline-item arrow-down d-none d-md-inline-block mr-2 comment-{{c.id}}-down active"></li>
{% endif %}
2021-08-31 16:50:06 +00:00
2021-09-06 16:46:56 +00:00
{% elif v %}
2021-09-08 20:47:41 +00:00
<li {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down downvote-button d-none d-md-inline-block mr-2 comment-{{c.id}}-down {% if voted==-1 %}active{% endif %}" data-id-down="{{c.id}}" data-content-type="comment"></li>
2021-07-21 01:12:26 +00:00
2021-09-06 16:46:56 +00:00
{% else %}
2021-09-06 17:03:16 +00:00
2021-09-08 20:47:41 +00:00
<li {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down d-none d-md-inline-block" onclick="location.href='/login';"></li>
2021-07-21 01:12:26 +00:00
2021-08-31 16:50:06 +00:00
{% endif %}
2021-07-21 01:12:26 +00:00
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="/votes?link={{c.fullname}}"><i class="fas fa-arrows-v"></i>Votes</a></li>
2021-09-08 21:10:11 +00:00
2021-09-10 18:54:52 +00:00
{% if v %}
<li id="unsave-{{c.id}}" class="{% if c in v.saved_comment_idlist() %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a href="javascript:void(0)" onclick="post_toast3('/unsave_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}')"><i class="fas fa-save"></i>Unsave</a></li>
2021-09-10 18:54:52 +00:00
<li id="save-{{c.id}}" class="{% if not c in v.saved_comment_idlist() %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a href="javascript:void(0)" onclick="post_toast3('/save_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}')"><i class="fas fa-save"></i>Save</a></li>
<li class="list-inline-item text-muted"><a href="javascript:void(0)" onclick="document.getElementById('reply-to-{{c.id}}').classList.remove('d-none')"><i class="fas fa-reply" aria-hidden="true"></i><span class="d-none d-md-inline-block">Reply</span></a></li>
2021-07-21 01:12:26 +00:00
2021-09-08 20:47:41 +00:00
{% if v.id!=c.author_id %}
<li class="list-inline-item text-muted"><a href="javascript:void(0)" data-toggle="modal" data-target="#awardModal" onclick="awardModal('/comment/{{c.id}}/awards')"><i class="fas fa-gift"
aria-hidden="true"></i><span class="d-none d-md-inline-block">Give Award</span></a></li>
2021-09-08 20:47:41 +00:00
{% endif %}
2021-08-31 16:50:06 +00:00
{% endif %}
2021-07-27 11:07:09 +00:00
<li class="list-inline-item text-muted d-none d-md-inline-block"><a {% if v %}href="{{c.permalink}}?context=5#context"{% else %}href="/logged_out{{c.permalink}}?context=5#context"{% endif %}><i class="fas fa-book-open"></i>Context</a></li>
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0);" role="button" class="copy-link" data-clipboard-text="{% if 'rdrama' in request.host %}https://taytay.life{{c.permalink}}{% else %}{{c.permalink | full_link}}{% endif %}/?context=5#context"><i class="fas fa-copy"></i>Copy link</a></li>
{% if v %}
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" data-toggle="modal" data-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author.username}}',)"><i class="fas fa-flag fa-fw"></i>Report</a></li>
{% else %}
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" data-toggle="modal" data-target="#reportCommentModal" onclick=""><i class="fas fa-flag fa-fw"></i>Report</a></li>
{% endif %}
2021-07-21 01:12:26 +00:00
2021-08-31 16:50:06 +00:00
{% if v and c.parent_submission and c.author_id==v.id %}
2021-07-21 01:12:26 +00:00
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" onclick="toggleEdit('{{c.id}}')"><i class="fas fa-edit fa-fw"></i>Edit</a></li>
2021-08-31 16:50:06 +00:00
<li id="delete-{{c.id}}" class="{% if not c.deleted_utc %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a href="javascript:void(0)" data-toggle="modal" data-target="#deleteCommentModal" onclick="delete_commentModal('{{c.id}}','delete-{{c.id}}','undelete-{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Delete</a></li>
2021-09-08 20:22:27 +00:00
<li id="undelete-{{c.id}}" class="{% if c.deleted_utc %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a href="javascript:void(0)" onclick="post_toast3('/undelete/comment/{{c.id}}','delete-{{c.id}}','undelete-{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Undelete</a></li>
2021-07-21 01:12:26 +00:00
{% endif %}
2021-08-31 16:50:06 +00:00
{% if v and v.admin_level==6 and v.id==c.author_id %}
<li id="undistinguish-{{c.id}}" class="list-inline-item d-none {% if c.distinguish_level %}d-md-inline-block{% endif %}"><a class="text-info" href="javascript:void(0)" onclick="admin_comment('{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','no')"><i class="fas fa-id-badge text-info fa-fw"></i>Undistinguish</a></li>
<li id="distinguish-{{c.id}}" class="list-inline-item d-none {% if not c.distinguish_level %}d-md-inline-block{% endif %}"><a class="text-info" href="javascript:void(0)" onclick="admin_comment('{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','yes')"><i class="fas fa-id-badge text-info fa-fw"></i>Distinguish</a></li>
2021-08-31 16:50:06 +00:00
{% endif %}
2021-07-28 21:31:50 +00:00
2021-08-31 16:50:06 +00:00
{% if v and not v.id==c.author_id and v.admin_level == 0 %}
<li id="unblock-{{c.id}}" class="{% if c.is_blocked %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a href="javascript:void(0)" onclick="post_toast3('/settings/block?username={{c.author.username}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw"></i>Unblock user</a></li>
<li id="block-{{c.id}}" class="{% if not c.is_blocked %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a href="javascript:void(0)" onclick="post_toast3('/settings/block?username={{c.author.username}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw"></i>Block user</a></li>
2021-08-31 16:50:06 +00:00
{% endif %}
2021-07-29 07:33:27 +00:00
2021-08-31 16:50:06 +00:00
{% if v and c.post and (v.admin_level >= 1 or v.id == c.post.author_id) and c.level == 1 %}
<li id="unpin-{{c.id}}" class="{% if c.is_pinned %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a class="text-info" href="javascript:void(0)" data-dismiss="modal" data-target="#actionsModal-{{c.id}}" onclick="post_toast3('/comment_pin/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Unpin</a></li>
2021-09-08 20:41:37 +00:00
<li id="pin-{{c.id}}" class="{% if not c.is_pinned %}d-md-inline-block{% endif %} list-inline-item text-muted d-none"><a class="text-info" href="javascript:void(0)" data-dismiss="modal" data-target="#actionsModal-{{c.id}}" onclick="post_toast3('/comment_pin/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Pin</a></li>
2021-08-31 16:50:06 +00:00
{% endif %}
2021-07-29 07:33:27 +00:00
2021-08-31 16:50:06 +00:00
{% if v and v.admin_level>=3 %}
2021-09-08 21:10:11 +00:00
{% if "/flagged/" in request.path %}
<li class="list-inline-item text-muted d-none d-md-inline-block"><a class="text-success" href="javascript:void(0)" onclick="approveComment('{{c.id}}')"><i class="fas fa-check text-success fa-fw"></i>Approve</a></li>
<li class="list-inline-item text-muted d-none d-md-inline-block"><a class="text-danger" href="javascript:void(0)" onclick="removeComment('{{c.id}}')"><i class="fas fa-ban text-danger fa-fw"></i>Remove</a></li>
2021-09-08 21:10:11 +00:00
{% else %}
<li id="approve-{{c.id}}" class="list-inline-item text-muted d-none {% if c.is_banned %}d-md-inline-block{% endif %}"><a class="text-success" href="javascript:void(0)" onclick="approveComment('{{c.id}}','approve-{{c.id}}','remove-{{c.id}}')"><i class="fas fa-check text-success fa-fw"></i>Approve</a></li>
<li id="remove-{{c.id}}" class="list-inline-item text-muted d-none {% if not c.is_banned %}d-md-inline-block{% endif %}"><a class="text-danger" href="javascript:void(0)" onclick="removeComment('{{c.id}}','approve-{{c.id}}','remove-{{c.id}}')"><i class="fas fa-ban text-danger fa-fw"></i>Remove</a></li>
2021-09-08 21:10:11 +00:00
{% endif %}
2021-07-29 07:29:23 +00:00
{% endif %}
2021-08-31 16:50:06 +00:00
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 0) %}
<li id="unmark-{{c.id}}" class="list-inline-item d-none {% if c.over_18 %}d-md-inline-block{% endif %}"><a class="text-danger" href="javascript:void(0)" onclick="post_toast3('/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Unmark +18</a></li>
<li id="mark-{{c.id}}" class="list-inline-item d-none {% if not c.over_18 %}d-md-inline-block{% endif %}"><a class="text-danger" href="javascript:void(0)" onclick="post_toast3('/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Mark +18</a></li>
2021-08-31 16:50:06 +00:00
{% endif %}
{% if v and v.admin_level==6 and v.id != c.author_id %}
<li id="unban-{{c.id}}" class="list-inline-item d-none {% if c.author.is_suspended %}d-md-inline-block{% endif %}"><a class="text-success" id="unexile-comment-{{c.id}}" href="javascript:void(0)" onclick="post_toast3('/unban_user/{{c.author_id}}','ban-{{c.id}}','unban-{{c.id}}')"><i class="fas fa-user-slash text-success fa-fw"></i>Unban user</a></li>
<li id="ban-{{c.id}}" class="list-inline-item d-none {% if not c.author.is_suspended %}d-md-inline-block{% endif %}"><a class="text-danger" id="exile-comment-{{c.id}}" href="javascript:void(0)" onclick="post_toast3('/ban_user/{{c.author_id}}?reason={{c.permalink}}','ban-{{c.id}}','unban-{{c.id}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
2021-08-31 16:50:06 +00:00
{% endif %}
{% if v and v.admin_level >=4 and c.oauth_app %}
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="{{c.oauth_app.permalink}}/comments"><i class="fas fa-code fa-fw"></i>API App</a></li>
2021-08-31 16:50:06 +00:00
{% endif %}
<li class="list-inline-item d-inline-block d-md-none"><a href="#" data-toggle="modal" data-target="#actionsModal-{{c.id}}" data-focus="false"><i class="fas fa-ellipsis-h"></i></a></li>
{% if v and request.path.startswith('/@') and v.admin_level == 0 %}
{% if voted==1 %}<li class="list-inline-item arrow-up d-inline-block d-md-none mr-2 comment-{{c.id}}-up active"></li>{% endif %}
{% elif v %}
<li id="comment-{{c.id}}-up" tabindex="0" class="list-inline-item arrow-up upvote-button d-inline-block d-md-none mr-2 comment-{{c.id}}-up {% if voted==1 %}active{% endif %}" data-id-up="{{c.id}}" data-content-type="comment"></li>
{% else %}
<li id="comment-{{c.id}}-up" tabindex="0" class="list-inline-item arrow-up d-inline-block d-md-none mr-2" onclick="location.href='/login';"></li>
{% endif %}
<li class="list-inline-item d-inline-block d-md-none mr-2"><span class="points" data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"><span id="comment-score-{{c.id}}" class="score comment-score-{{c.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}">{{score}}</span></span></li>
{% if v and request.path.startswith('/@') and v.admin_level == 0 %}
{% if voted==-1 %}
<li class="list-inline-item arrow-down d-inline-block d-md-none mr-2 comment-{{c.id}}-up active"></li>
{% endif %}
2021-09-06 16:46:56 +00:00
{% elif v %}
2021-09-06 17:03:51 +00:00
<li {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down downvote-button d-inline-block d-md-none mr-2 comment-{{c.id}}-down {% if voted==-1 %}active{% endif %}" data-id-down="{{c.id}}" data-content-type="comment"></li>
2021-09-06 16:46:56 +00:00
{% else %}
2021-09-06 17:03:51 +00:00
<li {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down d-inline-block d-md-none" onclick="location.href='/login';"></li>
2021-08-31 16:50:06 +00:00
{% endif %}
</ul>
</div>
2021-07-29 07:29:23 +00:00
{% endif %}
2021-07-21 01:12:26 +00:00
</div>
2021-07-30 05:31:38 +00:00
<div id="reply-to-{{c.id}}" class="d-none">
2021-07-29 07:29:23 +00:00
<div id="comment-form-space-{{c.fullname}}" class="comment-write collapsed child">
2021-07-31 06:56:19 +00:00
<form id="reply-to-t3_{{c.id}}" action="/comment" method="post" class="input-group" enctype="multipart/form-data">
2021-07-29 07:29:23 +00:00
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input type="hidden" name="parent_fullname" value="{{c.fullname}}">
2021-07-30 05:31:38 +00:00
<input id="reply-form-submission-{{c.fullname}}" type="hidden" name="submission" value="{{c.post.id}}">
<textarea name="body" form="reply-to-t3_{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.fullname}}" aria-label="With textarea" placeholder="Add your comment..." rows="3"></textarea>
<div class="comment-format" id="comment-format-bar-{{c.id}}">
<label class="btn btn-secondary format d-inline-block m-0" for="gif-reply-btn-{{c.fullname}}">
2021-07-29 07:29:23 +00:00
<span id="gif-reply-btn-{{c.fullname}}" class="font-weight-bolder text-uppercase" onclick="commentForm('reply-form-body-{{c.fullname}}');getGif()" aria-hidden="true" data-toggle="modal" data-target="#gifModal" data-toggle="tooltip" data-placement="bottom" title="Add GIF">GIF</span>
</label>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="gif-reply-btn-{{c.fullname}}">
2021-07-29 07:29:23 +00:00
<i id="emoji-reply-btn-{{c.fullname}}" class="fas fa-smile-beam" onclick="loadEmojis('reply-form-body-{{c.fullname}}')" aria-hidden="true" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"></i>
</label>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="file-upload-reply-{{c.fullname}}">
2021-07-30 05:31:38 +00:00
<div id="filename-show-reply-{{c.id}}"><i class="far fa-image"></i></div>
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show-reply-{{c.id}}').innerHTML='image';" hidden>
2021-07-29 07:29:23 +00:00
</label>
2021-07-30 05:31:38 +00:00
<a href="javascript:void(0)" onclick="document.getElementById('reply-to-{{c.id}}').classList.add('d-none')" class="d-none d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
2021-07-29 07:29:23 +00:00
<a id="save-reply-to-{{c.fullname}}" class="d-none d-md-block btn btn-primary text-white ml-2" onclick="post_comment('{{c.fullname}}');" href="javascript:void(0)">Comment</a>
</div>
2021-07-30 05:31:38 +00:00
<a href="javascript:void(0)" onclick="document.getElementById('reply-to-{{c.id}}').classList.add('d-none')" class="d-block d-md-none btn btn-link text-muted ml-auto cancel-form">Cancel</a>
2021-07-29 07:29:23 +00:00
<a id="save-reply-to-{{c.fullname}}" class="d-block d-md-none btn btn-primary text-white ml-2" onclick="post_comment('{{c.fullname}}');" href="javascript:void(0)">Comment</a>
</form>
</div>
</div>
2021-07-21 01:12:26 +00:00
2021-07-29 07:29:23 +00:00
{% if render_replies %}
2021-08-30 13:06:22 +00:00
{% if level<7 %}
2021-07-30 05:31:38 +00:00
<div id="replies-of-{{c.id}}">
2021-08-23 18:52:56 +00:00
{% for reply in replies %}
2021-07-21 01:12:26 +00:00
{{single_comment(reply, level=level+1)}}
{% endfor %}
</div>
2021-08-23 18:52:56 +00:00
{% elif replies %}
2021-07-30 05:31:38 +00:00
<div id="replies-of-{{c.id}}" class="d-none d-md-block">
2021-08-23 18:52:56 +00:00
{% for reply in replies %}
2021-07-21 01:12:26 +00:00
{{single_comment(reply, level=level+1)}}
{% endfor %}
</div>
2021-07-30 05:31:38 +00:00
<div id="morecomment-{{c.id}}" class="d-block d-md-none mt-2 more-comments text-small">
2021-09-02 20:33:48 +00:00
<a {% if v %}href="{{c.permalink}}#context"{% else %}href="/logged_out{{c.permalink}}#context"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
2021-07-21 01:12:26 +00:00
</div>
{% endif %}
2021-07-29 07:29:23 +00:00
{% endif %}
</div>
2021-07-21 01:12:26 +00:00
<!-- Comment Actions Modal -->
2021-07-30 05:31:38 +00:00
<div class="modal fade d-md-none" id="actionsModal-{{c.id}}" tabindex="-1" role="dialog" aria-labelledby="actionsModalTitle" aria-hidden="true">
2021-07-21 01:12:26 +00:00
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title h6">More options</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true"><i class="far fa-times"></i></span>
</button>
</div>
<div class="modal-body">
<ul class="list-group comment-actions">
2021-08-02 14:27:20 +00:00
<li class="list-group-item"><a href="/votes?link={{c.fullname}}"><i class="fas fa-arrows-v"></i>Votes</a></li>
2021-07-21 01:12:26 +00:00
2021-09-08 21:53:15 +00:00
{% if v %}
2021-09-10 01:50:22 +00:00
<li id="save2-{{c.id}}" class="{% if c in v.saved_comment_idlist() %}d-none{% endif %} list-group-item"><a href="javascript:void(0)" data-dismiss="modal" onclick="post_toast2('/save_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}')"><i class="fas fa-save"></i>Save</a></li>
2021-09-08 21:53:15 +00:00
2021-09-10 01:50:22 +00:00
<li id="unsave2-{{c.id}}" class="{% if c not in v.saved_comment_idlist() %}d-none{% endif %} list-group-item"><a href="javascript:void(0)" onclick="post_toast2('/unsave_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-save"></i>Unsave</a></li>
2021-09-08 21:53:15 +00:00
2021-07-21 01:12:26 +00:00
{% endif %}
2021-09-08 22:03:58 +00:00
<li class="list-group-item"><a href="javascript:void(0);" role="button" class="d-block copy-link" data-dismiss="modal" data-clipboard-text="{% if 'rdrama' in request.host %}https://taytay.life{{c.permalink}}{% else %}{{c.permalink | full_link}}{% endif %}?context=5#context"><i class="fas fa-copy"></i>Copy link</a></li>
2021-07-21 01:12:26 +00:00
2021-09-02 20:33:48 +00:00
<li class="list-group-item"><a {% if v %} href="{{c.permalink}}?context=5#context" {% else %} href="/logged_out{{c.permalink}}?context=5#context" {% endif %}><i class="fas fa-dna"></i>Context</a></li>
2021-07-21 01:12:26 +00:00
2021-07-30 05:31:38 +00:00
<li class="list-group-item"><a href="javascript:void(0)" data-toggle="modal" data-dismiss="modal" data-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author.username}}')" class="d-block"><i class="fas fa-flag"></i>Report</a></li>
2021-07-21 01:12:26 +00:00
{% if v and c.parent_submission and c.author_id==v.id %}
2021-09-08 21:53:15 +00:00
<li class="list-group-item"><a href="javascript:void(0)" data-dismiss="modal" onclick="toggleEdit('{{c.id}}')" class="d-block"><i class="fas fa-edit"></i>Edit</a></li>
2021-07-21 01:12:26 +00:00
2021-09-11 03:49:59 +00:00
<li id="delete2-{{c.id}}" class="{% if c.deleted_utc %}d-none{% endif %} list-group-item"><a href="javascript:void(0)" data-toggle="modal" data-target="#deleteCommentModal" onclick="delete_commentModal2('{{c.id}}','delete2-{{c.id}}','undelete2-{{c.id}}')"><i class="fas fa-trash-alt"></i>Delete</a></li>
2021-07-21 01:12:26 +00:00
2021-09-11 03:49:59 +00:00
<li id="undelete2-{{c.id}}" class="{% if not c.deleted_utc %}d-none{% endif %} list-group-item"><a href="javascript:void(0)" onclick="post_toast2('/undelete/comment/{{c.id}}','delete2-{{c.id}}','undelete2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-trash-alt"></i>Undelete</a></li>
2021-07-21 01:12:26 +00:00
{% endif %}
2021-07-31 11:18:34 +00:00
{% if v and c.post and (v.admin_level >= 1 or v.id == c.post.author_id) and c.level == 1 %}
2021-09-08 22:05:22 +00:00
<li class="list-group-item">
<a id="pin2-{{c.id}}" class="{% if c.is_pinned %}d-none{% endif %} text-info" href="javascript:void(0)" data-target="#actionsModal-{{c.id}}" onclick="post_toast2('/comment_pin/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Pin</a>
<a id="unpin2-{{c.id}}" class="{% if not c.is_pinned %}d-none{% endif %} text-info" href="javascript:void(0)" data-target="#actionsModal-{{c.id}}" onclick="post_toast2('/comment_pin/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Unpin</a>
</li>
2021-07-21 01:12:26 +00:00
{% endif %}
{% if v %}
{% if v.admin_level>=1 and v.id==c.author_id %}
2021-09-08 22:03:58 +00:00
<li id="distinguish2-{{c.id}}" class="{% if c.distinguish_level %}d-none{% endif %} list-group-item"><a class="text-info d-block" href="javascript:void(0)" onclick="admin_comment2('{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Distinguish</a></li>
<li id="undistinguish2-{{c.id}}" class="{% if not c.distinguish_level %}d-none{% endif %} list-group-item"><a class="text-info d-block" href="javascript:void(0)" onclick="admin_comment2('{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Undistinguish</a></li>
2021-07-21 01:12:26 +00:00
{% endif %}
{% if v.admin_level>=3 %}
2021-09-08 22:03:58 +00:00
{% if "/flagged/" in request.path %}
<li class="list-group-item"><a class="text-danger d-block" href="javascript:void(0)" onclick="removeComment2('{{c.id}}')" data-dismiss="modal"><i class="fas fa-ban text-danger"></i>Remove</a></li>
2021-09-08 22:07:36 +00:00
<li class="list-group-item"><a class="text-success d-block" href="javascript:void(0)" onclick="approveComment2('{{c.id}}')" data-dismiss="modal"><i class="fas fa-check text-success"></i>Approve</a></li>
2021-09-08 22:03:58 +00:00
{% else %}
2021-09-08 22:07:24 +00:00
<li id="remove2-{{c.id}}" class="{% if c.is_banned %}d-none{% endif %} list-group-item"><a class="text-danger d-block" href="javascript:void(0)" onclick="removeComment2('{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-ban text-danger"></i>Remove</a></li>
2021-09-08 22:07:36 +00:00
<li id="approve2-{{c.id}}" class="{% if not c.is_banned %}d-none{% endif %} list-group-item"><a class="text-success d-block" href="javascript:void(0)" onclick="approveComment2('{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-check text-success"></i>Approve</a></li>
2021-09-08 22:03:58 +00:00
{% endif %}
2021-07-21 01:12:26 +00:00
{% endif %}
{% if v.admin_level >=4 and c.oauth_app %}
2021-07-31 11:03:17 +00:00
<li class="list-group-item"><a class="d-block text-info" href="{{c.oauth_app.permalink}}/comments"><i class="fas fa-code text-info"></i>API App</a></li>
2021-07-21 01:12:26 +00:00
{% endif %}
2021-07-28 03:36:50 +00:00
{% if not v.id==c.author_id and v.admin_level == 0 %}
2021-09-08 21:53:15 +00:00
<li id="block2-{{c.id}}" class="list-group-item {% if c.is_blocked %}d-none{% endif %}"><a class="d-block" href="javascript:void(0)" onclick="post_toast2('/settings/block?username={{c.author.username}}','block2-{{c.id}}','unblock2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-eye-slash"></i>Block user</a></li>
<li id="unblock2-{{c.id}}" class="list-group-item {% if not c.is_blocked %}d-none{% endif %}"><a class="d-block" href="javascript:void(0)" onclick="post_toast2('/settings/unblock?username={{c.author.username}}','block2-{{c.id}}','unblock2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-eye-slash"></i>Unblock user</a></li>
2021-07-21 01:12:26 +00:00
{% endif %}
{% endif %}
2021-07-31 11:18:34 +00:00
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 0) %}
2021-09-08 21:53:15 +00:00
<li id="mark2-{{c.id}}" class="{% if c.over_18 %}d-none{% endif %} list-group-item"><a class="text-danger d-block" href="javascript:void(0)" onclick="post_toast2('/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Mark +18</a></li>
<li id="unmark2-{{c.id}}" class="{% if not c.over_18 %}d-none{% endif %} list-group-item"><a class="text-danger d-block" href="javascript:void(0)" onclick="post_toast2('/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Unmark +18</a></li>
2021-07-21 01:12:26 +00:00
{% endif %}
2021-07-31 11:18:34 +00:00
2021-07-29 23:17:24 +00:00
{% if v and (c.post and v.admin_level == 6) %}
2021-07-25 22:21:24 +00:00
{% if c.author_id != v.id %}
2021-09-08 22:14:30 +00:00
<li id="ban2-{{c.id}}" class="{% if c.author.is_suspended %}d-none{% endif %} list-group-item"><a class="text-danger d-block" id="exile-comment2-{{c.id}}" href="javascript:void(0)" onclick="post_toast2('/ban_user/{{c.author_id}}?reason={{c.permalink}}','ban2-{{c.id}}','unban2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-user-minus fa-fw text-danger"></i>Ban user</a></li>
2021-09-08 21:53:15 +00:00
<li id="unban2-{{c.id}}" class="{% if not c.author.is_suspended %}d-none{% endif %} list-group-item"><a class="text-success d-block" id="unexile-comment2-{{c.id}}" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{c.author_id}}','ban2-{{c.id}}','unban2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-user-minus fa-fw text-success"></i>Unban user</a></li>
2021-07-21 01:12:26 +00:00
{% endif %}
{% endif %}
</ul>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endmacro %}
{% for comment in comments %}
{{single_comment(comment)}}
{% endfor %}
<div class="toast" id="toast-comment-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-animation="true" data-autohide="true" data-delay="5000">
<div class="toast-body bg-success text-center text-white">
<i class="fas fa-comment-alt-smile mr-2"></i>Comment posted!
</div>
</div>
<div class="toast" id="toast-comment-error" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-animation="true" data-autohide="true" data-delay="5000">
<div class="toast-body bg-danger text-center text-white">
<i class="fas fa-exclamation-circle mr-2"></i><span id="comment-error-text"></span>
</div>
</div>
<pre>
</pre>
</body>