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-08-21 19:10:12 +00:00
|
|
|
<div class="item" data-dir="{{- if .IsDir}}true{{ else }}false{{ end }}" id="{{.URL}}">
|
|
|
|
<div>
|
|
|
|
<a href="{{.URL}}">
|
|
|
|
{{- if .IsDir}}
|
|
|
|
<i class="material-icons">folder</i>
|
|
|
|
{{- else}}
|
|
|
|
<i class="material-icons">insert_drive_file</i>
|
|
|
|
{{- end}}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<a href="{{.URL}}">
|
|
|
|
<span class="name">{{.Name}}</span>
|
|
|
|
{{- if .IsDir}}
|
|
|
|
<p data-order="-1">—</p>
|
|
|
|
{{- else}}
|
|
|
|
<p data-order="{{.Size}}">{{.HumanSize}}</p>
|
|
|
|
{{- end}}
|
|
|
|
<p>
|
|
|
|
<time datetime="{{.HumanModTime " 2006-01-02T15:04:05Z"}}">{{.HumanModTime "01/02/2006 03:04:05 PM -07:00"}}</time>
|
|
|
|
</p>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<span class="checkbox" data-href="{{.URL}}"><i class="material-icons">check</i>
|
|
|
|
</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-08-21 19:10:12 +00:00
|
|
|
<input style="display:none" type="file" id="upload-input" onchange="handleFiles(this.files)" value="Upload" multiple>
|
|
|
|
{{ end }}
|
2016-06-28 20:28:39 +00:00
|
|
|
|
2016-08-21 19:10:12 +00:00
|
|
|
{{ if .User.AllowNew }}
|
2016-10-18 15:42:48 +00:00
|
|
|
<input id="newdir" type="text" placeholder="Name. End with a trailing slash to create a dir.">
|
2016-08-21 19:10:12 +00:00
|
|
|
<div class="floating">
|
|
|
|
<div class="action" id="new">
|
2016-10-01 12:58:17 +00:00
|
|
|
<i class="material-icons" title="New file or directory. If you don't write an extension, a directory will be created.">add</i>
|
2016-08-21 19:10:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|