mirror of
https://github.com/Xevion/runnerspace.git
synced 2025-12-15 00:13:00 -06:00
Add comment posting form
This commit is contained in:
@@ -8,11 +8,21 @@
|
||||
title="{{ post.date_posted }}">{{ post.get_time_ago() }} ago</span>.
|
||||
</div>
|
||||
<div class="post-comments">
|
||||
{% if current_user.is_authenticated %}
|
||||
<div class="post-comment add-comment">
|
||||
<form method="POST" action="{{ url_for('forms.add_comment', post_id=post.id) }}">
|
||||
<label>
|
||||
<input type="text" name="comment-text">
|
||||
</label>
|
||||
<button>Add Comment</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for comment, author in comments_and_authors %}
|
||||
<div class="post-comment">
|
||||
|
||||
<span class="comment-text">"{{ comment.text }}"</span> — <a class="comment-author"
|
||||
href="{{ url_for('main.user', username=author.username) }}">{{ author.name }}</a>
|
||||
href="{{ url_for('main.user', username=author.username) }}">{{ author.name }}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user