nirvash/templates/file_delete.html

18 lines
409 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 }}
2022-06-13 06:32:14 +00:00
<h2>File Deletion Error</h2>
<span class="adapter-error">{{ ($deleteErr).Error }}</span>
2022-06-13 06:32:14 +00:00
{{ else }}
2022-06-13 06:32:14 +00:00
<h2>File Deleted</h2>
<span class="adapter-success">'{{ $slug }}' was deleted successfully</span>
2022-06-13 06:32:14 +00:00
{{ end }}
{{ template "footer" . }}