NDOJ/templates/actionbar/list.html

62 lines
2.8 KiB
HTML
Raw Normal View History

2022-11-17 00:48:32 +00:00
{% set logged_in = request.user.is_authenticated %}
{% set profile = request.profile if logged_in else None %}
2023-02-15 00:05:58 +00:00
{% set hide_texts_on_mobile = (not hide_actionbar_comment) or actionbar_report_url %}
2022-11-17 00:48:32 +00:00
{% if logged_in %}
2023-02-07 23:22:37 +00:00
{% if include_hr %}
2023-02-15 00:05:58 +00:00
<hr>
{% endif %}
<div class="page-vote actionbar {{'hide_texts_on_mobile' if hide_texts_on_mobile}} ">
2023-02-07 23:22:37 +00:00
<span class="actionbar-block" style="justify-content: flex-start;">
<span id="like-button-{{pagevote.id}}"
class="like-button actionbar-button {% if pagevote.vote_score(request.profile) == 1 %}voted{% endif %}"
onclick="javascript:pagevote_upvote({{ pagevote.id }}, event)">
<span class="pagevote-score" id="pagevote-score-{{pagevote.id}}">{{ pagevote.score }}</span>
<i class="fa fa-thumbs-o-up" style="font-size: large;"></i>
<span class="actionbar-text">{{_("Like")}}</span>
</span>
<span id="dislike-button-{{pagevote.id}}"
class="dislike-button actionbar-button {% if pagevote.vote_score(request.profile) == -1 %}voted{% endif %}"
onclick="javascript:pagevote_downvote({{ pagevote.id }}, event)">
<i class="fa fa-thumbs-o-down" style="font-size: large;"></i>
</span>
2022-11-17 00:48:32 +00:00
</span>
2023-02-07 23:22:37 +00:00
{% if not hide_actionbar_comment %}
<span class="actionbar-block">
<span class="actionbar-button actionbar-comment">
<i class="fa fa-comment-o" style="font-size: large;"></i>
2023-02-15 00:05:58 +00:00
<span class="actionbar-text">
{{_("Comment")}}
</span>
2023-03-08 05:43:26 +00:00
{% if comment_count %}
2023-02-15 00:13:25 +00:00
<span style="margin-left: 0.2em">
2023-05-22 13:52:18 +00:00
({{ comment_count }})
2023-02-07 23:22:37 +00:00
</span>
{% endif %}
2023-02-15 00:05:58 +00:00
</span>
</span>
{% endif %}
<span class="actionbar-block">
<span id="bookmark-button-{{bookmark.id}}"
class="bookmark-button actionbar-button {% if bookmark.get_bookmark(request.profile) == True %} bookmarked {% endif %}"
onclick="javascript:bookmark({{ bookmark.id }}, event)">
<i class="fa fa-bookmark-o" style="font-size: large;"></i>
<span class="actionbar-text">{{_("Bookmark")}}</span>
</span>
</span>
2023-05-27 04:06:40 +00:00
<span class="actionbar-block">
2023-02-15 00:05:58 +00:00
<span class="actionbar-button actionbar-share" style="position: relative"
{{"share-url=" + share_url if share_url else ""}} onclick="javascript:actionbar_share(this, event)">
2023-02-15 00:05:58 +00:00
<i class=" fa fa-share" style="font-size: large;"></i>
<span class="actionbar-text">{{_("Share")}}</span>
</span>
</span>
{% if actionbar_report_url %}
<span class="actionbar-block">
<a class="actionbar-button black" href="{{actionbar_report_url}}">
<i class="fa fa-flag-o" style="font-size: large;"></i>
<span class="actionbar-text">{{_("Report")}}</span>
</a>
</span>
{% endif %}
</div>
{% endif %}