Files
ares/views/admin/partials/product_comments.html
Beyhan Oğur 4d92991817 first commit
2026-04-26 21:30:42 +03:00

65 lines
3.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="container-fluid">
<div class="d-flex justify-content-between align-items-center mb-3">
<h2 class="mb-0">Ürün Yorumları</h2>
<div class="d-flex gap-2 align-items-center">
<form class="d-flex" action="/admin/content/product-comments" method="GET">
<input type="search" name="product_id" class="form-control form-control-sm me-2"
placeholder="Ürün ID ile Ara..." value="{{ .ProductID }}">
<button class="btn btn-sm btn-outline-secondary" type="submit"><i class="bi bi-search"></i></button>
</form>
</div>
</div>
<div class="card border-0 shadow-sm">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<thead class="bg-light">
<tr>
<th class="ps-3 border-0 text-muted small text-uppercase">ID</th>
<th class="border-0 text-muted small text-uppercase">Kullanıcı (User ID)</th>
<th class="border-0 text-muted small text-uppercase">Yorum (Body)</th>
<th class="border-0 text-muted small text-uppercase">Ürün ID</th>
<th class="border-0 text-muted small text-uppercase">Tarih</th>
<th class="border-0 text-muted small text-uppercase text-end pe-3">İşlemler</th>
</tr>
</thead>
<tbody>
{{ range .ProductComments }}
<tr>
<td class="ps-3"><span class="text-secondary fw-medium">#{{ .ID }}</span></td>
<td>
<div class="d-flex align-items-center">
<span class="badge bg-secondary">User #{{ .UserID }}</span>
</div>
</td>
<td>
<div class="text-dark">{{ .Body }}</div>
</td>
<td>
<span class="badge bg-primary">Product #{{ .ProductID }}</span>
</td>
<td class="text-secondary small">
{{ .CreatedAt.Format "02.01.2006 15:04" }}
</td>
<td class="text-end pe-3">
<form action="/admin/product-comments/{{ .ID }}/delete" method="POST" class="d-inline"
onsubmit="return confirm('Bu yorumu silmek istediğinize emin misiniz?');">
<button type="submit" class="btn btn-sm btn-outline-danger" title="Sil">
<i class="bi bi-trash"></i>
</button>
</form>
</td>
</tr>
{{ else }}
<tr>
<td colspan="6" class="text-center py-5 text-muted">
<i class="bi bi-chat-dots fs-1 d-block mb-2"></i>
Henüz ürünlere yorum yapılmamış.
</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
</div>
</div>