diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-04-02 23:14:45 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-04-02 23:14:45 -0400 |
commit | 6ff8fd4e02cb962c9e2d1e90691324c67f58c4e8 (patch) | |
tree | 6f6987b854913ff0727cf7964118619b04ceb1bc /src/guff/views/html/test | |
parent | 6d67ff3ad553cd48fd1a30da0ab287cf8a1b6bc0 (diff) | |
download | old-guff-6ff8fd4e02cb962c9e2d1e90691324c67f58c4e8.tar.bz2 old-guff-6ff8fd4e02cb962c9e2d1e90691324c67f58c4e8.zip |
add test auth panel tabs
Diffstat (limited to 'src/guff/views/html/test')
-rw-r--r-- | src/guff/views/html/test/auth.cr | 28 |
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 |