28 lines
2.4 KiB
HTML
28 lines
2.4 KiB
HTML
{% if v and request.path.startswith('/@') and v.admin_level < 2 %} {# only admins can vote on user pages #}
|
|
<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 %}
|
|
|
|
<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 c.state_mod == StateMod.VISIBLE %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
|
{% 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">
|
|
<span tabindex="0" role="button" 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 %}"></span>
|
|
<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 c.state_mod == StateMod.VISIBLE %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
|
<span {% if not ENABLE_DOWNVOTES %}style="display: none!important"{% endif %} tabindex="0" role="button" 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 %}"></span>
|
|
</li>
|
|
{% else %}
|
|
<li id="voting-{{c.id}}-mobile" class="voting list-inline-item d-md-none">
|
|
<span tabindex="0" class="arrow-{{c.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" onclick="location.href='/login';">
|
|
<i class="fas fa-arrow-alt-up mx-0" aria-hidden="true"></i>
|
|
</span>
|
|
<span class="comment-mobile-score-{{c.id}} score{% if c.controversial %} controversial{% endif %}"{% if c.state_mod == StateMod.VISIBLE %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
|
<span tabindex="0" class="arrow-{{c.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" onclick="location.href='/login';">
|
|
<i class="fas fa-arrow-alt-down mx-0" aria-hidden="true"></i>
|
|
</span>
|
|
</li>
|
|
{% endif %}
|