From 6ff8fd4e02cb962c9e2d1e90691324c67f58c4e8 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 2 Apr 2016 23:14:45 -0400 Subject: add test auth panel tabs --- src/guff/views/html/test/auth.cr | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/guff/views/html/test') diff --git a/src/guff/views/html/test/auth.cr b/src/guff/views/html/test/auth.cr index 528b652..e30a4a2 100644 --- a/src/guff/views/html/test/auth.cr +++ b/src/guff/views/html/test/auth.cr @@ -18,7 +18,23 @@ class Guff::TestAuthHTMLView > %{name} - " + ", + + tab: " + + ", }) def self.run(models, context : HTTP::Server::Context) @@ -52,5 +68,15 @@ class Guff::TestAuthHTMLView }.join end + def get_tabs + @models.tab.get_tabs.map { |row| + TEMPLATES[:tab].run(row.merge({ + "css": row["css"]? || "", + "name": h(row["name"]), + "text": h(row["text"]), + })) + }.join + end + ECR.def_to_s("./src/guff/views/ecrs/test/auth.ecr") end -- cgit v1.2.3