From cdc582a748a435697e5bf1982a1c3dcaaacc77a9 Mon Sep 17 00:00:00 2001
From: jensilo <k@jensheise.com>
Date: Mon, 18 Dec 2023 23:27:53 +0100
Subject: [PATCH] show empty list notice when empty

---
 templates/template/_list.go.html | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/templates/template/_list.go.html b/templates/template/_list.go.html
index 5d344ff..92a3f97 100644
--- a/templates/template/_list.go.html
+++ b/templates/template/_list.go.html
@@ -67,6 +67,15 @@
                     <td colspan="6">{{ "template.list.empty" | t }}</td>
                 </tr>
             {{ end }}
+
+            {{ if .Data }}
+                {{ if not .Data.Templates }}
+                    <tr class="text-center">
+                        <td colspan="6">{{ "template.list.empty" | t }}</td>
+                    </tr>
+                {{ end }}
+            {{ end }}
+
             {{ range .Data.Templates }}
                 <tr>
                     <td>{{ .Name }}</td>
-- 
GitLab