GoBlog/templates/webmentionadmin.gohtml

37 lines
1.4 KiB
Plaintext

{{ define "title" }}
<title>{{ string .Blog.Lang "webmentions" }} - {{ mdtext .Blog.Title }}</title>
{{ end }}
{{ define "main" }}
<main>
<h1>{{ string .Blog.Lang "webmentions" }}</h1>
{{ $blog := .Blog }}
{{ range $i, $mention := .Data.Mentions }}
<div class="p">
<p>
From: <a href="{{ $mention.Source }}" target="_blank" rel="noopener noreferrer">{{ $mention.Source }}</a><br/>
To: <a href="{{ $mention.Target }}" target="_blank">{{ $mention.Target }}</a><br/>
Created: {{ unixtodate $mention.Created }}
</p>
<form method="post">
<input type="hidden" name="mentionid" value="{{ $mention.ID }}">
{{ if eq $mention.Status "verified" }}
<input type="submit" formaction="/webmention/approve" value="{{ string $blog.Lang "approve" }}">
{{ end }}
<input type="submit" formaction="/webmention/delete" value="{{ string $blog.Lang "delete" }}">
<input type="submit" formaction="/webmention/reverify" value="{{ string $blog.Lang "reverify" }}">
</form>
</div>
{{ end }}
{{ if .Data.HasPrev }}
<p><a href="{{ .Data.Prev }}">{{ string .Blog.Lang "prev" }}</a></p>
{{ end }}
{{ if .Data.HasNext }}
<p><a href="{{ .Data.Next }}">{{ string .Blog.Lang "next" }}</a></p>
{{ end }}
</main>
{{ end }}
{{ define "webmentionadmin" }}
{{ template "base" . }}
{{ end }}