26 lines
933 B
HTML
26 lines
933 B
HTML
{{define "shares"}}{{template "header" .}}
|
|
{{if .Data}}
|
|
<table class="table vs-table table-sm">
|
|
<thead><tr><th>Description</th><th>Owner</th><th>Visits</th><th>Link</th><th></th></tr></thead>
|
|
<tbody>
|
|
{{range .Data}}
|
|
<tr>
|
|
<td>{{if .Description}}{{.Description}}{{else}}<span class="text-secondary">(no description)</span>{{end}}</td>
|
|
<td class="text-secondary small">{{.OwnerID}}</td>
|
|
<td>{{.VisitCount}}</td>
|
|
<td><a href="/share/{{.Token}}" target="_blank">/share/{{.Token}}</a></td>
|
|
<td class="text-end">
|
|
<form method="post" action="/shares/{{.ID}}/delete">
|
|
{{template "csrf_field" $.CSRFToken}}
|
|
<button type="submit" class="btn btn-sm btn-outline-danger">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
<p class="text-secondary">No shares yet. Create one from an album page.</p>
|
|
{{end}}
|
|
{{template "footer" .}}{{end}}
|