From 90d377d8bbd8cfd5e1c134b036ca420910de4729 Mon Sep 17 00:00:00 2001 From: Harvey Kandola Date: Thu, 2 Jun 2016 18:56:18 +0100 Subject: [PATCH] empt state done! --- app/app/components/document/document-view.js | 5 ++++ app/app/styles/view/document/content.scss | 27 ++++++++++++++++--- app/app/styles/view/page-documents.scss | 24 +++++++++++++++++ .../components/document/document-view.hbs | 11 ++++++++ .../components/folder/folder-dashboard.hbs | 17 ++++++++++++ .../database/scripts/autobuild/db_00000.sql | 1 + 6 files changed, 82 insertions(+), 3 deletions(-) diff --git a/app/app/components/document/document-view.js b/app/app/components/document/document-view.js index 5ecbbe32..4af199e1 100644 --- a/app/app/components/document/document-view.js +++ b/app/app/components/document/document-view.js @@ -35,6 +35,11 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { children: false }, + noSections: Ember.computed('pages', function() { + console.log(this.get('pages.length')); + return this.get('pages.length') === 1; + }), + didInsertElement() { let self = this; diff --git a/app/app/styles/view/document/content.scss b/app/app/styles/view/document/content.scss index 73f5e725..857f50ec 100644 --- a/app/app/styles/view/document/content.scss +++ b/app/app/styles/view/document/content.scss @@ -65,11 +65,8 @@ } > .pages { - > .wysiwyg { - > .is-a-page { - .page-title { > .page-toolbar { @@ -92,3 +89,27 @@ } } } + +.no-sections { + text-align: center; + opacity: 0.7; + + > .box { + padding: 35px; + width: 300px; + display: inline-block; + margin: 0 20px; + + > .message { + font-size: 14px; + color: $color-gray; + margin-top: 35px; + } + + > .regular-button { + cursor: default !important; + } + + } +} + diff --git a/app/app/styles/view/page-documents.scss b/app/app/styles/view/page-documents.scss index 00a6d230..ae08df4a 100644 --- a/app/app/styles/view/page-documents.scss +++ b/app/app/styles/view/page-documents.scss @@ -149,3 +149,27 @@ text-align: center; margin: 2rem 0; } + +.no-documents { + margin-top: 100px; + text-align: center; + opacity: 0.7; + + > .box { + padding: 35px; + width: 300px; + display: inline-block; + margin: 0 20px; + + > .message { + font-size: 14px; + color: $color-gray; + margin-top: 35px; + } + + > .regular-button { + cursor: default !important; + } + + } +} diff --git a/app/app/templates/components/document/document-view.hbs b/app/app/templates/components/document/document-view.hbs index 68a1d7d3..bca57ad0 100644 --- a/app/app/templates/components/document/document-view.hbs +++ b/app/app/templates/components/document/document-view.hbs @@ -80,3 +80,14 @@ +{{#if noSections}} +
+
+
+ add +
section
+
+
Add a new section
to this document
+
+
+{{/if}} diff --git a/app/app/templates/components/folder/folder-dashboard.hbs b/app/app/templates/components/folder/folder-dashboard.hbs index a72332f6..f38c6289 100644 --- a/app/app/templates/components/folder/folder-dashboard.hbs +++ b/app/app/templates/components/folder/folder-dashboard.hbs @@ -63,4 +63,21 @@ {{#if hasDocuments}} {{folder/documents-list documents=documents folder=folder isFolderOwner=isFolderOwner onDocumentsChecked=(action 'onDocumentsChecked') }} +{{else}} +
+
+
+ add +
space
+
+
Create a new space for
all your documentation
+
+
+
+ add +
document
+
+
Start a new document or
import .doc .docx, .txt .md files
+
+
{{/if}} diff --git a/documize/database/scripts/autobuild/db_00000.sql b/documize/database/scripts/autobuild/db_00000.sql index 40fd8e60..5a632ebd 100644 --- a/documize/database/scripts/autobuild/db_00000.sql +++ b/documize/database/scripts/autobuild/db_00000.sql @@ -264,3 +264,4 @@ INSERT INTO `config` VALUES ('FILEPLUGINS', '[{\"Comment\": \"Disable (or not) built-in html import (NOTE: no Plugin name)\",\"Disabled\": false,\"API\": \"Convert\",\"Actions\": [\"htm\",\"html\"]},{\"Comment\": \"Disable (or not) built-in Documize API import used from SDK (NOTE: no Plugin name)\",\"Disabled\": false,\"API\": \"Convert\",\"Actions\": [\"documizeapi\"]}]'); INSERT INTO `config` VALUES ('LICENSE','{\"token\": \"\",\"endpoint\": \"https://api.documize.com\"}'); INSERT INTO `config` VALUES ('META','{\"database\": \"db_00000.sql\"}'); +INSERT INTO `documize`.`config` VALUES ( 'SECTION-GITHUB', '{\"clientID\": \"\", \"clientSecret\": \"\", \"authorizationCallbackURL\": \"https://localhost:5001/api/public/validate?section=github\"}' ); \ No newline at end of file