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.cr20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/guff/views/html/test/auth.cr b/src/guff/views/html/test/auth.cr
index 0e3d02f..386b6b4 100644
--- a/src/guff/views/html/test/auth.cr
+++ b/src/guff/views/html/test/auth.cr
@@ -4,9 +4,12 @@ require "../page"
class Guff::TestAuthHTMLView
TITLE = "Guff Auth Test"
FEATURES = %w{bootstrap font-awesome guff/util}
+ # /guff-stuff/tinymce-4.3.7/tinymce.min.js
SCRIPTS = %w{
+ /guff-stuff/ckeditor-4.5.8/ckeditor.js
/guff-stuff/js/search-field.js
/guff-stuff/test/tab-users.js
+ /guff-stuff/test/tab-posts.js
}
TEMPLATES = TemplateCache.new({
@@ -23,10 +26,10 @@ class Guff::TestAuthHTMLView
tab: "
<li role='presentation' class='%{css}'>
<a
- id='tab-%{id}'
- href='#tab-pane-%{id}'
+ id='%{prefix}-tab-%{id}'
+ href='#%{prefix}-tab-pane-%{id}'
title='%{text}'
- aria-controls='tab-pane-%{id}'
+ aria-controls='%{prefix}-tab-pane-%{id}'
role='tab'
data-toggle='tab'
>
@@ -68,12 +71,13 @@ class Guff::TestAuthHTMLView
}.join
end
- def get_tabs
- @models.tab.get_tabs.map { |row|
+ def get_tabs(id : Symbol, prefix : String)
+ @models.tab.get_tabs(id).map { |row|
TEMPLATES[:tab].run(row.merge({
- "css": row["css"]? || "",
- "name": h(row["name"]),
- "text": h(row["text"]),
+ "prefix": prefix,
+ "css": row["css"]? || "",
+ "name": h(row["name"]),
+ "text": h(row["text"]),
}))
}.join
end