all repos — nirvash @ 6f663500cce5096b097cae74736e003c56b0c4e9

modular CMS using the quartzgun library

templates/file_delete.html (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{{ $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" . }}