2022-06-10 06:38:29 +00:00
|
|
|
{{ $slug := ((.Context).Value "params").Slug }}
|
|
|
|
{{ $fileList := ((.Context).Value "file-manager").ListSubTree $slug }}
|
|
|
|
|
|
|
|
{{ template "header" .}}
|
|
|
|
|
|
|
|
|
|
|
|
{{ if ($fileList).Error }}
|
|
|
|
<h2>File Listing Error</h2>
|
|
|
|
|
|
|
|
<span class="adapter-error">{{($fileList).Error}}</span>
|
|
|
|
{{ else }}
|
|
|
|
<h2>Files: {{($fileList).Root}}</h2>
|
|
|
|
|
|
|
|
<div class="new-page-button-wrapper">
|
2022-06-12 06:00:38 +00:00
|
|
|
<a class="new-page-button" href="/upload{{($fileList).Root}}">Upload File</a><br/>
|
|
|
|
<a class="new-page-button" href="/mkdir{{($fileList).Root}}">New Directory</a>
|
2022-06-10 06:38:29 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="page-list">
|
2022-06-13 06:32:14 +00:00
|
|
|
<ul class="file-list">
|
2022-06-10 06:38:29 +00:00
|
|
|
{{ if ($fileList).Up }}
|
2022-06-15 07:33:56 +00:00
|
|
|
<li><a class="left-pad-uplink" href="/file-mgr{{$fileList.Up}}">..</a></li>
|
2022-06-10 06:38:29 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ range $dir := ($fileList).SubDirs }}
|
2022-06-12 06:00:38 +00:00
|
|
|
<li>
|
|
|
|
<a class="file-actions-icon" href="/file-actions{{($fileList).Root}}{{$dir}}"><img src="/static/actions.png" width="16px" height="16px" alt="actions"/></a>
|
2022-06-15 07:33:56 +00:00
|
|
|
<a href="/file-mgr{{($fileList).Root}}{{$dir}}">{{$dir}}/</a>
|
2022-06-12 06:00:38 +00:00
|
|
|
</li>
|
2022-06-10 06:38:29 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ range $file := ($fileList).Files }}
|
2022-06-12 06:00:38 +00:00
|
|
|
<li>
|
|
|
|
<a class="file-actions-icon" href="/file-actions{{($fileList).Root}}{{$file}}"><img src="/static/actions.png" width="16px" height="16px" alt="actions"/></a>
|
|
|
|
<a href="/files{{($fileList).Root}}{{$file}}">{{$file}}</a>
|
|
|
|
</li>
|
2022-06-10 06:38:29 +00:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ template "footer" .}}
|