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" %}
<!-- conditions under which a comment might be hidden -->
{% 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) %}
< div id = "comment-{{c.base36id}}" class = "comment" >
< span class = "comment-collapse-desktop d-none d-md-block" style = "border-left: 2px solid #{{c.author.namecolor}};" onclick = "collapse_comment('{{c.base36id}}')" > < / span >
< div class = "comment-body" >
< div id = "comment-{{c.base36id}}-only" class = "" >
< div class = "user-info" >
< span class = "comment-collapse d-md-none" onclick = "collapse_comment('{{c.base36id}}')" > < / span >
{% if standalone and c.over_18 %}< span class = "badge badge-danger" > +18< / span > {% endif %}
[{% 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 %}]
< / 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 %}
{% if level< 6 % }
< div id = "replies-of-{{c.base36id}}" class = "" >
{% set standalone=False %}
{% for reply in c.children(v) %}
{{single_comment(reply, level=level+1)}}
{% endfor %}
< / div >
{% elif c.children(v) %}
< div id = "replies-of-{{c.base36id}}" class = "d-none d-md-block" >
{% set standalone=False %}
{% for reply in c.children(v) %}
{{single_comment(reply, level=level+1)}}
{% endfor %}
< / div >
< div id = "morecomment-{{c.base36id}}" class = "d-block d-md-none mt-2 more-comments text-small" >
< a href = "{{c.permalink}}" { % if c . author . is_private % } rel = "nofollow" { % endif % } > More comments < i class = "fas fa-long-arrow-right ml-1" > < / i > < / a >
< / div >
{% endif %}
{% endif %}
< / div >
< / div >
{% else %}
{% set score=c.score %}
{% if v %}
{% set voted=c.voted %}
{% set adjust = voted %}
{% else %}
{% set voted=-2 %}
{% set adjust=0 %}
{% 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" >
{% if c.parent_submission %}
{% 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.title | safe}}< / a > < / span >
{% elif c.post.author_id==v.id and c.is_top_level and is_notification_page%}
< span class = "font-weight-bold" > Post Reply: < a href = "{{c.post.permalink}}" > {{c.post.title | safe}}< / a > < / span >
{% 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.title | safe}}< / a > < / span >
{% elif is_notification_page %}
< span class = "font-weight-bold" > Username Mention: < a href = "{{c.post.permalink}}" > {{c.post.title | safe}}< / a > < / span >
{% else %}
< span class = "font-weight-bold" > < a href = "{{c.post.permalink}}" > {{c.post.title | safe}}< / a > < / span >
{% endif %}
{% elif c.author_id==1046 or c.author_id==2360 %}
< span class = "font-weight-bold" > Drama Notification< / span >
{% else %}
< span class = "font-weight-bold" > Private Message< / span >
{% endif %}
< / span >
< / div >
{% endif %}
< div id = "comment-{{c.base36id}}" class = "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}};" >
< span class = "comment-collapse-desktop d-none d-md-block" style = "border-left: 2px solid #{{c.author.namecolor}};" onclick = "collapse_comment('{{c.base36id}}')" > < / span >
< div class = "comment-body" >
< div id = "{% if comment_info and comment_info.id == c.id %}context{%else%}comment-{{c.base36id}}-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 %}" >
< div class = "user-info" >
< span class = "comment-collapse d-md-none" onclick = "collapse_comment('{{c.base36id}}')" > < / span >
2021-07-22 19:14:32 +00:00
{% if c.banaward %} < i class = "fas fa-gavel text-danger" data-toggle = "tooltip" data-placement = "bottom" title = "" data-original-title = "Given the 1-day ban award by @{{c.banaward}}" > < / i > {% endif %}
2021-07-24 21:01:34 +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}} Flags< / a > {% endif %}
2021-07-21 01:12:26 +00:00
{% if c.over_18 %}< span class = "badge badge-danger text-small-extra mr-1" > +18< / span > {% endif %}
{% if c.is_nsfl %}< span class = "badge text-black border-danger border-1 text-small-extra" > nsfl< / 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 = "Drama Badmin, 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 %}
2021-07-21 10:58:23 +00:00
{% if c.is_blocking %}< i class = "fas fa-user-minus text-warning" data-toggle = "tooltip" data-placement = "bottom" title = "" data-original-title = "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'}}." > < / 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-07-23 15:18:21 +00:00
{% if c.author.is_deleted %}[deleted account]{% else %}< a { % if c . author . animatedname % } class = "{% if c.author.patron %}patron{% else %}leaderboard{% endif %}" { % endif % } style = "color:#{{c.author.namecolor}}; font-size:12px; font-weight:bold;" href = "/@{{c.author.username}}" > {{c.author.username}}< / a > {% if c.author.customtitle %} < bdi style = "color: #{{c.author.titlecolor}}" > {{c.author.customtitle | safe}}< / bdi > {% endif %}{% endif %}
2021-07-21 01:12:26 +00:00
< span id = "timestamp-{{c.id}}" data-toggle = "tooltip" data-placement = "bottom" title = "" class = "time-stamp" > {{c.age_string}}< / span >
{% if c.edited_utc %}
< span class = "time-edited" > < span > · < / span > < span class = "font-italic" > Edited {{c.edited_string}}< / span > < / span >
{% endif %}
< / div >
{% 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 %}
< div id = "comment-text-{{c.base36id}}" class = "comment-text mb-0" >
{{c.realbody(v) | safe}}
{% if not c.parent_submission and c.author_id!=1046 and c.author_id!=2360 and c.author_id!=v.id %}
< a class = "btn btn-primary" href = "javascript:void(0)" onclick = "document.getElementById('reply-to-{{c.base36id}}').classList.toggle('d-none')" > Reply< / a >
< pre > < / pre >
< form class = "d-none" id = "reply-to-{{c.base36id}}" action = "/@{{c.author.username}}/reply/{{c.id}}" method = "post" >
< textarea id = "input-message-{{c.base36id}}" form = "reply-to-{{c.base36id}}" name = "message" rows = "3" class = "form-control" required > < / textarea >
< pre > < / pre >
< pre class = "btn btn-secondary format d-inline-block m-0 fas fa-bold" aria-hidden = "true" onclick = "makeBold('input-message-{{c.base36id}}')" data-toggle = "tooltip" data-placement = "bottom" title = "Bold" > < / pre >
< pre class = "btn btn-secondary format d-inline-block m-0 fas fa-italic" aria-hidden = "true" onclick = "makeItalics('input-message-{{c.base36id}}')" data-toggle = "tooltip" data-placement = "bottom" title = "Italicize" > < / pre >
< pre class = "btn btn-secondary format d-inline-block m-0 fas fa-quote-right" aria-hidden = "true" onclick = "makeQuote('input-message-{{c.base36id}}')" data-toggle = "tooltip" data-placement = "bottom" title = "Quote" > < / pre >
< pre style = "line-height:1;" class = "btn btn-secondary format d-inline-block m-0 font-weight-bolder text-uppercase" onclick = "commentForm('input-message-{{c.base36id}}');getGif()" aria-hidden = "true" data-toggle = "modal" data-target = "#gifModal" data-toggle = "tooltip" data-placement = "bottom" title = "Add GIF" > GIF< / pre >
< pre class = "btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick = "loadEmojis('input-message-{{c.base36id}}')" aria-hidden = "true" data-toggle = "modal" data-target = "#emojiModal" data-toggle = "tooltip" data-placement = "bottom" title = "Add Emoji" > < / pre >
< input type = "submit" value = "Submit" class = "btn btn-primary mt-3" >
< / form >
{% endif %}
< / div >
{% if c.parent_submission %}
{% if v and v.id==c.author_id and (standalone or is_allowed_to_comment) %}
< div id = "comment-edit-{{c.base36id}}" class = "d-none comment-write collapsed child" >
< form id = "comment-edit-form-{{c.base36id}}" action = "/edit_comment/{{c.base36id}}" method = "post" class = "input-group" enctype = "multipart/form-data" >
< input type = "hidden" name = "formkey" value = "{{v.formkey}}" >
< textarea id = "comment-edit-body-{{c.base36id}}" name = "body" form = "comment-edit-form-{{c.base36id}}" class = "comment-box form-control rounded" id = "edit-box-comment-{{c.base36id}}" 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.base36id}}');getGif()" data-toggle = "modal" data-target = "#gifModal" data-toggle = "tooltip" data-placement = "bottom" title = "Add GIF" > GIF< / span > < / small >
< 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.base36id}}')" data-toggle = "modal" data-target = "#emojiModal" data-toggle = "tooltip" data-placement = "bottom" title = "Add Emoji" > < / i > < / small >
< label class = "btn btn-secondary format d-inline-block m-0" for = "file-edit-reply-{{c.base36id}}" >
< div id = "filename-edit-reply-{{c.base36id}}" > < i class = "far fa-image" > < / i > < / div >
< input id = "file-edit-reply-{{c.base36id}}" type = "file" name = "file" accept = "image/*" onchange = "document.getElementById('filename-edit-reply-{{c.base36id}}').innerHTML='image';" hidden >
< / label >
< a id = "cancel-edit-{{c.base36id}}" href = "javascript:void(0)" onclick = "toggleEdit('{{c.base36id}}')" 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.base36id}}" class = "d-none d-md-block btn btn-primary ml-2" onclick = "comment_edit('{{c.base36id}}')" > Save Edit< / a >
< / div >
< a id = "cancel-edit-{{c.base36id}}" href = "javascript:void(0)" onclick = "toggleEdit('{{c.base36id}}')" 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.base36id}}" class = "d-block d-md-none btn btn-primary ml-2" onclick = "comment_edit('{{c.base36id}}')" > Save Edit< / a >
< / form >
< / div >
{% endif %}
{% if c.active_flags %}
< div id = "flaggers-{{c.id}}" class = "flaggers d-none" style = "margin: 7px; border: 1px solid #999b2e; padding: 10px; border-radius: 3px;" >
< strong style = "color: #999b2e;" > < i class = "far fa-fw fa-flag" > < / i > Reported by:< / strong >
< ul style = "margin-bottom: 0;" >
2021-07-24 21:01:34 +00:00
{% for u in c.flagged_by %}
< li > < a href = "{{ u.url }}" > @{{ u.username }}< / a > < / li >
{% endfor %}
< / ul >
2021-07-21 01:12:26 +00:00
< / div >
{% endif %}
< div id = "comment-{{c.base36id}}-actions" class = "comment-actions{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}" >
< ul class = "list-inline text-right text-md-left" >
{% if v and request.path.startswith('/@') and v.admin_level == 0%}
{% if voted==1 %}
< li class = "list-inline-item arrow-up d-none d-md-inline-block mr-2 comment-{{c.base36id}}-up active" > < / li >
{% endif %}
{% elif v %}
< li id = "comment-{{c.base36id}}-up" tabindex = "0" class = "list-inline-item arrow-up upvote-button d-none d-md-inline-block mr-2 comment-{{c.base36id}}-up {% if voted==1 %}active{% endif %}" data-id-up = "{{c.base36id}}" data-content-type = "comment" >
< / li >
{% else %}
< li id = "comment-{{c.base36id}}-up" tabindex = "0" class = "list-inline-item arrow-up d-none d-md-inline-block mr-2" onclick = "location.href='/login';" >
< / li >
{% endif %}
< 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.base36id}}" class = "score comment-score-{{c.base36id}} {% 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-none d-md-inline-block mr-2 comment-{{c.base36id}}-down active" > < / li >
{% endif %}
{% elif v %}
< li id = "comment-{{c.base36id}}-down" tabindex = "0" class = "list-inline-item arrow-down downvote-button d-none d-md-inline-block mr-2 comment-{{c.base36id}}-down {% if voted==-1 %}active{% endif %}" data-id-down = "{{c.base36id}}" data-content-type = "comment" >
< / li >
{% else %}
< li id = "comment-{{c.base36id}}-down" tabindex = "0" class = "list-inline-item arrow-down d-none d-md-inline-block" onclick = "location.href='/login';" >
< / li >
{% endif %}
< li class = "list-inline-item text-muted d-none d-md-inline-block" > < a href = "/votes?link=https://rdrama.net{{c.permalink}}" > < i class = "fas fa-arrows-v" > < / i > Votes< / a > < / li >
2021-07-22 19:57:26 +00:00
{% if v and v.id!=c.author_id and v.admin_level == 0 %}
2021-07-23 19:28:25 +00:00
{% if v.banawards > 0 %}
2021-07-23 22:13:12 +00:00
< li class = "list-inline-item text-muted d-none d-md-inline-block" > < a href = "javascript:void(0)" onclick = "post_toast('/banaward/comment/{{c.id}}')" > < i class = "fas fa-user-slash text-danger" > < / i > Give ban award< / a > < / li >
2021-07-23 19:28:25 +00:00
{% else %}
2021-07-23 22:13:12 +00:00
< li class = "list-inline-item text-muted d-none d-md-inline-block" > < a href = "/banaward/comment/{{c.id}}" > < i class = "fas fa-user-slash text-danger" > < / i > Give ban award< / a > < / li >
2021-07-23 19:28:25 +00:00
{% endif %}
2021-07-22 19:02:39 +00:00
{% endif %}
2021-07-22 18:52:13 +00:00
2021-07-21 01:12:26 +00:00
{% if v and c.id in v.saved_comment_idlist() %}
< li class = "list-inline-item text-muted d-none d-md-inline-block" > < a href = "javascript:void(0)" onclick = "post('/unsave_comment/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-save" > < / i > Unsave< / a > < / li >
{% else %}
< li class = "list-inline-item text-muted d-none d-md-inline-block" > < a href = "javascript:void(0)" onclick = "post('/save_comment/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-save" > < / i > Save< / a > < / li >
{% endif %}
{% if v %}
{% if standalone or is_allowed_to_comment %}
< li class = "list-inline-item text-muted" > < a href = "javascript:void(0)" onclick = "document.getElementById('reply-to-{{c.base36id}}').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 >
{% endif %}
{% endif %}
< li class = "list-inline-item text-muted d-none d-md-inline-block" > < a href = "{{c.permalink}}?context=99#context" { % if c . author . is_private % } rel = "nofollow" { % 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 = "{{c.permalink | full_link}}?context=99#context" > < i class = "fas fa-copy" > < / i > Copy link< / a > < / li >
{% if v and v.admin_level>=3 and request.path.startswith ('/admin') %}
< li class = "list-inline-item text-muted d-none d-md-inline-block" > < a href = "javascript:void(0)" onclick = "removeComment('{{c.base36id}}')" > < i class = "fas fa-comment-times fa-fw" > < / i > Remove< / a > < / li >
< li class = "list-inline-item text-muted d-none d-md-inline-block" > < a href = "javascript:void(0)" onclick = "approveComment('{{c.base36id}}')" > < i class = "fas fa-comment-check fa-fw" > < / i > Approve< / a > < / li >
{% endif %}
< li class = "list-inline-item d-none d-md-inline-block" >
< div class = "dropdown show" >
< a href = "#" role = "button" id = "dropdownMoreLink" data-toggle = "dropdown" aria-haspopup = "true"
aria-expanded="false">
< i class = "fas fa-ellipsis-h text-small align-middle mr-0" > < / i >
< / a >
< div class = "dropdown-menu border-0 shadow" aria-labelledby = "dropdownMoreLink" >
{% if not (v and v.id==c.author_id) %}
{% if v %}
2021-07-24 21:01:34 +00:00
< a class = "dropdown-item" href = "javascript:void(0)" data-toggle = "modal" data-target = "#reportCommentModal" onclick = "report_commentModal('{{c.base36id}}','{{c.author.username if not c.author.is_deleted else '[is_deleted]'}}',)" > < i class = "fas fa-flag fa-fw" > < / i > Flag< / a >
2021-07-21 01:12:26 +00:00
{% else %}
< a class = "dropdown-item" href = "javascript:void(0)" data-toggle = "modal" data-target = "#reportCommentModal" onclick = "" > < i class = "fas fa-flag fa-fw" > < / i > Flag< / a >
{% endif %}
{% endif %}
{% if v and c.parent_submission and c.author_id==v.id %}
< a class = "dropdown-item" href = "javascript:void(0)" onclick = "toggleEdit('{{c.base36id}}')" > < i class = "fas fa-edit fa-fw" > < / i > Edit< / a >
{% if c.deleted_utc > 0 %}
< a class = "dropdown-item" href = "javascript:void(0)" onclick = "post('/undelete/comment/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-trash-alt fa-fw" > < / i > Undelete< / a >
{% else %}
< a class = "dropdown-item" href = "javascript:void(0)" data-toggle = "modal" data-target = "#deleteCommentModal" onclick = "delete_commentModal('{{c.base36id}}')" > < i class = "fas fa-trash-alt fa-fw" > < / i > Delete< / a >
{% endif %}
{% endif %}
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 0) %}
< a class = "dropdown-item" href = "javascript:void(0)" onclick = "post('/api/toggle_comment_nsfw/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-eye-evil fa-fw" > < / i > Toggle +18< / a >
{% endif %}
{% if v %}
{% if v.admin_level and v.id==c.author_id %}
< div class = "dropdown-divider" > < / div >
< a class = "dropdown-item" id = "distinguish-{{c.base36id}}" href = "javascript:void(0)" onclick = "admin_comment('{{c.base36id}}')" > < i class = "fas fa-id-badge fa-fw" > < / i > {{'Undistinguish' if c.distinguish_level else 'Distinguish'}}< / a >
{% endif %}
{% if not v.id==c.author_id %}
< a class = "dropdown-item text-danger" href = "javascript:void(0)" onclick = "post_toast('/settings/block?username={{c.author.username}}')"
>< i class = "fas fa-user-slash fa-fw" > < / i > Block user< / a >
{% endif %}
{% if v.admin_level>=3 %}
{% if not c.is_banned %}
< a class = "dropdown-item removeDropdownItem" id = "moderate-{{c.base36id}}" href = "javascript:void(0)" onclick = "removeComment('{{c.base36id}}')" > < i class = "fas fa-comment-times fa-fw" > < / i > Remove< / a >
{% endif %}
{% if c.is_banned or request.path.startswith('/admin/') %}
< a class = "dropdown-item removeDropdownItem" id = "moderate-{{c.base36id}}" href = "javascript:void(0)" onclick = "approveComment('{{c.base36id}}')" > < i class = "fas fa-comment-check fa-fw" > < / i > Approve< / a >
{% endif %}
{% endif %}
{% if v.admin_level >=4 and c.oauth_app %}
< a class = "dropdown-item" href = "{{c.oauth_app.permalink}}/comments" > < i class = "fas fa-code fa-fw" > < / i > API App< / a >
{% endif %}
{% endif %}
{% if v and c.post and (v.admin_level == 6 or v.id == c.post.author_id) %}
< div class = "dropdown-divider" > < / div >
{% if c.is_top_level %}
< a class = "dropdown-item text-info" id = "pin-comment-{{c.base36id}}" href = "javascript:void(0)" data-dismiss = "modal" data-target = "#actionsModal-{{c.base36id}}" onclick = "post('/comment_pin/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-thumbtack fa-rotate--45 fa-fw text-info" > < / i > {{"Unpin" if c.is_pinned else "Pin"}}< / a >
{% endif %}
{% endif %}
{% if v and c.post and v.admin_level == 6 %}
{% if v.id!=c.author_id and not c.author.is_deleted and c.original_board_id==c.post.board_id %}
{% if c.author.is_banned %}
< a class = "dropdown-item text-danger" id = "unexile-comment-{{c.base36id}}" href = "javascript:void(0)" onclick = "post_toast('/api/unban_user/{{c.author_id}}?toast=1')" > < i class = "fas fa-user-minus fa-fw text-danger" > < / i > Unban user< / a >
{% else %}
< a class = "dropdown-item text-danger" id = "exile-comment-{{c.base36id}}" href = "javascript:void(0)" onclick = "post_toast('/api/ban_user/{{c.author_id}}?toast=1')" > < i class = "fas fa-user-minus fa-fw text-danger" > < / i > Ban user< / a >
{% endif %}
{% endif %}
{% endif %}
< / div >
< / div >
< / li >
< li class = "list-inline-item d-inline-block d-md-none" >
< a href = "#" data-toggle = "modal" data-target = "#actionsModal-{{c.base36id}}" 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.base36id}}-up active" >
< / li > {% endif %}
{% elif v %}
< li id = "comment-{{c.base36id}}-up" tabindex = "0" class = "list-inline-item arrow-up upvote-button d-inline-block d-md-none mr-2 comment-{{c.base36id}}-up {% if voted==1 %}active{% endif %}" data-id-up = "{{c.base36id}}" data-content-type = "comment" >
< / li >
{% else %}
< li id = "comment-{{c.base36id}}-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.base36id}}" class = "score comment-score-{{c.base36id}} {% 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.base36id}}-up active" > < / li >
{% endif %}
{% elif v %}
< li id = "comment-{{c.base36id}}-down" tabindex = "0" class = "list-inline-item arrow-down downvote-button d-inline-block d-md-none mr-2 comment-{{c.base36id}}-down {% if voted==-1 %}active{% endif %}" data-id-down = "{{c.base36id}}" data-content-type = "comment" >
< / li >
{% else %}
< li id = "comment-{{c.base36id}}-down" tabindex = "0" class = "list-inline-item arrow-down d-inline-block d-md-none" onclick = "location.href='/login';" >
< / li >
{% endif %}
< / ul >
< / div >
{% endif %}
< / div >
< div id = "reply-to-{{c.base36id}}" class = "d-none" >
< div id = "comment-form-space-{{c.fullname}}" class = "comment-write collapsed child" >
< form id = "reply-to-t3_{{c.base36id}}" action = "/api/comment" method = "post" class = "input-group" enctype = "multipart/form-data" >
< input type = "hidden" name = "formkey" value = "{{v.formkey}}" >
< input type = "hidden" name = "parent_fullname" value = "{{c.fullname}}" >
< input id = "reply-form-submission-{{c.fullname}}" type = "hidden" name = "submission" value = "{{c.post.base36id}}" >
< textarea name = "body" form = "reply-to-t3_{{c.base36id}}" 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.base36id}}" >
< label class = "btn btn-secondary format d-inline-block m-0" for = "gif-reply-btn-{{c.fullname}}" >
< 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 >
< label class = "btn btn-secondary format d-inline-block m-0" for = "gif-reply-btn-{{c.fullname}}" >
< 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 >
< label class = "btn btn-secondary format d-inline-block m-0" for = "file-upload-reply-{{c.fullname}}" >
< div id = "filename-show-reply-{{c.base36id}}" > < 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.base36id}}').innerHTML='image';" hidden >
< / label >
< a href = "javascript:void(0)" onclick = "document.getElementById('reply-to-{{c.base36id}}').classList.add('d-none')" class = "d-none d-md-block btn btn-link text-muted ml-auto cancel-form" > Cancel< / a >
< 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 >
< a href = "javascript:void(0)" onclick = "document.getElementById('reply-to-{{c.base36id}}').classList.add('d-none')" class = "d-block d-md-none btn btn-link text-muted ml-auto cancel-form" > Cancel< / a >
< 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 >
{% if render_replies %}
{% if level< 6 % }
< div id = "replies-of-{{c.base36id}}" >
{% for reply in c.children(v) %}
{{single_comment(reply, level=level+1)}}
{% endfor %}
< / div >
{% elif c.children(v) %}
< div id = "replies-of-{{c.base36id}}" class = "d-none d-md-block" >
{% for reply in c.children(v) %}
{{single_comment(reply, level=level+1)}}
{% endfor %}
< / div >
< div id = "morecomment-{{c.base36id}}" class = "d-block d-md-none mt-2 more-comments text-small" >
< a href = "{{c.permalink}}" { % if c . author . is_private % } rel = "nofollow" { % endif % } > More comments < i class = "fas fa-long-arrow-right ml-1" > < / i > < / a >
< / div >
{% endif %}
{% endif %}
< / div >
<!-- Comment Actions Modal -->
< div class = "modal fade d-md-none" id = "actionsModal-{{c.base36id}}" tabindex = "-1" role = "dialog" aria-labelledby = "actionsModalTitle" aria-hidden = "true" >
< 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" >
< li class = "list-group-item" > < a href = "/votes?link=https://rdrama.net{{c.permalink}}" > < i class = "fas fa-arrows-v" > < / i > Votes< / a > < / li >
2021-07-22 19:57:26 +00:00
{% if v and v.id!=c.author_id and v.admin_level == 0 %}
2021-07-23 19:28:25 +00:00
{% if v.banawards > 0 %}
2021-07-23 22:13:12 +00:00
< li class = "list-group-item" > < a href = "javascript:void(0)" onclick = "post_toast('/banaward/comment/{{c.id}}')" > < i class = "fas fa-user-slash text-danger" > < / i > Give ban award< / a > < / li >
2021-07-23 19:28:25 +00:00
{% else %}
2021-07-23 22:13:12 +00:00
< li class = "list-group-item" > < a href = "/banaward/comment/{{c.id}}" > < i class = "fas fa-user-slash text-danger" > < / i > Give ban award< / a > < / li >
2021-07-23 19:28:25 +00:00
{% endif %}
2021-07-22 19:02:39 +00:00
{% endif %}
2021-07-22 18:52:13 +00:00
2021-07-21 01:12:26 +00:00
{% if v and c.id in v.saved_comment_idlist() %}
< li class = "list-group-item" > < a href = "javascript:void(0)" onclick = "post('/unsave_comment/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-save" > < / i > Unsave< / a > < / li >
{% else %}
< li class = "list-group-item" > < a href = "javascript:void(0)" onclick = "post('/save_comment/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-save" > < / i > Save< / a > < / li >
{% endif %}
< li class = "list-group-item" > < a href = "javascript:void(0);" role = "button" class = "d-block copy-link" data-dismiss = "modal" data-clipboard-text = "{{c.permalink | full_link}}?context=5#context" > < i class = "fas fa-copy" > < / i > < span > Copy link< / span > < / a > < / li >
< li class = "list-group-item" > < a href = "{{c.permalink}}?context=5#context" { % if c . author . is_private % } rel = "nofollow" { % endif % } > < i class = "fas fa-dna" > < / i > Context< / a > < / li >
{% if not (v and v.id==c.author_id) %}
2021-07-24 21:01:34 +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.base36id}}','{{c.author.username if not c.author.is_deleted else '[is_deleted]'}}')" class = "d-block" > < i class = "fas fa-flag" > < / i > Flag< / a > < / li >
2021-07-21 01:12:26 +00:00
{% endif %}
{% if v and c.parent_submission and c.author_id==v.id %}
< li class = "list-group-item" > < a href = "javascript:void(0)" data-dismiss = "modal" onclick = "toggleEdit('{{c.base36id}}')" class = "d-block" > < i class = "fas fa-edit" > < / i > Edit< / a > < / li >
{% if c.deleted_utc > 0 %}
< li class = "list-group-item" > < a class = "d-block" href = "javascript:void(0)" onclick = "post('/undelete/comment/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-trash-alt" > < / i > Undelete< / a > < / li >
{% else %}
< li class = "list-group-item" > < a class = "d-block" href = "javascript:void(0)" data-toggle = "modal" data-target = "#deleteCommentModal" onclick = "delete_commentModal('{{c.base36id}}')" > < i class = "fas fa-trash-alt" > < / i > Delete< / a > < / li >
{% endif %}
{% endif %}
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 0) %}
< li class = "list-group-item" > < a class = "d-block" href = "javascript:void(0)" onclick = "post('/api/toggle_comment_nsfw/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-eye-evil" > < / i > Toggle +18< / a > < / li >
{% endif %}
{% if v %}
{% if v.admin_level>=1 and v.id==c.author_id %}
< li class = "list-group-item" > < a class = "d-block" id = "distinguish-{{c.base36id}}" href = "javascript:void(0)" onclick = "admin_comment('{{c.base36id}}')" > < i class = "fas fa-id-badge" > < / i > {{'Undistinguish' if c.distinguish_level else 'Distinguish'}}< / a > < / li >
{% endif %}
{% if v.admin_level>=3 %}
{% if not c.is_banned %}
< li class = "list-group-item" > < a class = "d-block" id = "moderate-{{c.base36id}}" href = "javascript:void(0)" onclick = "removeComment('{{c.base36id}}')" > < i class = "fas fa-comment-times" > < / i > Remove< / a > < / li >
{% endif %}
{% if c.is_banned or '/admin/' in request.path %}
< li class = "list-group-item" > < a class = "d-block" id = "moderate-{{c.base36id}}" href = "javascript:void(0)" onclick = "approveComment('{{c.base36id}}')" > < i class = "fas fa-comment-check" > < / i > Approve< / a > < / li >
{% endif %}
{% endif %}
{% if v.admin_level >=4 and c.oauth_app %}
< li class = "list-group-item" > < a class = "d-block" href = "{{c.oauth_app.permalink}}/comments" > < i class = "fas fa-code" > < / i > API App< / a > < / li >
{% endif %}
{% if not v.id==c.author_id %}
< li class = "list-group-item" >
< a class = "d-block" href = "javascript:void(0)" onclick = "post_toast('/settings/block?username={{c.author.username}}')" > < i class = "fas fa-user-slash" > < / i > Block user< / a >
< / li >
{% endif %}
{% endif %}
{% if v and c.post and (v.admin_level == 6 or v.id == c.post.author_id) %}
{% if c.is_top_level %}
< li class = "list-group-item" > < a class = "d-block text-info" id = "pin-comment-{{c.base36id}}" href = "javascript:void(0)" data-dismiss = "modal" data-target = "#actionsModal-{{c.base36id}}" onclick = "post('/comment_pin/{{c.base36id}}', function(){window.location.reload(true);})" > < i class = "fas fa-thumbtack fa-rotate--45 text-info" > < / i > {{'Unpin' if c.is_pinned else 'Pin'}}< / a >
< / li >
{% endif %}
{% endif %}
{% if v and c.post and v.admin_level == 6 %}
{% if c.author_id != v.id and not c.author.is_deleted and c.original_board_id==c.post.board_id %}
{% if c.author.is_banned %}
< li class = "list-group-item" > < a class = "d-block text-danger" id = "unexile-comment2-{{c.base36id}}" href = "javascript:void(0)" onclick = "post_toast('/api/unban_user/{{c.author_id}}?toast=1')" > < i class = "fas fa-user-minus fa-fw text-danger" > < / i > Unban user< / a > < / li >
{% else %}
< li class = "list-group-item" > < a class = "d-block text-danger" id = "exile-comment2-{{c.base36id}}" href = "javascript:void(0)" onclick = "post_toast('/api/ban_user/{{c.author_id}}?toast=1')" > < i class = "fas fa-user-minus fa-fw text-danger" > < / i > Ban user< / a > < / li >
{% endif %}
{% 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 >