nirvash/templates/file_delete.html

18 lines
No EOL
409 B
HTML

{{ $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">{{ ($deleteErr).Error }}</span>
{{ else }}
<h2>File Deleted</h2>
<span class="adapter-success">'{{ $slug }}' was deleted successfully</span>
{{ end }}
{{ template "footer" . }}