diff --git a/html/func.go b/html/func.go
index 89986841..63995c9e 100644
--- a/html/func.go
+++ b/html/func.go
@@ -27,6 +27,7 @@ func addFuncMap(t *template.Template) {
"duration": duration,
"hasPassed": hasPassed,
"html": unescapeHTML,
+ "iconUploadStatus": iconUploadStatus,
"json": unescapeJS,
"GISStatement": gisStatement,
"latLngDisplay": latLngDisplay,
@@ -140,6 +141,19 @@ func hasPassed(t time.Time) bool {
return t.Before(time.Now())
}
+func iconUploadStatus(s string) string {
+ switch s {
+ case "error":
+ return "bi-exclamation"
+ case "parsed":
+ return "bi-check-circle"
+ case "uploaded":
+ return "bi-arrow-clockwise"
+ default:
+ return "bi-question"
+ }
+}
+
// FormatTimeDuration returns a human-readable string representing a time.Duration
// as "X units early" or "X units late"
func timeDelta(d time.Duration) string {
diff --git a/html/template/sync/pool-by-id.html b/html/template/sync/pool-by-id.html
index f7bd5a15..382a0649 100644
--- a/html/template/sync/pool-by-id.html
+++ b/html/template/sync/pool-by-id.html
@@ -8,7 +8,7 @@
>