all repos — nirvash @ main

modular CMS using the quartzgun library

templates/file_mkdir_process.html (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{ $slug := ((.Context).Value "params").Slug }}
{{ $newDir := .FormValue "dirname" }}
{{ $mkdirError := ((.Context).Value "file-manager").MkDir $slug $newDir }}

{{ template "header" . }}

{{ if $mkdirError }}

<h2>Directory Creation Error</h2>
<span class="adapter-error">{{($mkdirError).Error}}</span>

{{ else }}

<h2>Directory Created</h2>
<span class="adapter-success">The directory has been created successfully</span>

{{ end }}

{{ template "footer" . }}