wownero-funding-system/wowfunding/templates/comments.html

62 lines
2.9 KiB
HTML

<div class="row">
<div class="col-md-12">
<div class="card my-6" id="incoming_txs">
<h5 id="comments" class="card-header">Comments</h5>
<div class="card-body">
{% 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><input type="submit" value="add comment">
</form>
{% else %}
You need to be logged in to comment.
<br>
{% endif %}
<br>
{% for c in proposal._comments %}
<!-- Single Comment -->
<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 class="{% if c.user.username == proposal.user.username %}author{% endif %}" href="/user/{{ c.user.username }}">
{{c.user.username}}
</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><br>
{{c.message}}
<br>
<a class="reply" href="{{url_for('propsal_comment_reply', cid=c.id, pid=proposal.id)}}">reply</a>
{% 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">
<span class="username">
<a class="{% if c.user.username == proposal.user.username %}author{% endif %}" href="/user/{{ c.user.username }}">
{{_c.user.username}}
</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><br>
{{_c.message}}
</div>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>