nirvash/templates/delete.html

14 lines
432 B
HTML
Raw Normal View History

2022-06-07 06:59:41 +00:00
{{ $slug := ((.Context).Value "params").Slug }}
{{ $deleteErr := ((.Context).Value "adapter").DeletePage $slug }}
{{ template "header" . }}
{{ if $deleteErr }}
<h2>Deletion Error</h2>
<span class="adapter-error">There was an error deleting the page: {{ ($deleteErr).Error }}</span>
{{ else }}
<h2>Page Deleted</h2>
<span class="adapter-success">Page at '{{ $slug }}' was deleted</span>
{{ end }}
{{ template "footer" . }}