From 470210b93807a2944e17775d392293b1455a2c29 Mon Sep 17 00:00:00 2001 From: pluja Date: Tue, 7 May 2024 23:04:31 +0200 Subject: [PATCH] show notes and delisted status --- src/database/models.go | 1 + src/frontend/templates/service.html | 217 +++++++++++++++------------- 2 files changed, 121 insertions(+), 97 deletions(-) diff --git a/src/database/models.go b/src/database/models.go index 84968b5..8340767 100644 --- a/src/database/models.go +++ b/src/database/models.go @@ -31,6 +31,7 @@ type Service struct { Fiat bool `json:"fiat"` Cash bool `json:"cash"` Lightning bool `json:"lightning"` + Notes []string `json:"notes"` } type TosReview struct { diff --git a/src/frontend/templates/service.html b/src/frontend/templates/service.html index aedbb7c..337fa67 100644 --- a/src/frontend/templates/service.html +++ b/src/frontend/templates/service.html @@ -3,10 +3,9 @@ -
+
{{if .Service.Pending}} -
+ {{end}} + + + {{if and (not .Service.Pending) (not .Service.Listed)}} + {{end}} + + {{if not (eq (len .Service.Notes) 0)}} + {{range .Service.Notes}} + {{if ne . ""}} +

+ {{.}} +

+ {{end}} + {{end}} + {{end}} + +
@@ -42,103 +70,102 @@
-
- + - + {{partial "partials/service_icons" .Service}} -
-

{{if ne .Service.Description ""}} {{.Service.Description | safe}} {{else}} This {{.Service.Type}} does not have a description. {{end}}

-
+

{{if ne .Service.Description ""}} {{.Service.Description | safe}} {{else}} This {{.Service.Type}} does not have a description. {{end}}