favoritter/web/templates/pages/admin_requests.html

46 lines
1.9 KiB
HTML
Raw Normal View History

{{define "head"}}
<meta name="robots" content="noindex">
{{end}}
{{define "content"}}
<h1>Registreringsforespørsler</h1>
{{with .Data}}
{{if .Requests}}
<div class="table-responsive" role="region" aria-label="Forespørsler" tabindex="0">
<table role="grid">
<thead>
<tr>
<th scope="col">Brukernavn</th>
<th scope="col">Sendt</th>
<th scope="col">Handlinger</th>
</tr>
</thead>
<tbody>
{{range .Requests}}
<tr>
<td>{{.Username}}</td>
<td>{{.CreatedAt.Format "02.01.2006 15:04"}}</td>
<td>
<form method="POST" action="{{basePath}}/admin/signup-requests/{{.ID}}" class="inline-form">
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
<input type="hidden" name="action" value="approve">
<button type="submit" class="outline primary nav-button">Godkjenn</button>
</form>
<form method="POST" action="{{basePath}}/admin/signup-requests/{{.ID}}" class="inline-form">
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
<input type="hidden" name="action" value="reject">
<button type="submit" class="outline secondary nav-button"
onclick="return confirm('Avvis forespørselen fra «{{.Username}}»?')">Avvis</button>
</form>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
{{else}}
<p>Ingen ventende forespørsler.</p>
{{end}}
{{end}}
{{end}}