class="dropdown show"
parent
ef8d84f13d
commit
339fb50b41
|
@ -109,7 +109,7 @@
|
|||
|
||||
<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">
|
||||
<div class="user-info">
|
||||
<span class="comment-collapse d-md-none" onclick="collapse_comment('{{c.base36id}}')"></span>
|
||||
{% 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 %}
|
||||
{% if c.flags %} <a class="btn btn-primary" style="padding:1px 5px; font-size:10px;" href="javascript:void(0)" onclick="document.getElementById('flaggers-{{c.id}}').classList.toggle('d-none')">{{c.active_flags}} Reports</a> {% endif %}
|
||||
|
@ -269,156 +269,109 @@
|
|||
<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-ban fa-fw text-danger"></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-check fa-fw text-success"></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 %}
|
||||
<a class="dropdown-item" href="javascript:void(0)" data-toggle="modal" data-target="#reportCommentModal" onclick="report_commentModal('{{c.base36id}}','{{c.author.username}}',)"><i class="fas fa-flag fa-fw"></i>Report</a>
|
||||
{% 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 and v.admin_level == 0 %}
|
||||
<a class="dropdown-item text-danger" href="javascript:void(0)" onclick="post_toast('/settings/block?username={{c.author.username}}')"
|
||||
><i class="fas fa-eye-slash fa-fw"></i>Block user</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not v.id==c.author_id and v.admin_level == 1 %}
|
||||
<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>Ban user</a>
|
||||
{% endif %}
|
||||
|
||||
{% if v.admin_level>=3 %}
|
||||
<a class="dropdown-item removeDropdownItem" id="moderate-{{c.base36id}}" href="javascript:void(0)" onclick="removeComment('{{c.base36id}}')"><i class="fas fa-ban fa-fw text-danger"></i>Remove</a>
|
||||
<a class="dropdown-item removeDropdownItem" id="moderate-{{c.base36id}}" href="javascript:void(0)" onclick="approveComment('{{c.base36id}}')"><i class="fas fa-check fa-fw text-success"></i>Approve</a>
|
||||
{% 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 >= 1 or v.id == c.post.author_id) %}
|
||||
<div class="dropdown-divider"></div>
|
||||
{% if c.level == 1 %}
|
||||
<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 %}
|
||||
{% 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>
|
||||
{% if v %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" data-toggle="modal" data-target="#reportCommentModal" onclick="report_commentModal('{{c.base36id}}','{{c.author.username}}',)"><i class="fas fa-flag fa-fw"></i>Report</a></li>
|
||||
{% else %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" data-toggle="modal" data-target="#reportCommentModal" onclick=""><i class="fas fa-flag fa-fw"></i>Flag</a></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>
|
||||
{% if v and c.parent_submission and c.author_id==v.id %}
|
||||
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" onclick="toggleEdit('{{c.base36id}}')"><i class="fas fa-edit fa-fw"></i>Edit</a></li>
|
||||
|
||||
{% if c.deleted_utc > 0 %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a 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></li>
|
||||
{% else %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" data-toggle="modal" data-target="#deleteCommentModal" onclick="delete_commentModal('{{c.base36id}}')"><i class="fas fa-trash-alt fa-fw"></i>Delete</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.admin_level==6 and v.id != c.author_id and c.author.is_banned %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><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></li>
|
||||
{% else %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><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></li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 0) %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a 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></li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{% if v and v.admin_level==6 and v.id==c.author_id %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a 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></li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if not v.id==c.author_id and v.admin_level == 0 %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a class="dropdown-item text-danger" href="javascript:void(0)" onclick="post_toast('/settings/block?username={{c.author.username}}')"><i class="fas fa-eye-slash fa-fw"></i>Block user</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if v.admin_level >=4 and c.oauth_app %}
|
||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="{{c.oauth_app.permalink}}/comments" ><i class="fas fa-code fa-fw"></i>API App</a></li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<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 render_replies %}
|
||||
{% if level<6 %}
|
||||
<div id="replies-of-{{c.base36id}}">
|
||||
{% for reply in c.children(v) %}
|
||||
|
@ -435,9 +388,9 @@
|
|||
<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 %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Comment Actions Modal -->
|
||||
|
|
Loading…
Reference in New Issue