{% macro comment_entry(c, proposal) %}
<div class="media mb-4 comment-container" id="comment-{{c.id}}">
    <div class="votearrow" title="upvote"></div>
    <div class="media-body">
        <span class="username">
            <a href="/user/{{ c.user.username }}">
                {{c.user.username}}
                {% if c.user.username == proposal.user.username %}
                <small>[op]</small>
                {% endif %}
                {% if c.user.admin %}
                <small>[admin]</small>
                {% endif %}
            </a>
        </span>
        <span class="date_posted">
            <a href="/proposal/{{proposal.id}}#comment-{{c.id}}">
                {{c.date_added.strftime('%Y-%m-%d %H:%M')}}
            </a>
        </span>

        <span data-id="{{c.id}}" class="body" style="{% if c.automated %}color:blue;{% endif %};">
            {% for line in c.message_html %}
                {{line}}
                {% if loop.index != c.message_html|length %}
                    <br>
                {% endif %}
            {% endfor %}
        </span>

        {% if not c.automated %}
        <a class="reply" href="{{url_for('propsal_comment_reply', cid=c.id, pid=proposal.id)}}">
            <img style="margin-right:4px;" width="20px" height="20px" src="/static/reply.png"/>reply
        </a>
        {% endif %}

        {% for _c in c.comments %}
        <div class="media mt-4 comment-container" id="comment-{{_c.id}}">
            <div class="votearrow" title="upvote"></div>
            <div class="media-body" id="comment">
                <span class="username">
                    <a href="/user/{{ _c.user.username }}">
                        {{_c.user.username}}
                        {% if _c.user.username == proposal.user.username %}
                        <small>[op]</small>
                        {% endif %}
                        {% if _c.user.admin %}
                        <small>[admin]</small>
                        {% endif %}

                    </a>
                </span>
                <span class="date_posted">
                    <a href="/proposal/{{proposal.id}}#comment-{{_c.id}}">
                        {{_c.date_added.strftime('%Y-%m-%d %H:%M')}}
                    </a>
                </span>

                <span data-id="{{_c.id}}" class="body">
                    {% for line in _c.message_html %}
                        {{line}}
                        {% if loop.index != _c.message_html|length %}
                            <br>
                        {% endif %}
                    {% endfor %}
                </span>
            </div>
        </div>
        {% endfor %}
    </div>
</div>
{% endmacro %}