GoBlog/templates/notificationsadmin.gohtml

29 lines
898 B
Plaintext
Raw Normal View History

{{ define "title" }}
2021-05-15 06:51:48 +00:00
<title>{{ string "notifications" }} - {{ .Blog.Title }}</title>
{{ end }}
{{ define "main" }}
<main>
2021-05-15 06:51:48 +00:00
<h1>{{ string "notifications" }}</h1>
{{ range $i, $notification := .Data.Notifications }}
2021-05-15 06:51:48 +00:00
<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 }}
2021-05-15 06:51:48 +00:00
<p><a href="{{ .Data.Prev }}">{{ string "prev" }}</a></p>
{{ end }}
{{ if .Data.HasNext }}
2021-05-15 06:51:48 +00:00
<p><a href="{{ .Data.Next }}">{{ string "next" }}</a></p>
{{ end }}
</main>
{{ end }}
{{ define "notificationsadmin" }}
{{ template "base" . }}
{{ end }}