go-project-template/httpserver/templates/importer-process.html
2024-05-05 15:10:32 -07:00

26 lines
892 B
HTML

{{template "base.html" . }}
{{ define "body" }}
{{ range $_, $file := .Files }}
<div class="file">
<p>{{ $file.Filename }}</p>
<p>
<label for="format">
Format: <select name="format" id="format">
<option value="">please select</option>
{{ range $_, $option := $.Formats }}
<option value="{{ $option }}"{{ if eq $file.Format $option }} selected{{ end }}>{{ $option }}</option>
{{ end }}
</select>
</label>
</p>
<p>
<label for="separator">Separator <input type="text" id="separator" value="{{ $file.Separator }}" size="2"></label> <small>only relevant for format=separated-values</small>
</p>
<details>
<summary>raw first few lines</summary>
<code>{{ range $file.Lines }}{{ . }}<br />{{ end }}</code>
</details>
</div>
{{ end}}
{{ end }}