{{define "device-cards.html"}}
{{range .Devices}}

{{.Name}}

{{.Child}} · {{.PlatformLabel}}

{{.StateLabel}}

{{if .Locked}}Blocked{{if .ReasonLabel}} {{.ReasonLabel}}{{end}}{{if .TimeLeft}} · {{.TimeLeft}}{{end}}{{else if .Granted}}Time granted{{if .TimeLeft}} · {{.TimeLeft}}{{end}}{{else}}No block active{{end}}

{{if .Until}}

{{if .Granted}}Grant ends{{else}}Lifts{{end}} {{.UntilLocal}}

{{end}}
{{if .Locked}}
{{end}} Edit Schedule Lists Usage

{{if .Online}}online{{else}}offline{{end}} {{if .HasLastSeen}}· last seen {{.LastSeen}}{{else}}· never connected{{end}}

{{.Topic}}

{{end}}
{{end}}