Add question reviews functionality with modal display and listing
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<div id="question-reviews-list" class="mb-3">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="small text-muted">Review history</div>
|
||||
<div>
|
||||
<button class="btn btn-sm btn-outline-secondary" hx-get="{{ request.path }}" hx-target="#question-reviews-list" hx-swap="outerHTML">Refresh</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
{% if reviews %}
|
||||
<ul class="list-unstyled">
|
||||
{% for r in reviews %}
|
||||
<li class="mb-2">
|
||||
<div class="d-flex align-items-start gap-2">
|
||||
<span class="badge bg-info text-white">{{ r.get_status_display }}</span>
|
||||
<div>
|
||||
<div class="small">{{ r.comment|linebreaksbr }}</div>
|
||||
<div class="text-muted small">by {{ r.get_author_str }} on {{ r.created_on }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="small text-muted">No reviews yet</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user