{{ $slug := ((.Context).Value "params").Slug }}
{{ $dest := .FormValue "dest" }}
{{ $name := .FormValue "filename" }}
{{ $moveError := ((.Context).Value "file-manager").Rename $slug $dest $name }}

{{ template "header" . }}

{{ if $moveError }}

<h2>File Move/Rename Error</h2>
<span class="adapter-error">{{$moveError}}</span>

{{ else }}

<h2>File Move/Rename Success</h2>
<span class="adapter-success">File moved from /{{$slug}} to {{$dest}}{{$name}} </span>

{{ end }}

{{ template "footer.html" . }}