nirvash/templates/file_delete.html

14 lines
442 B
HTML
Raw Normal View History

2022-06-13 06:32:14 +00:00
{{ $slug := ((.Context).Value "params").Slug }}
{{ $deleteErr := ((.Context).Value "file-manager").Remove $slug }}
{{ template "header" . }}
{{ if $deleteErr }}
<h2>File Deletion Error</h2>
<span class="adapter-error">There was an error deleting the file: {{ ($deleteErr).Error }}</span>
{{ else }}
<h2>File Deleted</h2>
<span class="adapter-success">Static file '{{ $slug }}' was deleted</span>
{{ end }}
{{ template "footer" . }}