43 lines
2.0 KiB
HTML
43 lines
2.0 KiB
HTML
{{define "title"}}My Tickets{{end}}
|
|
|
|
{{define "content"}}
|
|
<div class="flex items-center justify-between mb-6">
|
|
<h1 class="text-2xl font-bold text-gray-900">My Tickets</h1>
|
|
<a href="/tickets/new" class="rounded-md bg-blue-600 px-4 py-2 text-sm font-semibold text-white shadow hover:bg-blue-500">New Ticket</a>
|
|
</div>
|
|
|
|
{{with .Data}}
|
|
{{if .Tickets}}
|
|
<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">Title</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Product</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Status</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 .Tickets}}
|
|
<tr class="hover:bg-gray-50">
|
|
<td class="px-4 py-3">
|
|
<a href="/tickets/{{.ID}}" class="text-sm font-medium text-blue-600 hover:text-blue-500">{{.Title}}</a>
|
|
</td>
|
|
<td class="px-4 py-3 text-sm text-gray-500">{{.Repo.Name}}</td>
|
|
<td class="px-4 py-3">{{statusBadge (print .Status)}}</td>
|
|
<td class="px-4 py-3 text-sm text-gray-500">{{formatDate .CreatedAt}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{else}}
|
|
<div class="text-center py-12 bg-white rounded-lg shadow ring-1 ring-gray-200">
|
|
<p class="text-gray-500">No tickets yet.</p>
|
|
<a href="/tickets/new" class="mt-4 inline-block text-sm font-medium text-blue-600 hover:text-blue-500">Create your first ticket</a>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}
|