aboutsummaryrefslogtreecommitdiff
path: root/src/guff/views/html/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff/views/html/test')
-rw-r--r--src/guff/views/html/test/auth.cr28
1 files changed, 27 insertions, 1 deletions
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}
</option>
- "
+ ",
+
+ tab: "
+ <li role='presentation' class='%{css}'>
+ <a
+ id='tab-%{id}'
+ href='#tab-pane-%{id}'
+ title='%{text}'
+ aria-controls='tab-pane-%{id}'
+ role='tab'
+ data-toggle='tab'
+ >
+ <i class='fa %{icon}'></i>
+ %{name}
+ </a>
+ </li>
+ ",
})
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