Added ticket comments

This commit is contained in:
2022-11-21 23:48:25 -05:00
parent 4371fd0b2f
commit 5683c0bc8b
8 changed files with 136 additions and 4 deletions

View File

@ -48,7 +48,31 @@
<div class="row">
<div class="twelve columns">
<h3>Ticket comments/Updates</h3>
<p>There are no comments to display at this time.</p>
{% if ticket.comments | length > 0 %}
<ul class="comments-list">
{% for comment in ticket.comments %}
<li class="comment">{{ comment.render() | raw }}</li>
{% endfor %}
</ul>
{% else %}
<p>There are no comments to display at this time.</p>
{% endif %}
</div>
</div>
<hr>
<!-- add a comment form -->
<div class="row">
<div class="twelve columns">
<form id="comment-form" action="{{ url_for('comment.add') }}" method="POST" class="u-full-width">
<label for="comment_body">Add a comment:</label>
<textarea id="comment_body" class="u-full-width" placeholder="Add a comment..." name="comment_body"></textarea>
<input type="hidden" name="ticket_id" value="{{ ticket.id }}">
<input class="button-primary u-full-width" type="submit" value="Submit">
</form>
</div>
</div>
{% endblock %}