GoBlog/templates/notificationsadmin.gohtml

29 lines
898 B
Plaintext

{{ define "title" }}
<title>{{ string "notifications" }} - {{ .Blog.Title }}</title>
{{ end }}
{{ define "main" }}
<main>
<h1>{{ string "notifications" }}</h1>
{{ range $i, $notification := .Data.Notifications }}
<div class="p">
<p><i>{{ unixtodate $notification.Time }}</i></p>
{{ md $notification.Text }}
<form method="post">
<input type="hidden" name="notificationid" value="{{ $notification.ID }}">
<input type="submit" formaction="/notifications/delete" value="{{ string "delete" }}">
</form>
</div>
{{ end }}
{{ if .Data.HasPrev }}
<p><a href="{{ .Data.Prev }}">{{ string "prev" }}</a></p>
{{ end }}
{{ if .Data.HasNext }}
<p><a href="{{ .Data.Next }}">{{ string "next" }}</a></p>
{{ end }}
</main>
{{ end }}
{{ define "notificationsadmin" }}
{{ template "base" . }}
{{ end }}