41 lines
1.7 KiB
HTML

<div class="box" id="comments">
<h2 class="title">Comments</h2>
<div class="block">
<form action="/ticket/{{@PARAMS.id}}/comment" method="POST">
<div class="field">
<label class="label">Add comment:</label>
<div class="control">
<textarea class="textarea" name="comment" rows="4" cols="50"></textarea>
</div>
</div>
<div class="field">
<button class="button is-primary" type="submit">Submit Comment</button>
</div>
</form>
</div>
<check if="{{ !empty(@comments) }}">
<div class="list">
<repeat group="{{ @comments }}" value="{{ @comment}}">
<div class="list-item">
<div class="list-item-image">
<figure class="image is-48x48">
<img class="is-rounded"
src="https://placehold.co/200x200/66d1ff/FFF?text=TP">
<!-- <img class="is-rounded"
src="https://loremflickr.com/200/200/dog?{{ (int)rand()}}">-->
</figure>
</div>
<div class="list-item-content">
<div class="list-item-title is-flex is-justify-content-space-between">
<span>{{ @comment.author_name}}</span>
<span class="has-text-weight-normal has-text-grey">{{ @comment.created_at }}</span>
</div>
<div class="list-item-description">
<parsedown>{{ @comment.comment | raw }}</parsedown>
</div>
</div>
</div>
</repeat>
</div>
</check>
</div>