2022-11-16 09:25:50 +00:00
{%- import 'util/macros.html' as macros with context -%}
2022-08-30 05:26:13 +00:00
{% if not request.headers.get("xhr") %}
2022-07-23 08:53:17 +00:00
{% if comment_info %}
2022-12-29 14:20:27 +00:00
< script defer src = "{{'js/comment_info.js' | asset}}" > < / script >
2022-07-23 08:53:17 +00:00
{% endif %}
{% if v %}
2022-11-15 19:14:29 +00:00
{% include "modals/award.html" %}
2022-07-23 08:53:17 +00:00
{% endif %}
2022-09-03 23:42:59 +00:00
{% include "popover.html" %}
2022-07-23 08:53:17 +00:00
{% endif %}
2022-09-17 21:45:17 +00:00
{% macro single_comment(c, level=1, collapse=False) %}
2022-07-23 08:53:17 +00:00
2023-02-27 19:10:53 +00:00
{% if user_can_see(v, c) %}
2022-07-23 08:53:17 +00:00
{% set ups=c.upvotes %}
{% set downs=c.downvotes %}
{% set score=ups-downs %}
{% if render_replies %}
2023-03-07 15:56:38 +00:00
{% set replies=c.replies(sort=sort, v=v) %}
2022-07-23 08:53:17 +00:00
{% endif %}
2022-10-06 00:57:08 +00:00
{% if c.is_blocking and not c.ghost or (c.is_banned or c.deleted_utc) and not (v and v.admin_level >= PERMS['POST_COMMENT_MODERATION']) and not (v and v.id==c.author_id) %}
2022-07-23 08:53:17 +00:00
2023-04-27 17:15:12 +00:00
< div id = "comment-{{c.id}}" class = "comment {% if not (v and v.id == author_id) and not (v and v.admin_level) %}collapsed{% endif %}" >
2023-03-11 11:27:57 +00:00
< span class = "comment-collapse-desktop" style = "border-left: 2px solid #{{c.author.name_color}}" data-nonce = "{{g.nonce}}" data-onclick = "collapse_comment('{{c.id}}')" > < / span >
2022-07-23 08:53:17 +00:00
< div class = "comment-body" >
2023-02-27 13:26:55 +00:00
< div id = "comment-{{c.id}}-only" class = "{% if c.award_count('tilt', v) %}tilt tilt-{{c.award_count('tilt', v)}}{% endif %} {% if c.award_count('glowie', v) %}glow{% endif %} comment-{{c.id}}-only" >
2022-07-23 08:53:17 +00:00
< div class = "user-info" >
2023-03-11 12:15:22 +00:00
< span class = "comment-collapse-icon" data-nonce = "{{g.nonce}}" data-onclick = "collapse_comment('{{c.id}}')" > < / span >
2022-07-23 08:53:17 +00:00
{% if standalone and c.over_18 %}< span class = "badge badge-danger" > +18< / span > {% endif %}
2022-10-13 11:55:29 +00:00
{% if c.is_banned %}removed by @{{c.ban_reason}} (Admin){% elif c.deleted_utc %}Deleted by author{% elif c.is_blocking %}You are blocking @{{c.author_name}}{% endif %}
2022-07-23 08:53:17 +00:00
< / div >
< / div >
2023-01-01 11:36:20 +00:00
{% if render_replies %}
2022-09-10 00:47:48 +00:00
< div id = "replies-of-{{c.fullname}}" >
{% if level< 9 or request . path . startswith ( ' / notifications ' ) % }
2022-08-19 22:36:28 +00:00
{% for reply in replies %}
2022-07-23 08:53:17 +00:00
{{single_comment(reply, level=level+1)}}
{% endfor %}
2022-09-10 00:47:48 +00:00
{% elif replies %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "btn-{{c.id}}" class = "d-mob-none btn btn-primary mt-3" data-nonce = "{{g.nonce}}" data-onclick = "more_comments('{{c.id}}', '{{sort}}')" > More comments< / button >
2022-12-29 14:20:27 +00:00
< a class = "d-md-none py-3" href = "{{c.more_comments}}" > More comments < i class = "fas fa-long-arrow-right ml-1" > < / i > < / a >
2022-09-10 00:47:48 +00:00
{% endif %}
< / div >
2022-07-23 08:53:17 +00:00
{% endif %}
< / div >
< / div >
{% else %}
{% set score=c.score %}
{% if v %}
{% set voted=c.voted %}
{% if not voted and v.id == c.author_id %}
{% set voted=1 %}
{% endif %}
{% else %}
{% set voted=-2 %}
{% endif %}
{% if standalone and level==1 %}
2023-07-02 14:31:13 +00:00
< div id = "post-info-{{c.id}}" class = "text-break post-info mb-1 mr-2 {% if request.path.startswith('/notifications') %}mt-5{% elif request.path == '/search/messages' %}mt-6{% else %}mt-3{% endif %}" >
2023-06-23 13:46:42 +00:00
{% if c.parent_post and c.post.over_18 %}
2022-12-09 10:54:29 +00:00
< span class = "badge badge-danger text-small-extra mr-1" > +18< / span >
{% endif %}
2022-07-23 08:53:17 +00:00
< span class = "align-top" >
2023-06-23 13:46:42 +00:00
{% if c.parent_post %}
2022-12-09 10:54:29 +00:00
{% if c.author_id==v.id and replies and is_notification_page %}
2022-07-23 08:53:17 +00:00
< span class = "font-weight-bold" > Comment {{'Replies' if (replies | length)>1 else 'Reply'}}: < a href = "{{c.post.permalink}}" > {{c.post.realtitle(v) | safe}}< / a > < / span >
{% 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 >
2023-06-23 13:46:42 +00:00
{% elif is_notification_page and c.parent_post in v.subscribed_idlist %}
2022-07-23 08:53:17 +00:00
< span class = "font-weight-bold" > Subscribed Thread: < a href = "{{c.post.permalink}}" > {{c.post.realtitle(v) | safe}}< / a > < / span >
{% elif is_notification_page %}
< span class = "font-weight-bold" > Username Mention: < a href = "{{c.post.permalink}}" > {{c.post.realtitle(v) | safe}}< / a > < / span >
{% else %}
2022-12-09 10:54:29 +00:00
< span class = "font-weight-bold" > < a { % if v and v . newtab % } data-target = "t" target = "_blank" { % endif % } href = "{{c.post.permalink}}" > {{c.post.realtitle(v) | safe}}< / a > < / span >
2022-07-23 08:53:17 +00:00
{% endif %}
{% if c.post.sub %}
2022-12-09 10:54:29 +00:00
< span class = "ml-1" > in < a href = "/h/{{c.post.sub}}" { % if v and v . newtab % } data-target = "t" target = "_blank" { % endif % } > /h/{{c.post.sub}}< / a > < / span >
2022-07-23 08:53:17 +00:00
{% endif %}
{% elif c.author_id==AUTOJANNY_ID %}
< span class = "font-weight-bold" > Notification< / span >
2022-12-05 01:37:44 +00:00
{% elif c.wall_user_id %}
2022-12-07 16:51:51 +00:00
{% if not wall %}
2022-12-05 02:19:51 +00:00
{% if c.wall_user_id == v.id %}
< span class = "font-weight-bold" > < a href = "/@{{v.username}}" > Your Profile Wall< / a > < / span >
{% else %}
< span class = "font-weight-bold" > < a href = "/@{{c.wall_user.username}}" > @{{c.wall_user.username}}'s Profile Wall< / a > < / span >
{% endif %}
2022-07-23 08:53:17 +00:00
{% endif %}
2022-12-05 01:37:44 +00:00
{% elif c.sentto == MODMAIL_ID %}
< span class = "font-weight-bold" > Sent to admins< / span >
{% else %}
< span class = "font-weight-bold" > Sent to @{{c.senttouser.username}}< / span >
2022-07-23 08:53:17 +00:00
{% endif %}
< / span >
< / div >
{% endif %}
{% if c.parent_comment and c.parent_comment.sentto %}
{% set isreply = True %}
{% else %}
{% set isreply = False %}
{% endif %}
2023-05-05 22:47:04 +00:00
< div id = "comment-{{c.id}}" class = "anchor comment {% if wall and level == 1 %}mt-5{% elif wall %}mt-4{% elif standalone and level==1 %}mt-0{% endif %} {% if collapse or c.collapse_for_user(v,request.full_path) %}collapsed{% endif %}" style = "{% if isreply %}padding-left:0!important{% endif %}" >
2022-07-23 08:53:17 +00:00
{% if not isreply %}
2023-03-11 11:27:57 +00:00
< span class = "comment-collapse-desktop" style = "border-left: 2px solid {% if c.ghost %}var(--primary){% else %}#{{c.author.name_color}}{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "collapse_comment('{{c.id}}')" > < / span >
2022-07-23 08:53:17 +00:00
{% endif %}
< div class = "comment-body" >
2023-03-25 18:25:38 +00:00
< div id = "{% if comment_info and comment_info.id == c.id %}context{%else%}comment-{{c.id}}-only{% endif %}" class = "{% if c.award_count('tilt', v) %}tilt tilt-{{c.award_count('tilt', v)}}{% endif %} {% if c.unread %}unread{% endif %} {% if c.award_count('glowie', v) %}glow{% endif %} comment-{{c.id}}-only comment-anchor {% if comment_info and comment_info.id == c.id %}context{%endif%}{% if c.is_banned %} banned{% endif %}{% if c.deleted_utc %} deleted{% endif %}" >
2022-07-23 08:53:17 +00:00
< div class = "user-info" >
2023-03-11 12:15:22 +00:00
< span class = "comment-collapse-icon" data-nonce = "{{g.nonce}}" data-onclick = "collapse_comment('{{c.id}}')" > < / span >
2022-07-23 08:53:17 +00:00
{% for a in c.awards %}
< i class = "{{a.class_list}} px-1" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "{{a.title}} Award given by @{{a.user.username}}" > < / i >
{% endfor %}
2023-06-23 13:46:42 +00:00
{% if c.parent_post %}
2022-07-23 08:53:17 +00:00
{% set sub = c.post.sub %}
{% if sub and c.author.exiled_from(sub) %}
2022-09-28 10:06:23 +00:00
< a > < i class = "fas fa-campfire text-danger" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "User has been exiled from /h/{{sub}}" > < / i > < / a >
2022-07-23 08:53:17 +00:00
{% endif %}
{% endif %}
{% if c.bannedfor %}
< i class = "fas fa-hammer-crash text-danger" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "User was banned for this comment {{c.bannedfor}}" > < / i >
{% endif %}
2022-11-05 02:12:17 +00:00
{% if c.chuddedfor %}
< i class = "fas fa-face-sleeping text-danger" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "User was chudded for this comment {{c.chuddedfor}}" > < / i >
{% endif %}
2023-06-23 16:49:23 +00:00
{% if c.active_reports(v) %}< button type = "button" class = "btn btn-primary" style = "padding:1px 5px; font-size:10px" data-toggleelement = "#reports-{{c.id}}" data-toggleattr = "d-none" > {{c.active_reports(v)}} Report{{macros.plural(c.active_reports(v))}}< / button > {% endif %}
2022-07-23 08:53:17 +00:00
{% if c.over_18 %}< span class = "badge badge-danger text-small-extra mr-1" > +18< / span > {% endif %}
2022-12-13 18:50:38 +00:00
{% if v and v.admin_level >= PERMS['USER_SHADOWBAN'] and c.author.shadowbanned %}< i class = "fas fa-user-times text-admin" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = 'Shadowbanned by @{{c.author.shadowbanner}} for "{{c.author.ban_reason}}"' > < / i > {% endif %}
2022-07-23 08:53:17 +00:00
{% if c.stickied %}
2023-01-22 08:50:03 +00:00
< i id = 'pinned-{{c.id}}' class = "fas fa-thumbtack fa-rotate--45 pr-1 text-admin" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Pinned by @{{c.stickied}}" { % if c . stickied_utc % } data-onmouseover = "pinned_timestamp('pinned-{{c.id}}')" data-timestamp = {{c.stickied_utc}} data-nonce = "{{g.nonce}}" { % endif % } > < / i >
2022-07-23 08:53:17 +00:00
{% endif %}
{% if c.distinguish_level and not c.ghost %}< i class = "fas fa-broom text-admin" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "{{SITE_NAME}} Admin, speaking officially" > < / i > {% endif %}
{% if c.is_op %}< i class = "fas fa-microphone-stand text-info" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "OP" > < / i > {% endif %}
{% if c.is_bot %}< i class = "fas fa-robot text-info" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Bot" > < / i > {% endif %}
2023-05-03 21:58:37 +00:00
{% if c.is_blocking and not c.ghost %}< i class = "fas fa-user-minus text-warning" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "You're blocking this user." > < / i > {% endif %}
2023-02-07 01:36:41 +00:00
{% if c.is_blocked and not c.ghost %}< i class = "fas fa-user-minus text-danger" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "This user is blocking you." > < / i > {% endif %}
2022-07-23 08:53:17 +00:00
{% if c.ghost %}
2022-12-29 14:20:27 +00:00
< span { % if c . distinguish_level % } class = "mod {% if SITE_NAME == 'rDrama' %}mod-rdrama{% endif %}" { % endif % } > 👻< / span >
2022-07-23 08:53:17 +00:00
{% else %}
2023-05-03 15:29:31 +00:00
{% if FEATURES['PATRON_ICONS'] and c.author.patron > 1 %}
2023-05-16 00:25:31 +00:00
< img loading = "lazy" src = "{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{c.author.patron}}.webp?b=10" class = "patron-img" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "{{c.author.patron_tooltip}}" alt = "{{c.author.patron_tooltip}}" >
2022-08-25 20:34:05 +00:00
{% endif %}
2022-07-23 08:53:17 +00:00
{% if FEATURES['HOUSES'] and c.author.house %}
2023-06-29 20:14:30 +00:00
< img loading = "lazy" src = "{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/houses/{{c.author.house}}.webp?x=6" class = "house-img" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "House {{c.author.house}}" alt = "House {{c.author.house}}" >
2022-07-23 08:53:17 +00:00
{% endif %}
{% if c.author.verified %}< i class = "fas fa-badge-check align-middle ml-1 {% if c.author.verified=='Glowiefied' %}glow{% endif %}" style = "color:{% if c.author.verifiedcolor %}#{{c.author.verifiedcolor}}{% else %}#1DA1F2{% endif %}" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "{{c.author.verified}}" > < / i >
{% endif %}
2023-06-27 14:14:33 +00:00
< a class = "user-name text-decoration-none" href = "{{c.author.url}}" data-pop-info = '{{c.author.json_popover(v) | tojson}}' ' data-bs-placement = "bottom" data-bs-toggle = "popover" data-bs-trigger = "manual" data-content-id = "popover" tabindex = "0" style = "color:#{{c.author.name_color}}; font-size:12px; font-weight:bold;" >
2022-08-11 07:27:08 +00:00
< div class = "profile-pic-30-wrapper" >
2023-05-03 17:53:51 +00:00
< img loading = "lazy" alt = "@{{c.author.username}}'s profile picture" src = "{{c.author.profile_url}}" class = "profile-pic-30 mr-2" >
2022-12-24 22:21:49 +00:00
{% if c.author.hat_active(v)[0] -%}
2023-06-29 20:14:30 +00:00
< img class = "profile-pic-30-hat hat" loading = "lazy" src = "{{c.author.hat_active(v)[0]}}?x=6" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "{{c.author.hat_active(v)[1]}}" alt = "@{{c.author.username}}'s hat" >
2022-08-11 07:27:08 +00:00
{%- endif %}
< / div >
2022-12-29 14:20:27 +00:00
< span { % if c . author . patron and not c . distinguish_level % } class = "patron" style = "background-color:#{{c.author.name_color}};" { % elif c . distinguish_level % } class = "mod {% if SITE_NAME == 'rDrama' %}mod-rdrama{% endif %}" { % endif % } > {{c.author_name}}< / span >
2022-07-23 08:53:17 +00:00
< / a >
{% if FEATURES['PRONOUNS'] %}
< span class = "pronouns" style = "color:#{{c.author.titlecolor}};border-color:#{{c.author.titlecolor}}" > {{c.author.pronouns}}< / span >
{% endif %}
{% if c.author.customtitle %}
2023-03-17 07:31:06 +00:00
< bdi class = "text-break" style = "color: #{{c.author.titlecolor}}" > {{c.author.customtitle | safe}}< / bdi >
2022-07-23 08:53:17 +00:00
{% endif %}
{% endif %}
2022-12-29 14:20:27 +00:00
{% if c.parent_comment_id and not standalone and level != 1 %}
2023-02-25 16:12:18 +00:00
< a href = "#comment-{{c.parent_comment_id}}-only" class = "text-muted ml-2 unbreakable" >
2023-02-07 01:07:28 +00:00
< i class = "fas fa-reply fa-sm fa-fw fa-flip-horizontal" > < / i >
2022-12-29 14:20:27 +00:00
{{c.parent_comment.author_name}}
< / a >
{% endif %}
2022-07-23 08:53:17 +00:00
{% if c.notif_utc %}
2023-02-13 18:58:07 +00:00
< span id = "timestamp-{{c.id}}" data-nonce = "{{g.nonce}}" data-onmouseover = "timestamp(this, '{{c.notif_utc}}')" data-bs-toggle = "tooltip" data-bs-placement = "bottom" class = "time-stamp d-inline-block" > {{c.age_string}}< / span >
2022-07-23 08:53:17 +00:00
{% elif c.created_utc %}
2023-02-13 18:58:07 +00:00
< span id = "timestamp-{{c.id}}" data-nonce = "{{g.nonce}}" data-onmouseover = "timestamp(this, '{{c.created_utc}}')" data-bs-toggle = "tooltip" data-bs-placement = "bottom" class = "time-stamp d-inline-block" > {{c.age_string}}< / span >
2022-07-23 08:53:17 +00:00
{% endif %}
2023-03-16 06:58:48 +00:00
#{{c.id}}
2023-01-01 11:36:20 +00:00
2022-07-23 08:53:17 +00:00
{% if c.edited_utc %}
2023-02-13 18:58:07 +00:00
< span class = "time-edited" id = "time-edit-{{c.id}}" data-nonce = "{{g.nonce}}" data-onmouseover = "timestamp(this, '{{c.edited_utc}}')" > < span > · < / span > < span class = "font-italic d-inline-block" > Edited {{c.edited_string}}< / span > < / span >
2022-07-23 08:53:17 +00:00
{% endif %}
{% if c.treasure_amount and c.treasure_amount != '0' %}
{% if c.treasure_amount.startswith('l') %}
2023-02-13 18:58:07 +00:00
< span class = "d-inline-block" >
2023-03-19 16:28:19 +00:00
< img class = "treasure" loading = "lazy" alt = "treasure" src = "{{SITE_FULL_IMAGES}}/i/treasure_tickets.webp" width = "20" height = "20" >
2023-02-13 18:58:07 +00:00
< em > Found {{c.treasure_amount.replace('l', '')}} Lottershe Tickets!< / em >
< / span >
2022-07-23 08:53:17 +00:00
{% elif '-' in c.treasure_amount %}
2023-02-13 18:58:07 +00:00
< span class = "d-inline-block" >
2023-03-19 16:28:19 +00:00
< img class = "treasure" loading = "lazy" alt = "treasure" src = "{{SITE_FULL_IMAGES}}/i/treasure_mimic.webp" width = "20" height = "20" >
2023-02-13 18:58:07 +00:00
< em > A Mimic Ate {{c.treasure_amount.replace('-', '')}} Coins!< / em >
< / span >
2022-07-23 08:53:17 +00:00
{% else %}
2023-02-13 18:58:07 +00:00
< span class = "d-inline-block" >
2023-03-19 16:28:19 +00:00
< img class = "treasure" loading = "lazy" alt = "treasure" src = "{{SITE_FULL_IMAGES}}/i/treasure_coins.webp" width = "20" height = "20" >
2023-02-13 18:58:07 +00:00
< em > Found {{c.treasure_amount}} Coins!< / em >
< / span >
2022-07-23 08:53:17 +00:00
{% endif %}
{% endif %}
2023-06-24 20:31:12 +00:00
{% if c.ping_cost %}
< em class = "ml-2" > spent {{c.ping_cost}} coins on pings< / em >
{% endif %}
2022-10-30 00:36:23 +00:00
{% if c.slots_result %}
2023-06-24 20:31:12 +00:00
< em class = "ml-2" > {{c.slots_result}}< / em >
2022-10-30 00:36:23 +00:00
{% elif c.casino_game_id %}
{% set game_state = c.casino_game.game_state_json %}
2023-06-24 20:31:12 +00:00
< em class = "ml-2" > {{game_state['symbols'].replace(',','')}} {{game_state['text']}}< / em >
2022-10-30 00:36:23 +00:00
{% endif %}
2022-10-30 00:40:35 +00:00
{% if c.blackjack_result %}
{{c.blackjack_html | safe}}
{% endif %}
2022-07-23 08:53:17 +00:00
< / div >
2023-05-14 22:01:10 +00:00
2023-06-23 16:49:23 +00:00
{{macros.reports(c, 'comment')}}
2022-07-23 08:53:17 +00:00
{% if c.is_banned and c.ban_reason %}
2022-10-13 11:55:29 +00:00
< div id = "comment-banned-warning" class = "comment-text text-removed mb-0" > removed by @{{c.ban_reason}} (Admin)< / div >
2022-07-23 08:53:17 +00:00
{% endif %}
2023-02-26 11:08:52 +00:00
{% set realbody = c.realbody(v) %}
2023-06-26 14:38:48 +00:00
< div id = "comment-text-{{c.id}}" class = "comment-text mb-0 {% if c.chudded %}text-uppercase chud-img chud-{{c.id_last_num}}{% endif %} {% if c.author.rainbow %}rainbow-text{% endif %} {%if c.author.queen%}queen{%endif%} {%if c.author.sharpen%}sharpen{%endif%}" >
2023-02-26 11:08:52 +00:00
{{realbody | safe}}
2022-07-23 08:53:17 +00:00
< / div >
2023-06-23 13:46:42 +00:00
{% if c.parent_post or c.wall_user_id %}
2022-07-23 08:53:17 +00:00
{% if v and v.id==c.author_id %}
2023-01-01 11:36:20 +00:00
2022-07-23 08:53:17 +00:00
< div id = "comment-edit-{{c.id}}" class = "d-none comment-write collapsed child" >
2023-02-27 17:25:38 +00:00
< input hidden name = "formkey" value = "{{v|formkey}}" >
< textarea autocomplete = "off" { % if v . longpost % } minlength = "280" { % endif % } maxlength = "{% if v.bird %}140{% else %}10000{% endif %}" data-preview = "preview-edit-{{c.id}}" data-nonce = "{{g.nonce}}" data-oninput = "markdown(this);charLimit('comment-edit-body-{{c.id}}','charcount-edit-{{c.id}}')" id = "comment-edit-body-{{c.id}}" data-id = "{{c.id}}" name = "body" form = "comment-edit-form-{{c.id}}" class = "file-ta comment-box form-control rounded" placeholder = "Add your comment..." rows = "3" > {{c.body}}< / textarea >
2023-01-01 11:36:20 +00:00
2023-02-27 17:25:38 +00:00
< div class = "text-small font-weight-bold mt-1" id = "charcount-edit-{{c.id}}" style = "right: 1rem; bottom: 0.5rem; z-index: 3;" > < / div >
2022-07-23 08:53:17 +00:00
2023-02-27 17:25:38 +00:00
< div class = "comment-format" >
< small class = "btn btn-secondary format m-0" data-nonce = "{{g.nonce}}" data-onclick = "getGifs('comment-edit-body-{{c.id}}')" data-bs-toggle = "modal" data-bs-target = "#gifModal" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Add GIF" > < span class = "font-weight-bolder text-uppercase" > GIF< / span > < / small >
2023-02-27 15:02:35 +00:00
2023-02-27 17:25:38 +00:00
< small class = "btn btn-secondary format m-0 ml-2" data-nonce = "{{g.nonce}}" data-onclick = "loadEmojis('comment-edit-body-{{c.id}}')" data-bs-toggle = "modal" data-bs-target = "#emojiModal" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Add Emoji" > < i class = "fas fa-smile-beam" > < / i > < / small >
{{macros.file_input('file-edit-reply-' ~ c.id, False)}}
< / div >
< a class = "text-small mt-3 d-inline-block" href = "/formatting" { % if v and v . newtab % } data-target = "t" target = "_blank" { % endif % } > Formatting help< / a >
< button type = "button" id = "edit-btn-{{c.id}}" form = "comment-edit-form-{{c.id}}" class = "btn btn-primary ml-2 fl-r commentmob" data-nonce = "{{g.nonce}}" data-onclick = "comment_edit('{{c.id}}');remove_dialog()" > Save Edit< / button >
< button type = "button" id = "cancel-edit-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "toggleEdit('{{c.id}}');remove_dialog()" class = "btn btn-link text-muted ml-auto fl-r commentmob" > Cancel< / button >
< span id = "upload-prog-edit-{{c.fullname}}" class = "d-none mt-1 mr-2 fl-r" >
< progress max = "100" > < / progress >
< span > < / span >
< / span >
2023-02-27 15:02:35 +00:00
2022-07-23 08:53:17 +00:00
< div id = "preview-edit-{{c.id}}" class = "preview mb-3 mt-5" > < / div >
< / div >
{% endif %}
< div id = "comment-{{c.id}}-actions" class = "comment-actions{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}" >
2022-08-26 00:28:20 +00:00
< div class = "d-md-none mt-1" >
2022-07-23 08:53:17 +00:00
< div class = "post-actions" >
< ul class = "list-inline text-right d-flex" >
< li class = "list-inline-item mr-auto" >
2022-10-06 00:57:08 +00:00
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
2022-10-28 23:35:14 +00:00
< button type = "button" data-bs-toggle = "modal" data-bs-target = "#adminModal-{{c.id}}" >
2022-07-23 08:53:17 +00:00
< i class = "fas fa-broom" > < / i >
2022-10-28 23:27:38 +00:00
< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
< / li >
2022-10-29 17:24:22 +00:00
{% if v and not c.deleted_utc %}
2022-12-30 12:14:18 +00:00
< button type = "button" class = "list-inline-item mr-3 btn nobackground" data-nonce = "{{g.nonce}}" data-onclick = "toggleReplyBox('reply-to-{{c.fullname}}')" > < i class = "fas fa-reply" style = "margin-top:0.35rem" > < / i > < / button >
2022-07-23 08:53:17 +00:00
{% endif %}
2023-01-01 11:36:20 +00:00
2022-07-23 08:53:17 +00:00
< li class = "list-inline-item" >
2022-10-28 23:35:14 +00:00
< button type = "button" data-bs-toggle = "modal" data-bs-target = "#actionsModal-{{c.id}}" >
2022-11-08 10:05:07 +00:00
< i class = "fas fa-ellipsis-h" > < / i >
2022-10-28 23:27:38 +00:00
< / button >
2022-07-23 08:53:17 +00:00
< / li >
2023-01-01 11:36:20 +00:00
2022-12-05 06:18:37 +00:00
{% if v and (request.path.startswith('/@') and not wall) and v.admin_level < PERMS [ ' VIEW_VOTE_BUTTONS_ON_USER_PAGE ' ] % }
2022-07-23 08:53:17 +00:00
< li id = "voting-{{c.id}}-mobile" class = "voting list-inline-item d-md-none" >
{% if voted==1 %}
< span class = "mr-2 arrow-up comment-{{c.id}}-up active" > < / span >
{% endif %}
2023-01-01 11:36:20 +00:00
2023-01-01 12:00:59 +00:00
< span class = "comment-mobile-score-{{c.id}} score comment-score-{{c.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if c.controversial %} controversial{% endif %}" { % if not c . is_banned % } data-bs-toggle = "tooltip" data-bs-placement = "top" title = "+{{ups}} | -{{downs}}" { % endif % } style = "cursor: default" > {{score}}< / span >
2023-01-01 11:36:20 +00:00
2022-07-23 08:53:17 +00:00
{% if voted==-1 %}
< span class = "ml-2 my-0 arrow-down comment-{{c.id}}-down active" > < / span >
{% endif %}
< / li >
{% elif v %}
< li id = "voting-{{c.id}}-mobile" class = "voting list-inline-item d-md-none" >
2023-01-01 11:36:20 +00:00
2023-01-20 07:14:59 +00:00
< span tabindex = "0" data-nonce = "{{g.nonce}}" data-onclick = "vote('comment-mobile', '{{c.id}}', '1')" class = "comment-mobile-{{c.id}}-up mx-0 pr-1 arrow-up upvote-button comment-{{c.id}}-up {% if voted==1 %}active{% endif %}" >
2022-07-23 08:53:17 +00:00
< / span >
2023-01-01 11:36:20 +00:00
2023-01-01 12:00:59 +00:00
< span class = "comment-mobile-score-{{c.id}} score comment-score-{{c.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if c.controversial %} controversial{% endif %}" { % if not c . is_banned % } data-bs-toggle = "tooltip" data-bs-placement = "top" title = "+{{ups}} | -{{downs}}" { % endif % } style = "cursor: default" > {{score}}< / span >
2023-01-01 11:36:20 +00:00
2023-01-20 07:14:59 +00:00
< span { % if DISABLE_DOWNVOTES % } style = "display:None!important" { % endif % } tabindex = "0" data-nonce = "{{g.nonce}}" data-onclick = "vote('comment-mobile', '{{c.id}}', '-1')" class = "comment-mobile-{{c.id}}-down mx-0 pl-1 my-0 arrow-down downvote-button comment-{{c.id}}-down {% if voted==-1 %}active{% endif %}" >
2022-07-23 08:53:17 +00:00
< / span >
2023-01-01 11:36:20 +00:00
2022-07-23 08:53:17 +00:00
< / li >
{% else %}
< li id = "voting-{{c.id}}-mobile" class = "voting list-inline-item d-md-none" >
2023-01-28 10:03:01 +00:00
< a tabindex = "0" class = "arrow-{{c.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" href = "/login?redirect={{request.full_path | urlencode}}" >
2022-12-25 02:10:56 +00:00
< i class = "fas fa-arrow-alt-up mx-0" > < / i >
2023-01-28 10:03:01 +00:00
< / a >
2023-01-01 11:36:20 +00:00
2023-01-01 12:00:59 +00:00
< span class = "comment-mobile-score-{{c.id}} score{% if c.controversial %} controversial{% endif %}" { % if not c . is_banned % } data-bs-toggle = "tooltip" data-bs-placement = "top" title = "+{{ups}} | -{{downs}}" { % endif % } style = "cursor: default" > {{score}}< / span >
2023-01-01 11:36:20 +00:00
2023-01-28 10:03:01 +00:00
< a tabindex = "0" class = "arrow-{{c.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" href = "/login?redirect={{request.full_path | urlencode}}" >
2022-12-25 02:10:56 +00:00
< i class = "fas fa-arrow-alt-down mx-0" > < / i >
2023-01-28 10:03:01 +00:00
< / a >
2022-07-23 08:53:17 +00:00
< / li >
{% endif %}
< / ul >
< / div >
< / div >
< ul class = "d-none d-md-flex list-inline text-right text-md-left" > < li >
2022-12-05 06:18:37 +00:00
{% if v and (request.path.startswith('/@') and not wall) and v.admin_level < PERMS [ ' VIEW_VOTE_BUTTONS_ON_USER_PAGE ' ] % }
2022-07-23 08:53:17 +00:00
{% if voted==1 %}
2022-10-28 23:35:14 +00:00
< button type = "button" class = "btn caction py-0 m-0 px-3 nobackground arrow-up mx-0 comment-{{c.id}}-up active" > < / button >
2022-07-23 08:53:17 +00:00
{% endif %}
{% elif v %}
2023-01-01 11:36:20 +00:00
2022-12-30 12:14:18 +00:00
< button type = "button" tabindex = "0" data-nonce = "{{g.nonce}}" data-onclick = "vote('comment', '{{c.id}}', '1')" class = "comment-{{c.id}}-up btn caction py-0 m-0 px-3 nobackground arrow-up upvote-button mx-0 comment-{{c.id}}-up {% if voted==1 %}active{% endif %}" > < / button >
2023-01-01 11:36:20 +00:00
2022-07-23 08:53:17 +00:00
{% else %}
2023-01-28 10:03:01 +00:00
< a type = "button" tabindex = "0" class = "comment-{{c.id}}-up btn caction nobackground py-0 m-0 px-3 arrow-up" href = "/login?redirect={{request.full_path | urlencode}}" > < / a >
2023-01-01 11:36:20 +00:00
2022-07-23 08:53:17 +00:00
{% endif %}
2023-01-01 11:36:20 +00:00
2022-10-13 14:44:05 +00:00
< span class = "btn caction nobackground p-0 m-0" style = "cursor: default" >
2023-01-01 12:00:59 +00:00
< span data-bs-toggle = "tooltip" data-bs-placement = "top" title = "+{{ups}} | -{{downs}}" class = "comment-score-{{c.id}} score comment-score-{{c.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %} {% if c.controversial %}controversial{% endif %}" > {{score}}< / span >
2022-10-13 14:44:05 +00:00
< / span >
2023-01-01 11:36:20 +00:00
2022-12-05 06:18:37 +00:00
{% if v and (request.path.startswith('/@') and not wall) and v.admin_level < PERMS [ ' VIEW_VOTE_BUTTONS_ON_USER_PAGE ' ] % }
2022-07-23 08:53:17 +00:00
{% if voted==-1 %}
< li class = " arrow-down py-0 m-0 px-3 comment-{{c.id}}-down active" > < / li >
{% endif %}
{% elif v %}
2022-12-30 12:14:18 +00:00
< button type = "button" { % if DISABLE_DOWNVOTES % } style = "display:None!important" { % endif % } tabindex = "0" data-nonce = "{{g.nonce}}" data-onclick = "vote('comment', '{{c.id}}', '-1')" class = "comment-{{c.id}}-down btn caction py-0 m-0 px-3 nobackground arrow-down downvote-button comment-{{c.id}}-down {% if voted==-1 %}active{% endif %}" > < / button >
2023-01-01 11:36:20 +00:00
2022-07-23 08:53:17 +00:00
{% else %}
2023-01-01 11:36:20 +00:00
2023-01-28 10:03:01 +00:00
< a type = "button" { % if DISABLE_DOWNVOTES % } style = "display:None!important" { % endif % } tabindex = "0" class = "comment-{{c.id}}-down btn caction py-0 m-0 px-3 nobackground arrow-down" href = "/login?redirect={{request.full_path | urlencode}}" > < / a >
2023-01-01 11:36:20 +00:00
2022-07-23 08:53:17 +00:00
{% endif %}
2023-01-01 11:36:20 +00:00
2023-03-24 11:56:27 +00:00
{% if v and (not c.ghost or v.admin_level >= PERMS['SEE_GHOST_VOTES']) %}
2022-12-11 19:32:30 +00:00
< a href = "/votes/{{c.fullname}}" class = "btn caction nobackground px-1 text-muted" > < i class = "fas fa-arrows-v" > < / i > Votes< / a >
{% endif %}
2023-01-01 11:36:20 +00:00
2022-12-05 03:01:50 +00:00
< a class = "btn caction nobackground px-1 text-muted" href = "{{c.permalink}}" > < i class = "fas fa-book-open" > < / i > Context< / a >
2022-07-23 08:53:17 +00:00
2023-03-21 17:35:36 +00:00
< button type = "button" class = "btn caction py-0 nobackground px-1 text-muted copy-link" data-clipboard-text = "{% if SITE == 'rdrama.net' %}{{SITE_FULL}}{{c.shortlink}}{% else %}{{c.permalink}}{% endif %}" > < i class = "fas fa-copy" > < / i > Copy link< / button >
2022-07-23 08:53:17 +00:00
{% if v %}
2022-10-29 17:24:22 +00:00
{% if not c.deleted_utc %}
2022-12-30 12:14:18 +00:00
< button type = "button" class = "btn caction py-0 nobackground px-1 text-muted" data-nonce = "{{g.nonce}}" data-onclick = "toggleReplyBox('reply-to-{{c.fullname}}')" > < i class = "fas fa-reply" > < / i > Reply< / button >
2022-10-29 17:24:22 +00:00
{% endif %}
2022-07-23 08:53:17 +00:00
2022-12-30 12:14:18 +00:00
< button type = "button" class = "btn caction py-0 nobackground px-1 text-muted" data-bs-toggle = "modal" data-bs-target = "#reportCommentModal" data-nonce = "{{g.nonce}}" data-onclick = "report_commentModal('{{c.id}}','{{c.author_name}}',)" > < i class = "fas fa-flag fa-fw" > < / i > Report< / button >
2022-07-23 08:53:17 +00:00
2022-12-05 03:01:50 +00:00
{% if FEATURES['AWARDS'] -%}
2023-06-23 11:37:22 +00:00
< button type = "button" class = "btn caction py-0 nobackground px-1 text-muted" data-bs-toggle = "modal" data-bs-target = "#awardModal" data-url = "/award/comment/{{c.id}}" data-nonce = "{{g.nonce}}" { % if c . author . immune_to_awards ( v ) % } disabled { % endif % } > < i class = "fas fa-gift" > < / i > Give Award< / button >
2022-07-23 08:53:17 +00:00
{%- endif %}
2023-01-01 11:36:20 +00:00
2023-04-27 18:50:16 +00:00
< button type = "button" id = "unsave-{{c.id}}" class = "btn caction py-0 nobackground px-1 {% if c.id in v.saved_comment_idlist %}d-md-inline-block{% endif %} text-muted d-none" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/unsave_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}','d-md-inline-block')" > < i class = "fas fa-save" > < / i > Unsave {% if c.num_savers %}< span data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Number of users who saved this comment" > [{{c.num_savers}}]< / span > {% endif %}< / button >
2023-01-01 11:36:20 +00:00
2023-04-27 18:50:16 +00:00
< button type = "button" id = "save-{{c.id}}" class = "btn caction py-0 nobackground px-1 {% if c.id not in v.saved_comment_idlist %}d-md-inline-block{% endif %} text-muted d-none" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/save_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}','d-md-inline-block')" > < i class = "fas fa-save" > < / i > Save {% if c.num_savers %}< span data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Number of users who saved this comment" > [{{c.num_savers}}]< / span > {% endif %}< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
2023-06-23 13:46:42 +00:00
{% if c.parent_post or c.wall_user_id %}
2022-07-23 08:53:17 +00:00
{% if v and c.author_id == v.id %}
2022-12-30 12:14:18 +00:00
< button type = "button" class = "btn caction py-0 nobackground px-1 text-muted" data-nonce = "{{g.nonce}}" data-onclick = "toggleEdit('{{c.id}}')" > < i class = "fas fa-edit fa-fw" > < / i > Edit< / button >
2023-01-01 11:36:20 +00:00
2023-03-11 05:13:45 +00:00
< button type = "button" id = "undelete-{{c.id}}" class = "btn caction py-0 nobackground px-1 text-muted {% if not c.deleted_utc %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/undelete/comment/{{c.id}}','delete-{{c.id}}','undelete-{{c.id}}','d-none')" data-toggleelement = ".comment-{{c.id}}-only" data-toggleattr = "deleted" > < i class = "fas fa-trash-alt fa-fw" > < / i > Undelete< / button >
2022-07-23 08:53:17 +00:00
2022-12-30 12:14:18 +00:00
< button type = "button" id = "delete-{{c.id}}" class = "btn caction py-0 nobackground px-1 text-muted {% if c.deleted_utc %}d-none{% endif %}" data-bs-toggle = "modal" data-bs-target = "#deleteCommentModal" data-nonce = "{{g.nonce}}" data-onclick = "delete_commentModal(this, '{{c.id}}')" > < i class = "fas fa-trash-alt fa-fw" > < / i > Delete< / button >
2022-07-23 08:53:17 +00:00
{% elif v and c.body %}
2023-02-27 01:37:53 +00:00
< button type = "button" class = "btn caction py-0 nobackground px-1 text-muted" data-nonce = "{{g.nonce}}" data-onclick = "expandMarkdown('{{c.fullname}}')" > < i class = "fas text-expand-icon-{{c.fullname}} fa-expand-alt" > < / i > < span class = "expand-text-{{c.fullname}}" > View source< / span > < / button >
2022-07-23 08:53:17 +00:00
{% endif %}
{% endif %}
2023-03-17 08:17:53 +00:00
{% if v %}
< button type = "button" style = "margin-top:0.2rem" class = "btn caction py-0 nobackground px-1 text-muted" data-bs-toggle = "dropdown" > < i class = "fas fa-ellipsis-h fa-fw" > < / i > < / button >
< ul class = "dropdown-menu" >
2022-07-23 08:53:17 +00:00
2022-11-26 04:34:04 +00:00
{% if v.admin_level >= PERMS['APPS_MODERATION'] and c.oauth_app %}
< a href = "{{c.oauth_app.permalink}}/comments" class = "dropdown-item list-inline-item d-mob-none text-primary" > < i class = "fas fa-code text-primary fa-fw" > < / i > API App< / a >
{% endif %}
2023-05-01 18:33:41 +00:00
{% if v.admin_level >= PERMS['POST_COMMENT_DISTINGUISH'] %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "undistinguish-{{c.id}}" class = "dropdown-item list-inline-item d-none {% if c.distinguish_level %}d-md-block{% endif %} text-info" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','d-md-block')" > < i class = "fas fa-id-badge text-info fa-fw" > < / i > Undistinguish< / button >
< button type = "button" id = "distinguish-{{c.id}}" class = "dropdown-item list-inline-item d-none {% if not c.distinguish_level %}d-md-block{% endif %} text-info" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','d-md-block')" > < i class = "fas fa-id-badge text-info fa-fw" > < / i > Distinguish< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
{% if v.id != c.author_id and not c.ghost %}
2023-03-01 19:28:10 +00:00
< button type = "button" id = "unblock-{{c.id}}" class = "dropdown-item text-success list-inline-item {% if not c.is_blocking %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/settings/unblock?username={{c.author_name}}','block-{{c.id}}','unblock-{{c.id}}','d-none')" > < i class = "fas fa-eye text-success" > < / i > Unblock user< / button >
2022-07-23 08:53:17 +00:00
2023-03-01 19:28:10 +00:00
< button type = "button" id = "block-{{c.id}}" class = "dropdown-item list-inline-item text-danger {% if c.is_blocking %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/settings/block?username={{c.author_name}}','block-{{c.id}}','unblock-{{c.id}}','d-none')" > < i class = "fas fa-eye-slash text-danger" > < / i > Block user< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
2023-06-23 13:46:42 +00:00
{% if c.parent_post %}
2022-07-23 08:53:17 +00:00
{% set url = "" %}
2022-10-06 00:57:08 +00:00
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
2022-07-23 08:53:17 +00:00
{% set url = "sticky_comment" %}
{% elif v.id == c.post.author_id %}
{% set url = "pin_comment" %}
{% elif c.post.sub and v.mods(c.post.sub) %}
{% set url = "mod_pin" %}
{% endif %}
{% if url != "" %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "unpin-{{c.id}}" class = "dropdown-item list-inline-item {% if c.stickied %}d-md-block{% endif %} text-muted d-none text-info" data-bs-dismiss = "modal" data-bs-target = "#actionsModal-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/un{{url}}/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}','d-md-block')" > < i class = "fas fa-thumbtack fa-rotate--45 text-info fa-fw" > < / i > Unpin< / button >
2023-01-01 11:36:20 +00:00
2022-12-30 12:14:18 +00:00
< button type = "button" id = "pin-{{c.id}}" class = "dropdown-item list-inline-item {% if not c.stickied %}d-md-block{% endif %} text-muted d-none text-info" data-bs-dismiss = "modal" data-bs-target = "#actionsModal-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/{{url}}/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}','d-md-block')" > < i class = "fas fa-thumbtack fa-rotate--45 text-info fa-fw" > < / i > Pin< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
{% endif %}
2022-10-06 00:57:08 +00:00
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "approve-{{c.id}}" class = "dropdown-item list-inline-item d-none {% if c.is_banned or request.path == '/admin/reported/comments' %}d-md-block{% endif %} text-success" data-nonce = "{{g.nonce}}" data-onclick = "approveComment(this,'{{c.id}}','approve-{{c.id}}','remove-{{c.id}}','d-md-block')" > < i class = "fas fa-check text-success fa-fw" > < / i > Approve< / button >
< button type = "button" id = "remove-{{c.id}}" class = "dropdown-item list-inline-item d-none {% if not c.is_banned %}d-md-block{% endif %} text-danger" data-nonce = "{{g.nonce}}" data-onclick = "removeComment(this,'{{c.id}}','approve-{{c.id}}','remove-{{c.id}}','d-md-block')" > < i class = "fas fa-ban text-danger fa-fw" > < / i > Remove< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
2023-06-23 13:46:42 +00:00
{% if c.parent_post %}
2022-07-23 08:53:17 +00:00
{% set sub = c.post.sub %}
{% if sub and v.mods(sub) and not c.author.mods(sub) %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "exile-{{c.id}}" class = "d-none {% if not c.author.exiled_from(sub) %}d-md-block{% endif %} dropdown-item list-inline-item text-danger" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/exile/comment/{{c.id}}','exile-{{c.id}}','unexile-{{c.id}}','d-none')" > < i class = "fas fa-campfire text-danger fa-fw" > < / i > Exile user< / button >
< button type = "button" id = "unexile-{{c.id}}" class = "d-none {% if c.author.exiled_from(sub) %}d-md-block{% endif %} dropdown-item list-inline-item text-success" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/h/{{sub}}/unexile/{{c.author_id}}','exile-{{c.id}}','unexile-{{c.id}}','d-none')" > < i class = "fas fa-campfire text-success fa-fw" > < / i > Unexile user< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
{% endif %}
2023-01-25 11:35:37 +00:00
{% if v.admin_level >= PERMS['PROGSTACK'] %}
2023-02-19 14:02:30 +00:00
< button type = "button" id = "progstack-{{c.id}}" class = "dropdown-item list-inline-item d-none {% if c.is_approved != PROGSTACK_ID %}d-md-block{% endif %} text-danger" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/admin/progstack/comment/{{c.id}}','progstack-{{c.id}}','unprogstack-{{c.id}}','d-md-block')" > < i class = "fas fa-bullhorn text-danger fa-fw" > < / i > Apply Progressive Stack< / button >
< button type = "button" id = "unprogstack-{{c.id}}" class = "dropdown-item list-inline-item d-none {% if c.is_approved == PROGSTACK_ID %}d-md-block{% endif %} text-danger" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/admin/unprogstack/comment/{{c.id}}','progstack-{{c.id}}','unprogstack-{{c.id}}','d-md-block')" > < i class = "fas fa-bullhorn text-danger fa-fw" > < / i > Remove Progressive Stack< / button >
2023-01-25 11:35:37 +00:00
{% endif %}
2023-06-23 13:46:42 +00:00
{% if FEATURES['NSFW_MARKING'] and (c.parent_post or c.wall_user_id) and (c.author_id==v.id or v.admin_level >= PERMS['POST_COMMENT_MODERATION'] or (c.post.sub and v.mods(c.post.sub))) %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "unmark-{{c.id}}" class = "dropdown-item list-inline-item d-none {% if c.over_18 %}d-md-block{% endif %} text-success" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}','d-md-block')" > < i class = "fas fa-eye-evil text-success fa-fw" > < / i > Unmark +18< / button >
< button type = "button" id = "mark-{{c.id}}" class = "dropdown-item list-inline-item d-none {% if not c.over_18 %}d-md-block{% endif %} text-danger" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}','d-md-block')" > < i class = "fas fa-eye-evil text-danger fa-fw" > < / i > Mark +18< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
2022-10-06 02:24:37 +00:00
{% if v.admin_level >= PERMS['USER_BAN'] and v.id != c.author_id %}
2023-03-17 14:37:13 +00:00
< button type = "button" id = "unban-{{c.fullname}}" class = "dropdown-item list-inline-item d-mob-none {% if not c.author.is_suspended %}d-none{% endif %} text-success" data-nonce = "{{g.nonce}}" data-onclick = "unchud_or_unban(this,'/unban_user/{{c.fullname}}')" > < i class = "fas fa-user-slash text-success fa-fw" > < / i > Unban user< / button >
2023-06-29 19:51:32 +00:00
< button type = "button" class = "{% if c.author.is_permabanned %}d-none{% endif %} dropdown-item list-inline-item d-mob-none text-danger" data-bs-toggle = "modal" data-bs-target = "#banModal" data-nonce = "{{g.nonce}}" data-onclick = "punishModal(this, 'ban', '/comment/{{c.id}}', '{{c.author_name}}', '{{c.fullname}}')" > < i class = "fas fa-user-slash text-danger fa-fw" > < / i > Ban user< / button >
2022-11-05 02:12:17 +00:00
{% endif %}
2023-06-23 11:07:47 +00:00
{% if v.admin_level >= PERMS['USER_CHUD'] and v.id != c.author_id %}
< button type = "button" id = "unchud-{{c.fullname}}" class = "dropdown-item list-inline-item d-mob-none {% if not c.author.chud %}d-none{% endif %} text-success" data-nonce = "{{g.nonce}}" data-onclick = "unchud_or_unban(this,'/unchud_user/{{c.fullname}}')" > < i class = "fas fa-face-sleeping text-success fa-fw" > < / i > Unchud user< / button >
2023-03-17 14:37:13 +00:00
2023-06-23 11:07:47 +00:00
< button type = "button" class = "{% if c.author.chud == 1 %}d-none{% endif %} dropdown-item list-inline-item d-mob-none text-danger" data-bs-toggle = "modal" data-bs-target = "#chudModal" data-nonce = "{{g.nonce}}" data-onclick = "punishModal(this, 'chud', '/comment/{{c.id}}', '{{c.author_name}}', '{{c.fullname}}')" > < i class = "fas fa-face-sleeping text-danger fa-fw" > < / i > Chud user< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
< / ul >
{% endif %}
< / li >
< / ul >
< / div >
{% endif %}
< / div >
2022-12-04 18:39:06 +00:00
{% if v and v.id != c.author_id and c.body %}
2023-06-14 18:20:39 +00:00
< div autocomplete = "off" class = "markdown d-none border my-2 p-3 rounded" id = "markdown-{{c.fullname}}" readonly > {{c.body.strip()}}< / div >
2022-07-23 08:53:17 +00:00
{% endif %}
2023-01-23 11:04:07 +00:00
2023-06-23 13:46:42 +00:00
{% if c.parent_post or c.wall_user_id %}
2023-01-23 11:04:07 +00:00
{{macros.comment_reply_box(c.fullname, "reply-to-" + c.fullname, "d-none", "collapsed child", 'reply-to-' + c.fullname, true)}}
{% endif %}
2022-07-23 08:53:17 +00:00
{% if request.path.startswith('/transfers') %}
2022-10-14 15:31:35 +00:00
< a href = "{{c.log_link}}" > < i class = "far fa-link ml-1 text-muted" > < / i > < / a >
2022-10-28 23:35:14 +00:00
< button type = "button" class = "copy-link ml-3" data-clipboard-text = "{{c.log_link}}" > < i class = "far fa-copy text-muted" > < / i > < / button >
2022-07-23 08:53:17 +00:00
{% endif %}
2023-01-01 11:36:20 +00:00
{% if render_replies %}
2022-09-10 00:47:48 +00:00
< div id = "replies-of-{{c.fullname}}" >
2023-03-11 08:55:43 +00:00
{% if request.path.startswith('/notifications') and replies|length > 8 %}
{% for reply in replies %}
2023-06-23 13:46:42 +00:00
{% if reply.parent_post %}
2023-03-11 08:55:43 +00:00
{% set collapse = reply.collapse %}
{% else %}
{% set collapse = not reply.unread and loop.index != replies|length %}
{% endif %}
{{single_comment(reply, level=level+1, collapse=collapse)}}
{% endfor %}
{% elif request.path.startswith('/notifications') or level < 9 % }
{% for reply in replies %}
{{single_comment(reply, level=level+1)}}
{% endfor %}
2022-09-10 00:47:48 +00:00
{% elif replies %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "btn-{{c.id}}" class = "d-mob-none btn btn-primary mt-3" data-nonce = "{{g.nonce}}" data-onclick = "more_comments('{{c.id}}', '{{sort}}')" > More comments< / button >
2022-12-29 14:20:27 +00:00
< a class = "d-md-none py-3" href = "{{c.more_comments}}" > More comments < i class = "fas fa-long-arrow-right ml-1" > < / i > < / a >
2022-09-10 00:47:48 +00:00
{% endif %}
< / div >
2022-07-23 08:53:17 +00:00
2023-06-24 13:38:31 +00:00
{% if (request.path.startswith('/notifications') or request.path == '/search/messages') and c.level == 1 and c.sentto and not c.parent_post and c.author_id != AUTOJANNY_ID %}
2023-01-01 11:36:20 +00:00
{% if (v and v.admin_level >= PERMS['USER_BAN']) and (c.sentto == MODMAIL_ID) %}
2023-01-28 08:46:48 +00:00
< button type = "button" class = "btn btn-danger mt-2 mr-3 {% if c.author.is_muted %}d-none{% endif %}" id = "mute-user-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/mute_user/{{c.author.id}}','mute-user-{{c.id}}','unmute-user-{{c.id}}','d-none')" > Mute< / button >
< button type = "button" class = "btn btn-primary mt-2 mr-3 {% if not c.author.is_muted %}d-none{% endif %}" id = "unmute-user-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/unmute_user/{{c.author.id}}','mute-user-{{c.id}}','unmute-user-{{c.id}}','d-none')" > Unmute< / button >
2022-09-01 21:29:27 +00:00
{% endif %}
2023-01-28 08:46:48 +00:00
< button type = "button" class = "btn btn-primary nobackground mt-2" data-nonce = "{{g.nonce}}" data-onclick = "toggleReplyBox('reply-message-{{c.fullname}}')" > Reply< / button >
2022-11-13 12:18:01 +00:00
2022-12-14 04:16:43 +00:00
< div id = "reply-message-{{c.fullname}}" class = "d-none" >
2022-07-23 08:53:17 +00:00
< div id = "comment-form-space-{{c.id}}" class = "comment-write collapsed child" >
2022-12-30 16:56:16 +00:00
< div class = "input-group" >
2023-01-24 05:10:16 +00:00
< input hidden name = "formkey" value = "{{v|formkey}}" >
2023-02-27 15:02:35 +00:00
< textarea data-fullname = "{{c.fullname}}" required autocomplete = "off" minlength = "1" maxlength = "10000" name = "body" form = "reply-to-c_{{c.id}}" data-id = "{{c.id}}" class = "file-ta comment-box form-control rounded" id = "reply-form-body-{{c.id}}" rows = "3" data-preview = "message-reply-{{c.id}}" data-nonce = "{{g.nonce}}" data-oninput = "markdown(this)" > < / textarea >
2023-01-01 11:36:20 +00:00
< div class = "comment-format" id = "comment-format-bar-{{c.id}}" >
2023-02-27 15:02:35 +00:00
< button type = "button" data-nonce = "{{g.nonce}}" data-onclick = "loadEmojis('reply-form-body-{{c.id}}')" class = "btn btn-secondary format m-0" data-bs-toggle = "modal" data-bs-target = "#emojiModal" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Add Emoji" > < i class = "fas fa-smile-beam" > < / i > < / button >
2022-07-23 08:53:17 +00:00
2023-05-12 15:27:46 +00:00
{{macros.file_input('file-upload-reply-' ~ c.fullname, False, not get_setting('dm_media'))}}
2022-07-23 08:53:17 +00:00
< / div >
2023-02-27 17:25:38 +00:00
< div class = "ml-auto" >
< span id = "upload-prog-{{c.fullname}}" class = "d-none mt-1 mr-2" >
< progress max = "100" > < / progress >
< span > < / span >
< / span >
2023-03-11 05:13:45 +00:00
< button type = "button" data-nonce = "{{g.nonce}}" data-onclick = "remove_dialog()" class = "btn btn-link text-muted ml-auto" data-toggleelement = "#reply-message-{{c.fullname}}" data-toggleattr = "d-none" > Cancel< / button >
2023-02-27 17:25:38 +00:00
< button type = "button" id = "save-reply-to-{{c.id}}" class = "btn btn-primary ml-2" data-nonce = "{{g.nonce}}" data-onclick = "post_reply('{{c.id}}');remove_dialog()" > Reply< / button >
< / div >
2022-12-30 16:56:16 +00:00
< / div >
2022-07-23 08:53:17 +00:00
< div id = "message-reply-{{c.id}}" class = "preview mt-2" > < / div >
< / div >
< / div >
{% endif %}
{% else %}
2022-07-23 09:08:02 +00:00
< div id = "replies-of-{{c.fullname}}" > < / div >
2022-07-23 08:53:17 +00:00
{% endif %}
< / div >
2023-01-20 07:14:59 +00:00
< div class = "modal fade d-md-none" id = "actionsModal-{{c.id}}" tabindex = "-1" >
< div class = "modal-dialog modal-dialog-centered" >
2022-07-23 08:53:17 +00:00
< div class = "modal-content" >
< div class = "modal-header" >
2022-10-29 00:55:49 +00:00
< h6 class = "modal-title" > More options< / h6 >
2022-12-25 02:10:56 +00:00
< button type = "button" class = "close" data-bs-dismiss = "modal" >
< span > < i class = "far fa-times" > < / i > < / span >
2022-07-23 08:53:17 +00:00
< / button >
< / div >
< div class = "modal-body" >
< ul class = "list-group comment-actions" >
2023-03-24 11:56:27 +00:00
{% if v and (not c.ghost or v.admin_level >= PERMS['SEE_GHOST_VOTES']) %}
2022-12-11 19:32:30 +00:00
< a href = "/votes/{{c.fullname}}" > < li class = "list-group-item" > < i class = "fas fa-arrows-v mr-2" > < / i > Votes< / li > < / a >
{% endif %}
2022-07-23 08:53:17 +00:00
2022-12-05 03:01:50 +00:00
< a class = "list-group-item" href = "{{c.permalink}}" > < i class = "fas fa-book-open mr-2" > < / i > Context< / a >
2022-07-23 08:53:17 +00:00
2023-03-21 15:39:26 +00:00
< button type = "button" class = "list-group-item copy-link" data-bs-dismiss = "modal" data-clipboard-text = "{% if SITE == 'rdrama.net' %}{{SITE_FULL}}{{c.shortlink}}{% else %}{{c.permalink}}{% endif %}" > < i class = "fas fa-copy mr-2" > < / i > Copy link< / button >
2022-07-23 08:53:17 +00:00
{% if v %}
2022-12-30 12:14:18 +00:00
< button type = "button" data-bs-toggle = "modal" data-bs-dismiss = "modal" data-bs-target = "#reportCommentModal" data-nonce = "{{g.nonce}}" data-onclick = "report_commentModal('{{c.id}}','{{c.author_name}}')" class = "list-group-item" > < i class = "fas fa-flag mr-2" > < / i > Report< / button >
2022-07-23 08:53:17 +00:00
2022-12-05 03:01:50 +00:00
{% if FEATURES['AWARDS'] -%}
2023-06-23 11:37:22 +00:00
< button type = "button" class = "list-group-item" data-bs-toggle = "modal" data-bs-target = "#awardModal" data-url = "/award/comment/{{c.id}}" data-nonce = "{{g.nonce}}" { % if c . author . immune_to_awards ( v ) % } disabled { % endif % } > < i class = "fas fa-gift mr-2" > < / i > Give Award< / button >
2022-07-23 08:53:17 +00:00
{%- endif %}
2023-04-27 18:50:16 +00:00
< button type = "button" id = "save2-{{c.id}}" class = "list-group-item {% if c.id in v.saved_comment_idlist %}d-none{% endif %}" data-bs-dismiss = "modal" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/save_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}','d-none')" > < i class = "fas fa-save mr-2" > < / i > Save {% if c.num_savers %}< span data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Number of users who saved this comment" > [{{c.num_savers}}]< / span > {% endif %}< / button >
2022-07-23 08:53:17 +00:00
2023-04-27 18:50:16 +00:00
< button type = "button" id = "unsave2-{{c.id}}" class = "list-group-item {% if c.id not in v.saved_comment_idlist %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/unsave_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-save mr-2" > < / i > Unsave {% if c.num_savers %}< span data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "Number of users who saved this comment" > [{{c.num_savers}}]< / span > {% endif %}< / button >
2022-07-23 08:53:17 +00:00
{% if c.author_id == v.id %}
2022-12-30 12:14:18 +00:00
< button type = "button" data-bs-dismiss = "modal" data-nonce = "{{g.nonce}}" data-onclick = "toggleEdit('{{c.id}}')" class = "list-group-item" > < i class = "fas fa-edit mr-2" > < / i > Edit< / button >
2023-01-01 11:36:20 +00:00
2023-03-11 05:13:45 +00:00
< button type = "button" id = "undelete2-{{c.id}}" class = "{% if not c.deleted_utc %}d-none{% endif %} list-group-item text-success" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/undelete/comment/{{c.id}}', 'delete2-{{c.id}}', 'undelete2-{{c.id}}','d-none')" data-toggleelement = ".comment-{{c.id}}-only" data-toggleattr = "deleted" data-bs-dismiss = "modal" > < i class = "far fa-trash-alt text-success mr-2" > < / i > Undelete< / button >
2022-07-23 08:53:17 +00:00
2022-12-30 12:14:18 +00:00
< button type = "button" id = "delete2-{{c.id}}" class = "{% if c.deleted_utc %}d-none{% endif %} list-group-item text-danger" data-bs-toggle = "modal" data-bs-dismiss = "modal" data-bs-target = "#deleteCommentModal" data-nonce = "{{g.nonce}}" data-onclick = "delete_commentModal(this, '{{c.id}}')" > < i class = "far fa-trash-alt text-danger mr-2" > < / i > Delete< / button >
2022-07-23 08:53:17 +00:00
{% else %}
{% if c.body %}
2023-02-27 01:37:53 +00:00
< button type = "button" data-bs-dismiss = "modal" data-nonce = "{{g.nonce}}" data-onclick = "expandMarkdown('{{c.fullname}}')" class = "list-group-item" > < i class = "fas text-expand-icon-{{c.fullname}} fa-expand-alt mr-2" > < / i > < span class = "expand-text-{{c.fullname}}" > View source< / span > < / button >
2022-07-23 08:53:17 +00:00
{% endif %}
{% if not c.ghost %}
2023-03-01 19:28:10 +00:00
< button type = "button" id = "unblock2-{{c.id}}" data-bs-dismiss = "modal" class = "text-success list-group-item {% if not c.is_blocking %}d-none{% endif %}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/settings/unblock?username={{c.author_name}}','block2-{{c.id}}','unblock2-{{c.id}}','d-none')" > < i class = "fas fa-eye-slash text-success mr-2" > < / i > Unblock user< / button >
2022-10-08 06:06:46 +00:00
2023-03-01 19:28:10 +00:00
< button type = "button" id = "block2-{{c.id}}" class = "{% if c.is_blocking %}d-none{% endif %} list-group-item text-danger" data-areyousure = "postToastSwitch(this,'/settings/block?username={{c.author_name}}','block2-{{c.id}}','unblock2-{{c.id}}','d-none')" data-nonce = "{{g.nonce}}" data-onclick = "areyousure(this)" data-dismiss = "modal" > < i class = "fas fa-eye-slash fa-fw text-danger mr-2" > < / i > Block user< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
{% endif %}
2023-02-01 18:52:34 +00:00
{% if FEATURES['NSFW_MARKING'] and (c.author_id == v.id or (c.post.sub and v.mods(c.post.sub))) %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "mark2-{{c.id}}" class = "{% if c.over_18 %}d-none{% endif %} list-group-item text-danger" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-eye-evil text-danger mr-2" > < / i > Mark +18< / button >
< button type = "button" id = "unmark2-{{c.id}}" class = "{% if not c.over_18 %}d-none{% endif %} list-group-item text-success" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-eye-evil text-success mr-2" > < / i > Unmark +18< / button >
2022-10-04 20:10:59 +00:00
{% endif %}
2022-10-06 00:57:08 +00:00
{% if v.admin_level < PERMS [ ' POST_COMMENT_MODERATION ' ] % }
2023-06-23 13:46:42 +00:00
{% if c.parent_post and v.id == c.post.author_id %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "pin2-{{c.id}}" class = "list-group-item {% if c.stickied %}d-none{% endif %} text-info" data-bs-target = "#actionsModal-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/pin_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-thumbtack fa-rotate--45 text-info mr-2" > < / i > Pin< / button >
< button type = "button" id = "unpin2-{{c.id}}" class = "list-group-item {% if not c.stickied %}d-none{% endif %} text-info" data-bs-target = "#actionsModal-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/unpin_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-thumbtack fa-rotate--45 text-info mr-2" > < / i > Unpin< / button >
2022-07-23 08:53:17 +00:00
{% elif c.post.sub and v.mods(c.post.sub) %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "pin2-{{c.id}}" class = "list-group-item {% if c.stickied %}d-none{% endif %} text-info" data-bs-target = "#actionsModal-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/mod_pin/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-thumbtack fa-rotate--45 text-info mr-2" > < / i > Pin< / button >
< button type = "button" id = "unpin2-{{c.id}}" class = "list-group-item {% if not c.stickied %}d-none{% endif %} text-info" data-bs-target = "#actionsModal-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/mod_unpin/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-thumbtack fa-rotate--45 text-info mr-2" > < / i > Unpin< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
{% endif %}
2023-06-23 13:46:42 +00:00
{% if c.parent_post %}
2022-07-23 08:53:17 +00:00
{% set sub = c.post.sub %}
{% if sub and v.mods(sub) and not c.author.mods(sub) %}
2022-12-30 12:14:18 +00:00
< button type = "button" data-bs-dismiss = "modal" id = "exile2-{{c.id}}" class = "{% if c.author.exiled_from(sub) %}d-none{% endif %} list-group-item text-danger" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/exile/comment/{{c.id}}','exile2-{{c.id}}','unexile2-{{c.id}}','d-none')" > < i class = "fas fa-campfire text-danger mr-2" > < / i > Exile user< / button >
< button type = "button" data-bs-dismiss = "modal" id = "unexile2-{{c.id}}" class = "{% if not c.author.exiled_from(sub) %}d-none{% endif %} list-group-item text-success" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/h/{{sub}}/unexile/{{c.author_id}}','exile2-{{c.id}}','unexile2-{{c.id}}','d-none')" > < i class = "fas fa-campfire text-success mr-2" > < / i > Unexile user< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
{% endif %}
{% endif %}
< / ul >
< / div >
< / div >
< / div >
< / div >
2023-01-29 08:28:29 +00:00
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
2023-01-20 07:14:59 +00:00
< div class = "modal fade d-md-none" id = "adminModal-{{c.id}}" tabindex = "-1" >
< div class = "modal-dialog modal-dialog-centered" >
2022-07-23 08:53:17 +00:00
< div class = "modal-content" >
< div class = "modal-header" >
2022-10-29 00:55:49 +00:00
< h6 class = "modal-title" > Admin options< / h6 >
2022-12-25 02:10:56 +00:00
< button type = "button" class = "close" data-bs-dismiss = "modal" >
< span > < i class = "far fa-times" > < / i > < / span >
2022-07-23 08:53:17 +00:00
< / button >
< / div >
< div class = "modal-body" >
< ul class = "list-group comment-actions" >
2023-06-23 13:46:42 +00:00
{% if c.parent_post or c.wall_user_id %}
2022-11-26 04:34:04 +00:00
{% if v.admin_level >= PERMS['APPS_MODERATION'] and c.oauth_app %}
< a href = "{{c.oauth_app.permalink}}/comments" class = "list-group-item text-info" > < i class = "fas fa-code text-info mr-2" > < / i > API App< / a >
{% endif %}
2023-05-01 18:33:41 +00:00
{% if v.admin_level >= PERMS['POST_COMMENT_DISTINGUISH'] %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "distinguish2-{{c.id}}" class = "list-group-item {% if c.distinguish_level %}d-none{% endif %} text-info" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-id-badge text-info mr-2" > < / i > Distinguish< / button >
< button type = "button" id = "undistinguish2-{{c.id}}" class = "list-group-item {% if not c.distinguish_level %}d-none{% endif %} text-info" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-id-badge text-info mr-2" > < / i > Undistinguish< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "pin2-{{c.id}}" class = "list-group-item {% if c.stickied %}d-none{% endif %} text-info" data-bs-target = "#adminModal-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/sticky_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-thumbtack fa-rotate--45 text-info mr-2" > < / i > Pin< / button >
< button type = "button" id = "unpin2-{{c.id}}" class = "list-group-item {% if not c.stickied %}d-none{% endif %} text-info" data-bs-target = "#adminModal-{{c.id}}" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/unsticky_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-thumbtack fa-rotate--45 text-info mr-2" > < / i > Unpin< / button >
2022-07-23 08:53:17 +00:00
2023-02-01 18:52:34 +00:00
{% if FEATURES['NSFW_MARKING'] %}
< button type = "button" id = "mark2-{{c.id}}" class = "{% if c.over_18 %}d-none{% endif %} list-group-item text-danger" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-eye-evil text-danger mr-2" > < / i > Mark +18< / button >
< button type = "button" id = "unmark2-{{c.id}}" class = "{% if not c.over_18 %}d-none{% endif %} list-group-item text-success" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-eye-evil text-success mr-2" > < / i > Unmark +18< / button >
{% endif %}
2022-07-23 08:53:17 +00:00
{% endif %}
2023-01-25 11:35:37 +00:00
{% if v.admin_level >= PERMS['PROGSTACK'] %}
2023-02-19 14:02:30 +00:00
< button type = "button" id = "progstack2-{{c.id}}" class = "{% if c.is_approved == PROGSTACK_ID %}d-none{% endif %} list-group-item text-danger" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/admin/progstack/comment/{{c.id}}','progstack2-{{c.id}}','unprogstack2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-bullhorn text-danger fa-fw mr-2" > < / i > Apply Progressive Stack< / button >
< button type = "button" id = "unprogstack2-{{c.id}}" class = "{% if c.is_approved != PROGSTACK_ID %}d-none{% endif %} list-group-item text-danger" data-nonce = "{{g.nonce}}" data-onclick = "postToastSwitch(this,'/admin/unprogstack/comment/{{c.id}}','progstack2-{{c.id}}','unprogstack2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-bullhorn text-danger fa-fw mr-2" > < / i > Remove Progressive Stack< / button >
2023-01-25 11:35:37 +00:00
{% endif %}
2022-10-06 07:17:12 +00:00
{% if v.id != c.author_id and v.admin_level >= PERMS['USER_BAN'] %}
2023-03-17 14:37:13 +00:00
< button type = "button" id = "unban2-{{c.fullname}}" class = "{% if not c.author.is_suspended %}d-none{% endif %} list-group-item text-success" data-nonce = "{{g.nonce}}" data-onclick = "unchud_or_unban(this,'/unban_user/{{c.fullname}}')" data-bs-dismiss = "modal" > < i class = "fas fa-user-minus fa-fw text-success mr-2" > < / i > Unban user< / button >
2023-06-29 19:51:32 +00:00
< button type = "button" class = "list-group-item text-danger {% if c.author.is_permabanned %}d-none{% endif %}" data-bs-dismiss = "modal" data-bs-toggle = "modal" data-bs-target = "#banModal" data-nonce = "{{g.nonce}}" data-onclick = "punishModal(this, 'ban', '/comment/{{c.id}}', '{{c.author_name}}', '{{c.fullname}}')" > < i class = "fas fa-user-slash text-danger fa-fw mr-2" > < / i > Ban user< / button >
2022-11-05 02:12:17 +00:00
{% endif %}
2023-06-23 11:07:47 +00:00
{% if v.id != c.author_id and v.admin_level >= PERMS['USER_CHUD'] %}
< button type = "button" id = "unchud2-{{c.fullname}}" class = "{% if not c.author.chud %}d-none{% endif %} list-group-item text-success" data-nonce = "{{g.nonce}}" data-onclick = "unchud_or_unban(this,'/unchud_user/{{c.fullname}}')" data-bs-dismiss = "modal" > < i class = "fas fa-face-sleeping fa-fw text-success mr-2" > < / i > Unchud user< / button >
2023-03-17 14:37:13 +00:00
2023-06-23 11:07:47 +00:00
< button type = "button" class = "list-group-item text-danger {% if c.author.chud == 1 %}d-none{% endif %}" data-bs-dismiss = "modal" data-bs-toggle = "modal" data-bs-target = "#chudModal" data-nonce = "{{g.nonce}}" data-onclick = "punishModal(this, 'chud', '/comment/{{c.id}}', '{{c.author_name}}', '{{c.fullname}}')" > < i class = "fas fa-face-sleeping text-danger fa-fw mr-2" > < / i > Chud user< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
2022-11-05 02:12:17 +00:00
2022-10-06 07:17:12 +00:00
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
2022-12-30 12:14:18 +00:00
< button type = "button" id = "remove2-{{c.id}}" class = "{% if c.is_banned %}d-none{% endif %} list-group-item text-danger" data-nonce = "{{g.nonce}}" data-onclick = "removeComment(this,'{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-ban text-danger mr-2" > < / i > Remove< / button >
< button type = "button" id = "approve2-{{c.id}}" class = "{% if not c.is_banned and request.path != '/admin/reported/comments' %}d-none{% endif %} list-group-item text-success" data-nonce = "{{g.nonce}}" data-onclick = "approveComment(this,'{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}','d-none')" data-bs-dismiss = "modal" > < i class = "fas fa-check text-success mr-2" > < / i > Approve< / button >
2022-07-23 08:53:17 +00:00
{% endif %}
< / ul >
< / div >
< / div >
< / div >
< / div >
{% endif %}
< / div >
{% endif %}
2023-02-27 19:10:53 +00:00
{% endif %}
2022-07-23 08:53:17 +00:00
{% endmacro %}
2023-02-27 19:10:53 +00:00
{% for comment in comments %}
2022-07-23 08:53:17 +00:00
{{single_comment(comment)}}
{% endfor %}
2022-08-30 05:26:13 +00:00
{% if not request.headers.get("xhr") %}
2022-07-23 08:53:17 +00:00
{% if v %}
2022-11-15 19:14:29 +00:00
{% include "modals/gif.html" %}
{% include "modals/emoji.html" %}
2022-10-06 01:58:43 +00:00
{% if v.admin_level >= PERMS['USER_BAN'] %}
2023-03-17 14:37:13 +00:00
{% include "modals/punish.html" %}
2022-07-23 08:53:17 +00:00
{% endif %}
2023-01-20 07:14:59 +00:00
< div class = "modal fade" id = "deleteCommentModal" tabindex = "-1" >
< div class = "modal-dialog modal-dialog-centered" >
2022-07-23 08:53:17 +00:00
< div class = "modal-content" >
< div class = "modal-header d-none d-md-flex" >
< h5 class = "modal-title" > Delete comment?< / h5 >
2022-12-25 02:10:56 +00:00
< button type = "button" class = "close" data-bs-dismiss = "modal" >
< span > < i class = "far fa-times" > < / i > < / span >
2022-07-23 08:53:17 +00:00
< / button >
< / div >
< div class = "modal-body text-center" >
< div class = "py-4" >
2022-10-23 17:57:38 +00:00
< i class = "fas fa-trash-alt text-muted d-mob-none" style = "font-size: 3.5rem;" > < / i >
2022-07-23 08:53:17 +00:00
< / div >
2022-10-29 00:55:49 +00:00
< h4 class = "d-md-none" > Delete comment?< / h4 >
2022-07-23 08:53:17 +00:00
2022-10-23 17:57:38 +00:00
< p class = "d-mob-none" > Your comment will be deleted everywhere on {{SITE_NAME}}.< / p >
2022-07-23 08:53:17 +00:00
< p class = "text-muted d-md-none" > Your comment will be deleted everywhere on {{SITE_NAME}}.< / p >
2023-01-01 11:36:20 +00:00
2022-10-28 23:35:14 +00:00
< button type = "button" id = "deleteCommentButton" class = "btn btn-danger btn-block mt-5" data-bs-dismiss = "modal" > Delete comment< / button >
2022-07-23 08:53:17 +00:00
2022-10-28 23:35:14 +00:00
< button type = "button" class = "btn btn-secondary btn-block" data-bs-dismiss = "modal" > Cancel< / button >
2022-07-23 08:53:17 +00:00
< / div >
< / div >
< / div >
< / div >
2023-01-20 07:14:59 +00:00
< div class = "modal fade" id = "reportCommentModal" tabindex = "-1" >
< div class = "modal-dialog modal-dialog-centered" >
2022-07-23 08:53:17 +00:00
< div class = "modal-content" >
< div class = "modal-header" >
< h5 class = "modal-title" > Report < span id = "comment-author" > < / span > 's comment< / h5 >
2022-12-25 02:10:56 +00:00
< button type = "button" class = "close" data-bs-dismiss = "modal" >
< span > < i class = "far fa-times" > < / i > < / span >
2022-07-23 08:53:17 +00:00
< / button >
< / div >
2022-09-12 09:48:01 +00:00
< div class = "modal-body" >
2022-10-29 00:55:49 +00:00
< h6 > We're sorry something here is wrong.< / h6 >
2022-10-29 00:38:39 +00:00
< small class = "form-text text-muted mb-1" > Please enter a reason for reporting below.< / small >
2022-09-12 09:48:01 +00:00
< input autocomplete = "off" maxlength = "100" id = "reason_comment" class = "form-control" >
< / div >
< div class = "modal-footer" >
2022-10-28 23:35:14 +00:00
< button type = "button" class = "btn btn-link text-muted" data-bs-dismiss = "modal" > Cancel< / button >
2023-03-06 19:21:51 +00:00
< button type = "button" id = "reportCommentButton" class = "btn btn-primary btn-danger" data-bs-dismiss = "modal" > Report comment< / button >
2022-07-23 08:53:17 +00:00
< / div >
< / div >
< / div >
< / div >
{% endif %}
{% if v %}
2022-11-18 19:16:40 +00:00
< script defer src = "{{'js/vendor/marked.js' | asset}}" > < / script >
< script defer src = "{{'js/markdown.js' | asset}}" > < / script >
2022-09-24 07:04:06 +00:00
< script defer src = "{{'js/comments_v.js' | asset}}" > < / script >
2022-07-23 08:53:17 +00:00
{% endif %}
2022-11-18 19:16:40 +00:00
< script defer src = "{{'js/vendor/clipboard.js' | asset}}" > < / script >
2022-07-23 08:53:17 +00:00
2023-01-29 08:28:29 +00:00
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
2023-02-21 18:24:21 +00:00
< script defer src = "{{'js/admin/comments.js' | asset}}" > < / script >
2022-07-23 08:53:17 +00:00
{% endif %}
2023-06-07 23:26:32 +00:00
< script defer src = "{{'js/comments+post_listing.js' | asset}}" > < / script >
2022-09-24 07:04:06 +00:00
< script defer src = "{{'js/comments.js' | asset}}" > < / script >
2022-12-29 14:20:27 +00:00
< script defer src = "{{'js/more_comments.js' | asset}}" > < / script >
{% endif %}
2022-07-23 08:53:17 +00:00
2022-12-29 14:20:27 +00:00
{% if p %}
{% set pid = p.id %}
2023-01-21 04:12:02 +00:00
< input hidden id = "comms" value = "{% for c in p.comments %}{% if c.author_id != v.id and not c.voted %}{{c.id}}:{{c.created_utc}},{% endif %}{% endfor %}" >
2022-07-23 08:53:17 +00:00
{% endif %}
{% if offset %}
< br >
2023-01-01 15:35:59 +00:00
< div id = "view_more-{{offset}}" > < button type = "button" id = "viewbtn" class = "btn btn-primary" data-nonce = "{{g.nonce}}" data-ids = "{{ids}}" data-onclick = "view_more(this, {{pid}},'{{sort}}',{{offset}})" > VIEW MORE COMMENTS< / a > < / div >
2022-08-24 23:18:37 +00:00
{% endif %}
2022-09-24 00:37:32 +00:00
< / body >