From 50ac423f6e3be7566c1106647158e81b6eaae44a Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 3 Apr 2016 03:29:32 -0400 Subject: remove tinymce --- src/guff/models/tab.cr | 82 ++++++++----- src/guff/views/ecrs/test/auth.ecr | 235 +++++++++++++++++++++++++++++++++++--- src/guff/views/html/test/auth.cr | 20 ++-- 3 files changed, 287 insertions(+), 50 deletions(-) (limited to 'src/guff') diff --git a/src/guff/models/tab.cr b/src/guff/models/tab.cr index 8d6428b..3649cdd 100644 --- a/src/guff/models/tab.cr +++ b/src/guff/models/tab.cr @@ -40,39 +40,63 @@ class Guff::TabModel < Guff::Model "text": "Configure site settings.", }] - TABS = [{ - "id": "home", - "css": "active", - "icon": "fa-home", - "name": "Home", - "text": "View home tab.", - }, { - "id": "posts", - "icon": "fa-cubes", - "name": "Posts", - "text": "Manage blog, pages, and projects.", - }, { - "id": "files", - "icon": "fa-files-o", - "name": "Files", - "text": "Manage files.", - }, { - "id": "users", - "icon": "fa-users", - "name": "Users", - "text": "Manage users and permissions.", - }, { - "id": "settings", - "icon": "fa-cog", - "name": "Settings", - "text": "Configure site settings.", - }] + TABS = { + admin: [{ + "id": "home", + "css": "active", + "icon": "fa-home", + "name": "Home", + "text": "View home tab.", + }, { + "id": "posts", + "icon": "fa-cubes", + "name": "Posts", + "text": "Manage blog, pages, and projects.", + }, { + "id": "files", + "icon": "fa-files-o", + "name": "Files", + "text": "Manage files.", + }, { + "id": "users", + "icon": "fa-users", + "name": "Users", + "text": "Manage users and permissions.", + }, { + "id": "settings", + "icon": "fa-cog", + "name": "Settings", + "text": "Configure site settings.", + }], + + post_new: [{ + "id": "type", + "icon": "", + "name": "Choose Post Type", + "text": "", + }, { + "id": "blog", + "icon": "", + "name": "Create Blog Post", + "text": "", + }, { + "id": "page", + "icon": "", + "name": "Create Page", + "text": "", + }, { + "id": "project", + "icon": "", + "name": "Create Project", + "text": "", + }], + } def initialize(models : Models) super(models, SQL) end - def get_tabs - TABS + def get_tabs(id : Symbol) + TABS[id] end end diff --git a/src/guff/views/ecrs/test/auth.ecr b/src/guff/views/ecrs/test/auth.ecr index ca4146c..6999737 100644 --- a/src/guff/views/ecrs/test/auth.ecr +++ b/src/guff/views/ecrs/test/auth.ecr @@ -18,11 +18,11 @@
-
+
@@ -32,7 +32,7 @@ class='btn btn-primary' title='Create new post.' data-toggle='modal' - data-target='#user-add-dialog' + data-target='#post-new-dialog' > New Post @@ -47,9 +47,9 @@

-
+
-
+
@@ -59,7 +59,7 @@ class='btn btn-primary' title='Create new post.' data-toggle='modal' - data-target='#user-add-dialog' + data-target='#post-new-dialog' > New Post @@ -99,9 +99,9 @@

-
+
-
+

@@ -109,9 +109,9 @@

-
+
-
+
@@ -207,9 +207,9 @@
-
+
-
+

@@ -217,7 +217,7 @@

-
+
@@ -500,3 +500,212 @@
+ + 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: "