dorfylegends/backend/templates/load.html

52 lines
1.3 KiB
HTML
Raw Normal View History

2022-04-26 18:39:24 +03:00
{{template "layout.html" .}}
{{define "title"}}Loading{{end}}
{{define "content"}}
2022-04-27 22:44:39 +03:00
<h3>Load World</h3>
<p>Current Path: {{ .Current }}</p>
<table class="table table-hover object-table" style="white-space: nowrap;">
<tr>
<th width="100%">File</th>
<th>Size</th>
<th>Date</th>
</tr>
2022-04-26 18:39:24 +03:00
2022-04-27 22:44:39 +03:00
{{- range .Partitions }}
<tr>
<td><a href="/load?p={{ . }}"><i class="bi bi-hdd"></i> {{ . }}</a></td>
<td></td>
<td></td>
</tr>
2022-04-26 18:39:24 +03:00
{{- end }}
2022-04-27 22:44:39 +03:00
<tr>
<td><a href="/load?p={{ (printf `%s/..` $.Current) }}&x=1"><i class="bi bi-folder2"></i> ..</a></td>
<td></td>
<td></td>
</tr>
{{- range $f := .List }}{{- if $f.IsDir }}
<tr>
<td>
<a href="/load?p={{ (printf `%s/%s` $.Current $f.Name) }}"><i class="bi bi-folder2"></i> {{$f.Name}}</a>
</td>
<td></td>
<td></td>
</tr>
{{- end }}{{- end }}
{{- range $f := .List }}{{- if isLegendsXml $f }}
<tr>
<td>
<a class="loadable" href="/load?p={{ (printf `%s/%s` $.Current $f.Name) }}"><i class="bi bi-filetype-xml"></i> {{$f.Name}}</a>
</td>
<td>{{ bytes $f.Size }}</td>
<td>{{ $f.ModTime.Format "02 Jan 06 15:04" }}</td>
</tr>
{{- end }}{{- end }}
</table>
2022-04-26 18:39:24 +03:00
<p>{{ json . }}</p>
{{- end }}