first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:30:42 +03:00
commit 4d92991817
1982 changed files with 284835 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
<div class="container-fluid">
<div class="d-flex justify-content-between align-items-center mb-3">
<h2 class="mb-0">Category Views</h2>
<div class="d-flex gap-2 align-items-center">
<form class="d-flex" action="/admin/content/category-views" method="GET">
<input type="search" name="search" class="form-control form-control-sm me-2" placeholder="IP ara..." value="{{ .Search }}">
<button class="btn btn-sm btn-outline-secondary" type="submit"><i class="bi bi-search"></i></button>
</form>
<div class="btn-group">
<a href="/admin/content/category-views" class="btn btn-sm btn-outline-primary {{ if not .ShowDeleted }}active{{ end }}">Aktif</a>
<a href="/admin/content/category-views?deleted=true" class="btn btn-sm btn-outline-danger {{ if .ShowDeleted }}active{{ end }}">Silinenler</a>
</div>
</div>
</div>
<div class="card border-0 shadow-sm">
<div class="card-body p-3">
<div class="table-responsive">
<table class="table table-hover table-sm align-middle">
<thead class="bg-transparent text-muted small">
<tr>
<th>Category</th>
<th class="text-muted">IP Address</th>
<th class="text-muted">Oluşturma</th>
<th class="text-end text-muted">İşlemler</th>
</tr>
</thead>
<tbody>
{{ if .Views }}
{{ range .Views }}
<tr>
<td>{{ index $.CatMap .CategoryID }}</td>
<td class="text-secondary small">{{ .IPAddress }}</td>
<td class="text-muted small">{{ .CreatedAt.Format "2006-01-02" }}</td>
<td class="text-end">
<div class="btn-group">
{{ if $.ShowDeleted }}
<form action="/admin/category-views/{{ .ID }}/restore" method="POST">
<button class="btn btn-sm btn-success" title="Geri Yükle"><i class="bi bi-arrow-counterclockwise"></i></button>
</form>
{{ else }}
<form action="/admin/category-views/{{ .ID }}/delete" method="POST" onsubmit="return confirmDelete(event, this);">
<button class="btn btn-sm btn-outline-danger" title="Sil"><i class="bi bi-trash"></i></button>
</form>
{{ end }}
</div>
</td>
</tr>
{{ end }}
{{ else }}
<tr>
<td colspan="4" class="text-center text-muted py-4">Kayıt yok</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
{{ if gt .TotalPages 1 }}
<div class="d-flex justify-content-end mt-3">
<nav>
<ul class="pagination pagination-sm mb-0">
<li class="page-item {{ if eq .Page 1 }}disabled{{ end }}"><a class="page-link" href="/admin/content/category-views?page={{ .PrevPage }}">&laquo; Önceki</a></li>
<li class="page-item disabled"><span class="page-link">Sayfa {{ .Page }} / {{ .TotalPages }}</span></li>
<li class="page-item {{ if eq .Page .TotalPages }}disabled{{ end }}"><a class="page-link" href="/admin/content/category-views?page={{ .NextPage }}">Sonraki &raquo;</a></li>
</ul>
</nav>
</div>
{{ end }}
</div>
</div>
</div>