2016-06-10 21:18:44 +00:00
|
|
|
{{ define "content" }}
|
2016-08-21 19:10:12 +00:00
|
|
|
{{ with .Data }}
|
|
|
|
<div class="listing">
|
|
|
|
<div class="container" id="listing">
|
|
|
|
{{- range .Items}}
|
2016-08-22 10:37:56 +00:00
|
|
|
{{ if .UserAllowed }}
|
2016-12-29 18:01:28 +00:00
|
|
|
<div ondragstart="itemDragStart(event)"
|
2016-12-29 18:36:53 +00:00
|
|
|
{{ if .IsDir}}ondragover="itemDragOver(event)" ondrop="itemDrop(event)"{{ end }}
|
|
|
|
draggable="true"
|
|
|
|
class="item"
|
2016-12-30 11:53:46 +00:00
|
|
|
onclick="selectItemEvent(event)"
|
|
|
|
ondblclick="openItemEvent(event)"
|
2016-12-29 18:36:53 +00:00
|
|
|
data-dir="{{ .IsDir }}"
|
|
|
|
data-url="{{ .URL }}"
|
2016-12-29 22:50:36 +00:00
|
|
|
id="{{ EncodeBase64 .Name }}">
|
2016-08-21 19:10:12 +00:00
|
|
|
<div>
|
2016-12-29 18:01:28 +00:00
|
|
|
{{- if .IsDir}}
|
|
|
|
<i class="material-icons">folder</i>
|
|
|
|
{{- else}}
|
|
|
|
<i class="material-icons">insert_drive_file</i>
|
|
|
|
{{- end}}
|
2016-08-21 19:10:12 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2016-12-29 18:01:28 +00:00
|
|
|
<span class="name">{{.Name}}</span>
|
|
|
|
{{- if .IsDir}}
|
|
|
|
<p data-order="-1">—</p>
|
|
|
|
{{- else}}
|
|
|
|
<p data-order="{{.Size}}">{{.HumanSize}}</p>
|
|
|
|
{{- end}}
|
|
|
|
<p>
|
2016-12-29 18:36:53 +00:00
|
|
|
<time datetime="{{.HumanModTime "2006-01-02T15:04:05Z"}}">{{.HumanModTime "2 Jan 2006 03:04 PM"}}</time>
|
2016-12-29 18:01:28 +00:00
|
|
|
</p>
|
2016-08-21 19:10:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-22 10:37:56 +00:00
|
|
|
{{ end }}
|
2016-06-28 09:01:00 +00:00
|
|
|
{{- end}}
|
2016-08-21 19:10:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-06-23 07:22:39 +00:00
|
|
|
|
2016-11-20 19:34:30 +00:00
|
|
|
<input style="display:none" type="file" id="upload-input" onchange="handleFiles(this.files, '')" value="Upload" multiple>
|
2016-08-21 19:10:12 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|