{% from 'proposal/macros/comment.html' import comment_entry %}

<div class="row">
    <div class="col-md-12">
        <div class="card my-6" id="incoming_txs">
            <h5 style="border-radius:0px !important;" id="comments" class="card-header">Comments</h5>
            <div class="card-body comments-panel">
                {% if logged_in %}
                    <form method="post" action="comment">
                        <input type="hidden" name="pid" value="{{proposal.id}}">
                        <textarea class="comment" name="text" rows="6" cols="60"></textarea>
                        <br><br>
                        <div class="row">
                            <div class="col-md-8">
                                <div class="alert alert-secondary" role="alert">
                                    Posting imgur/imgflip media can be done by linking directly to the image, no [img] bbcode needed.
                                </div>
                            </div>
                        </div>
                        <input type="submit" value="add comment">
                    </form>
                {% else %}
                    You need to be <a href="{{ url_for('login') }}">logged in</a> to comment.
                    <br>
                {% endif %}

                <br>

                {% for c in proposal._comments if not c.automated %}
                    {{ comment_entry(c, proposal) }}
                {% endfor %}
            </div>
        </div>
    </div>
</div>