2020-11-08 16:00:33 +00:00
|
|
|
{{template "header" .}}
|
|
|
|
<div class="mainbody">
|
|
|
|
{{if not .Success}}
|
|
|
|
<!-- not successful -->
|
2020-11-22 17:33:27 +00:00
|
|
|
<p>If you upload your CSV file from {{.Title}} here, we will display some graphs here</p>
|
2020-11-08 16:00:33 +00:00
|
|
|
<div class="indent">
|
2020-11-22 17:33:27 +00:00
|
|
|
{{ if eq .Title "Cake" }}
|
2020-11-21 14:06:58 +00:00
|
|
|
<form enctype="multipart/form-data" action="/rewards" method="post">
|
2020-11-22 17:33:27 +00:00
|
|
|
{{ else }}
|
|
|
|
<form enctype="multipart/form-data" action="/kraken" method="post">
|
|
|
|
{{ end }}
|
2020-11-21 14:06:58 +00:00
|
|
|
<input type="file" name="csvFile" />
|
|
|
|
<input type="submit" value="upload" />
|
|
|
|
</form>
|
2020-11-08 16:00:33 +00:00
|
|
|
</div>
|
|
|
|
{{if .Uploaded}}
|
|
|
|
<!-- Uploaded but not successful -->
|
2020-11-21 14:06:58 +00:00
|
|
|
{{if ne .ErrorText ""}}
|
2020-11-08 16:00:33 +00:00
|
|
|
<div class="err">
|
2020-11-15 19:46:32 +00:00
|
|
|
<p>{{.ErrorText}}</p>
|
2020-11-08 16:00:33 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
2020-11-21 14:06:58 +00:00
|
|
|
{{end}}
|
2020-11-08 16:00:33 +00:00
|
|
|
{{else}}
|
|
|
|
<!-- successful -->
|
|
|
|
{{template "barGraph" .}}
|
2020-11-15 19:46:32 +00:00
|
|
|
<!-- {{template "table" .}} -->
|
2020-11-08 16:00:33 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{template "footer" .}}
|