{{define "upload_result_card"}}

{{.DocName}}

{{if .Success}}✓ Success{{else}}✗ Failed{{end}}

Job ID: {{.JobID}}

File Size: {{printf "%.2f MB" (div .FileSize 1048576.0)}}

{{if .Success}}

Successfully uploaded to ServiceTrade

{{else}}

{{.Error}}

{{end}}
{{if .Success}}
Upload Complete
{{else}}
Upload Failed
{{end}}
{{end}} {{define "upload_results_pagination"}}

Upload Results

{{.TotalJobs}} Total Jobs
{{.TotalSuccess}} Successful
{{.TotalFailure}} Failed
{{printf "%.1f" (div .TotalBytesUploaded 1048576.0)}} MB Uploaded
{{.TotalTime}} Total Time
{{if gt .TotalSuccess 0}}

Successfully uploaded {{.TotalSuccess}} document(s) to ServiceTrade in {{.TotalTime}}!

{{end}} {{if gt .TotalFailure 0}}

Failed to upload {{.TotalFailure}} document(s). See details below.

{{end}}
{{range .Results}} {{template "upload_result_card" .}} {{end}}
{{if gt .TotalPages 1}}
Showing {{.StartIndex}}-{{.EndIndex}} of {{.TotalResults}} results
{{if gt .CurrentPage 1}} {{end}} {{range $i := sequence .StartPage .EndPage}} {{end}} {{if lt .CurrentPage .TotalPages}} {{end}}
{{end}}
{{end}}