42 lines
1.9 KiB
HTML
42 lines
1.9 KiB
HTML
{{define "title"}}Users{{end}}
|
|
|
|
{{define "content"}}
|
|
<div class="flex items-center justify-between mb-6">
|
|
<h1 class="text-2xl font-bold text-gray-900">Users</h1>
|
|
<a href="/admin/users/new" class="rounded-md bg-blue-600 px-4 py-2 text-sm font-semibold text-white shadow hover:bg-blue-500">Create User</a>
|
|
</div>
|
|
|
|
{{with .Data}}
|
|
<div class="overflow-hidden bg-white shadow ring-1 ring-gray-200 rounded-lg">
|
|
<table class="min-w-full divide-y divide-gray-200">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Name</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Email</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Verified</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Created</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200">
|
|
{{range .Users}}
|
|
<tr class="hover:bg-gray-50">
|
|
<td class="px-4 py-3">
|
|
<a href="/admin/users/{{.ID}}" class="text-sm font-medium text-blue-600 hover:text-blue-500">{{.Name}}</a>
|
|
</td>
|
|
<td class="px-4 py-3 text-sm text-gray-500">{{.Email}}</td>
|
|
<td class="px-4 py-3 text-sm">
|
|
{{if .EmailVerified}}
|
|
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">Yes</span>
|
|
{{else}}
|
|
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800">No</span>
|
|
{{end}}
|
|
</td>
|
|
<td class="px-4 py-3 text-sm text-gray-500">{{formatDate .CreatedAt}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|