|
@ -109,38 +109,37 @@ |
|
|
<form class="upload-form"> |
|
|
<form class="upload-form"> |
|
|
<input type="file" id="fileElem" multiple onchange="handleFiles(this.files)"> |
|
|
<input type="file" id="fileElem" multiple onchange="handleFiles(this.files)"> |
|
|
|
|
|
|
|
|
{{if .EmptyFolder}} |
|
|
|
|
|
|
|
|
{{ if .EmptyFolder }} |
|
|
<div class="row add-files"> |
|
|
<div class="row add-files"> |
|
|
+ |
|
|
+ |
|
|
</div> |
|
|
</div> |
|
|
{{else}} |
|
|
|
|
|
|
|
|
{{ else }} |
|
|
<table width="100%" class="table table-hover"> |
|
|
<table width="100%" class="table table-hover"> |
|
|
{{$path := .Path }} |
|
|
|
|
|
|
|
|
{{ $path := .Path }} |
|
|
|
|
|
{{ $showDirDel := .ShowDirectoryDelete }} |
|
|
{{ range $entry_index, $entry := .Entries }} |
|
|
{{ range $entry_index, $entry := .Entries }} |
|
|
<tr> |
|
|
<tr> |
|
|
<td> |
|
|
<td> |
|
|
{{if $entry.IsDirectory}} |
|
|
|
|
|
|
|
|
{{ if $entry.IsDirectory }} |
|
|
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span> |
|
|
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span> |
|
|
<a href="{{ printpath $path "/" $entry.Name "/"}}" > |
|
|
<a href="{{ printpath $path "/" $entry.Name "/"}}" > |
|
|
{{ $entry.Name }} |
|
|
{{ $entry.Name }} |
|
|
</a> |
|
|
</a> |
|
|
{{else}} |
|
|
|
|
|
|
|
|
{{ else }} |
|
|
<a href="{{ printpath $path "/" $entry.Name }}" > |
|
|
<a href="{{ printpath $path "/" $entry.Name }}" > |
|
|
{{ $entry.Name }} |
|
|
{{ $entry.Name }} |
|
|
</a> |
|
|
</a> |
|
|
{{end}} |
|
|
|
|
|
|
|
|
{{ end }} |
|
|
</td> |
|
|
</td> |
|
|
<td align="right" nowrap> |
|
|
<td align="right" nowrap> |
|
|
{{if $entry.IsDirectory}} |
|
|
|
|
|
{{else}} |
|
|
|
|
|
|
|
|
{{ if not $entry.IsDirectory }} |
|
|
{{ $entry.Mime }} |
|
|
{{ $entry.Mime }} |
|
|
{{end}} |
|
|
|
|
|
|
|
|
{{ end }} |
|
|
</td> |
|
|
</td> |
|
|
<td align="right" nowrap> |
|
|
<td align="right" nowrap> |
|
|
{{if $entry.IsDirectory}} |
|
|
|
|
|
{{else}} |
|
|
|
|
|
|
|
|
{{ if not $entry.IsDirectory }} |
|
|
{{ $entry.Size | humanizeBytes }} |
|
|
{{ $entry.Size | humanizeBytes }} |
|
|
{{end}} |
|
|
|
|
|
|
|
|
{{ end }} |
|
|
</td> |
|
|
</td> |
|
|
<td align="right" nowrap> |
|
|
<td align="right" nowrap> |
|
|
{{ $entry.Timestamp.Format "2006-01-02 15:04" }} |
|
|
{{ $entry.Timestamp.Format "2006-01-02 15:04" }} |
|
@ -150,31 +149,32 @@ |
|
|
<label class="btn" onclick="handleRename('{{ $entry.Name }}', '{{ printpath $path "/" }}')"> |
|
|
<label class="btn" onclick="handleRename('{{ $entry.Name }}', '{{ printpath $path "/" }}')"> |
|
|
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span> |
|
|
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span> |
|
|
</label> |
|
|
</label> |
|
|
{{if $entry.IsDirectory}} |
|
|
|
|
|
<label class="btn" onclick="handleDelete('{{ printpath $path "/" $entry.Name "/" }}')"> |
|
|
|
|
|
|
|
|
{{ if and $entry.IsDirectory $showDirDel }} |
|
|
|
|
|
<label class="btn" onclick="handleDelete('{{ printpath $path "/" $entry.Name "/" }}')"> |
|
|
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> |
|
|
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> |
|
|
</label> |
|
|
</label> |
|
|
{{else}} |
|
|
|
|
|
|
|
|
{{ end }} |
|
|
|
|
|
{{ if not $entry.IsDirectory }} |
|
|
<label class="btn" onclick="handleDelete('{{ printpath $path "/" $entry.Name }}')"> |
|
|
<label class="btn" onclick="handleDelete('{{ printpath $path "/" $entry.Name }}')"> |
|
|
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> |
|
|
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> |
|
|
</label> |
|
|
</label> |
|
|
{{end}} |
|
|
|
|
|
|
|
|
{{ end }} |
|
|
</div> |
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
{{ end }} |
|
|
{{ end }} |
|
|
</table> |
|
|
</table> |
|
|
{{end}} |
|
|
|
|
|
|
|
|
{{ end }} |
|
|
</form> |
|
|
</form> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
{{if .ShouldDisplayLoadMore}} |
|
|
|
|
|
|
|
|
{{ if .ShouldDisplayLoadMore }} |
|
|
<div class="row"> |
|
|
<div class="row"> |
|
|
<a href={{ print .Path "?limit=" .Limit "&lastFileName=" .LastFileName}} > |
|
|
|
|
|
|
|
|
<a href={{ print .Path "?limit=" .Limit "&lastFileName=" .LastFileName }} > |
|
|
Load more |
|
|
Load more |
|
|
</a> |
|
|
</a> |
|
|
</div> |
|
|
</div> |
|
|
{{end}} |
|
|
|
|
|
|
|
|
{{ end }} |
|
|
|
|
|
|
|
|
<br/> |
|
|
<br/> |
|
|
<br/> |
|
|
<br/> |
|
|