{% load i18n %}
<div class="{% if comment.reply_to %}reply-comment{% endif %} comment">
    <a id="comment_{{ comment.id }}"></a>
    <a href="{{comment.author.get_url }}" rel="nofollow">
        <b class="em06">{{ comment.author.nick }}</b>
    </a>
    <span style="colod: gray; font-size: 0.6em; width:100%;">{{ comment.date_time }}</span><br>
    <div class="u-full-width">
        <a href="{{comment.author.get_url }}" rel="nofollow">
        {% if comment.author.picture.media_thumbnail %}
            <img src="{{ comment.author.picture.media_thumbnail.url }}"
                alt="{{ comment.author.nick }}"
                class="comment-user-pic"/>
        {% else %}
            <i class="fa fa-user gray"></i>
        {% endif %}
        </a>
        {{ comment.text }}
    </div>
    &nbsp;&nbsp;
    <a href="{% url 'social_layer:like_comment' comment.pk 'like' %}#comment_{{comment.id}}" class="em06 gray">
        {{ comment.count_likes|default:'' }}
        <i class="fas fa-thumbs-up"></i>
    </a>
    &nbsp;&nbsp;
    <a href="{% url 'social_layer:like_comment' comment.pk 'dislike' %}#comment_{{comment.id}}" class="em06 gray">
        {{ comment.count_dislikes|default:'' }}
        <i class="fas fa-thumbs-down"></i>
    </a>
    &nbsp;&nbsp;
    {% if comment_section.featured and comment.get_replies %}
            <a href="?show-comments#comment_{{comment.id}}"
                rel="nofollow" class="em06">
                <i class="fas fa-sort-down em06"></i>
                ({{ comment.get_replies.count }})
            </a>
    {% endif %}
    {#% if comment_section.anyone_can_reply or request.user == comment_section.owner.user or request.user == comment.author.user %#}
        <a href="javascript: reply_to({{ comment.id }});" rel="nofollow" class="em06 gray">
            {% trans 'reply' %}
        </a>
    {% if request.user.is_authenticated %}
        <form id="rt_form_{{comment.id}}" method="POST" style="display: none"
            action="{% url 'social_layer:reply_comment' comment.id  %}"></form>
    {% else %}
        <div id="rt_form_{{comment.id}}" style="display: none"></div>
    {% endif %}
    {% if not comment_section.featured and request.user == comment.author.user or request.user.is_superuser %}
        <a href="{% url 'social_layer:delete_comment' comment.id %}"
            rel="nofollow" class="u-pull-right"
            title="{% trans 'remove comment' %}">
            <i class="fa fa-times"></i>
        </a>
    {% endif %}
</div>
{% if not comment_section.featured %}
    {% for reply in comment.get_replies %}
        {% with reply as comment %}
            {% include 'comments/render_comment.html' %}
        {% endwith %}
    {% endfor %}
{% endif %}
