diff --git a/html/func.go b/html/func.go index c857c96a..98919e21 100644 --- a/html/func.go +++ b/html/func.go @@ -20,6 +20,7 @@ import ( func addFuncMap(t *template.Template) { funcMap := template.FuncMap{ "bigNumber": bigNumber, + "hasPassed": hasPassed, "html": unescapeHTML, "json": unescapeJS, "GISStatement": gisStatement, @@ -62,6 +63,10 @@ func timeAsRelativeDate(d time.Time) string { return d.Format("01-02") } +func hasPassed(t time.Time) bool { + return t.Before(time.Now()) +} + // 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/setting-integration.html b/html/template/sync/setting-integration.html index 8ce34735..d879a122 100644 --- a/html/template/sync/setting-integration.html +++ b/html/template/sync/setting-integration.html @@ -69,13 +69,17 @@