diff --git a/gui/app/components/toolbar/nav-bar.js b/gui/app/components/toolbar/nav-bar.js deleted file mode 100644 index 1c2fcaf4..00000000 --- a/gui/app/components/toolbar/nav-bar.js +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2016 Documize Inc. . All rights reserved. -// -// This software (Documize Community Edition) is licensed under -// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html -// -// You can operate outside the AGPL restrictions by purchasing -// Documize Enterprise Edition and obtaining a commercial license -// by contacting . -// -// https://documize.com - -import $ from 'jquery'; -import { notEmpty } from '@ember/object/computed'; -import { inject as service } from '@ember/service' -import ModalMixin from '../../mixins/modal'; -import Component from '@ember/component'; - -export default Component.extend(ModalMixin, { - folderService: service('folder'), - appMeta: service(), - session: service(), - store: service(), - pinned: service(), - enableLogout: true, - hasPins: notEmpty('pins'), - hasSpacePins: notEmpty('spacePins'), - hasDocumentPins: notEmpty('documentPins'), - hasWhatsNew: false, - newsContent: '', - - init() { - this._super(...arguments); - let constants = this.get('constants'); - - this.pins = []; - - if (this.get('appMeta.authProvider') === constants.AuthProvider.Keycloak) { - let config = this.get('appMeta.authConfig'); - config = JSON.parse(config); - this.set('enableLogout', !config.disableLogout); - } - - this.get('session').hasWhatsNew().then((v) => { - this.set('hasWhatsNew', v); - }); - - let version = this.get('appMeta.version'); - let edition = this.get('appMeta.edition').toLowerCase(); - - let self = this; - let cacheBuster = + new Date(); - $.ajax({ - url: `https://storage.googleapis.com/documize/news/${edition}/${version}.html?cb=${cacheBuster}`, - type: 'GET', - dataType: 'html', - success: function (response) { - if (self.get('isDestroyed') || self.get('isDestroying')) return; - self.set('newsContent', response); - } - }); - }, - - didInsertElement() { - this._super(...arguments); - - if (this.get("session.authenticated")) { - this.eventBus.subscribe('pinChange', this, 'setupPins'); - this.setupPins(); - } - }, - - setupPins() { - if (this.get('isDestroyed') || this.get('isDestroying')) return; - - this.get('pinned').getUserPins().then((pins) => { - if (this.get('isDestroyed') || this.get('isDestroying')) { - return; - } - this.set('pins', pins); - this.set('spacePins', pins.filterBy('isSpace', true)); - this.set('documentPins', pins.filterBy('isDocument', true)); - }); - }, - - willDestroyElement() { - this._super(...arguments); - - this.eventBus.unsubscribe('pinChange'); - }, - - actions: { - jumpToPin(pin) { - let folderId = pin.get('folderId'); - let documentId = pin.get('documentId'); - - if (_.isEmpty(documentId)) { - // jump to space - let folder = this.get('store').peekRecord('folder', folderId); - this.get('router').transitionTo('folder', folderId, folder.get('slug')); - } else { - // jump to doc - let folder = this.get('store').peekRecord('folder', folderId); - this.get('router').transitionTo('document', folderId, folder.get('slug'), documentId, 'document'); - } - }, - - onShowWhatsNewModal() { - this.modalOpen("#whats-new-modal", { "show": true }); - - if (this.get('newsContent.length') > 0) { - this.get('session').seenNewVersion(); - this.set('hasWhatsNew', false); - } - } - } -}); diff --git a/gui/app/components/toolbar/t-actions.js b/gui/app/components/toolbar/t-actions.js deleted file mode 100644 index adec1ef6..00000000 --- a/gui/app/components/toolbar/t-actions.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2016 Documize Inc. . All rights reserved. -// -// This software (Documize Community Edition) is licensed under -// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html -// -// You can operate outside the AGPL restrictions by purchasing -// Documize Enterprise Edition and obtaining a commercial license -// by contacting . -// -// https://documize.com - -import Component from '@ember/component'; - -export default Component.extend({ - classNames: ['col', 'col-sm-5'] -}); diff --git a/gui/app/components/toolbar/t-links.js b/gui/app/components/toolbar/t-links.js deleted file mode 100644 index 595bb049..00000000 --- a/gui/app/components/toolbar/t-links.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 Documize Inc. . All rights reserved. -// -// This software (Documize Community Edition) is licensed under -// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html -// -// You can operate outside the AGPL restrictions by purchasing -// Documize Enterprise Edition and obtaining a commercial license -// by contacting . -// -// https://documize.com - -import { inject as service } from '@ember/service'; -import Component from '@ember/component'; - -export default Component.extend({ - appMeta: service(), - classNames: ['col', 'col-sm-7'], - selectItem: '', -}); diff --git a/gui/app/components/toolbar/t-toolbar.js b/gui/app/components/toolbar/t-toolbar.js deleted file mode 100644 index e790b207..00000000 --- a/gui/app/components/toolbar/t-toolbar.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2016 Documize Inc. . All rights reserved. -// -// This software (Documize Community Edition) is licensed under -// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html -// -// You can operate outside the AGPL restrictions by purchasing -// Documize Enterprise Edition and obtaining a commercial license -// by contacting . -// -// https://documize.com - -import Component from '@ember/component'; - -export default Component.extend({ -}); diff --git a/gui/app/pods/document/block/template.hbs b/gui/app/pods/document/block/template.hbs index b2d59e74..440753e9 100644 --- a/gui/app/pods/document/block/template.hbs +++ b/gui/app/pods/document/block/template.hbs @@ -1,5 +1,17 @@ -{{toolbar/nav-bar}} - -{{toolbar/for-document document=model.document spaces=model.folders space=model.folder permissions=model.permissions showTools=false showDocumentLink=true}} +{{#layout/top-bar}} +
  • + {{#link-to "folder.index" model.folder.id model.folder.slug class='link'}} + {{model.folder.name}} + {{/link-to}} +
  • +
  • + {{#link-to 'document.index' model.folder.id model.folder.slug model.document.id model.document.slug class="link selected"}} + {{model.document.name}} + {{/link-to}} +
  • +{{/layout/top-bar}} {{document/block-editor document=model.document folder=model.folder block=model.block onCancel=(action 'onCancel') onAction=(action 'onAction')}} + +{{#layout/bottom-bar}} +{{/layout/bottom-bar}} \ No newline at end of file diff --git a/gui/app/pods/document/section/template.hbs b/gui/app/pods/document/section/template.hbs index 78ee0ee3..6d20d215 100644 --- a/gui/app/pods/document/section/template.hbs +++ b/gui/app/pods/document/section/template.hbs @@ -1,6 +1,15 @@ -{{toolbar/nav-bar}} - -{{toolbar/for-document document=model.document spaces=model.folders space=model.folder permissions=model.permissions showTools=false showDocumentLink=true}} +{{#layout/top-bar}} +
  • + {{#link-to "folder.index" model.folder.id model.folder.slug class='link'}} + {{model.folder.name}} + {{/link-to}} +
  • +
  • + {{#link-to 'document.index' model.folder.id model.folder.slug model.document.id model.document.slug class="link selected"}} + {{model.document.name}} + {{/link-to}} +
  • +{{/layout/top-bar}}
    @@ -11,3 +20,6 @@
    + +{{#layout/bottom-bar}} +{{/layout/bottom-bar}} \ No newline at end of file diff --git a/gui/app/pods/search/template.hbs b/gui/app/pods/search/template.hbs index f133969c..b8073d06 100644 --- a/gui/app/pods/search/template.hbs +++ b/gui/app/pods/search/template.hbs @@ -1,10 +1,20 @@ -{{toolbar/nav-bar}} +{{#layout/top-bar}} +{{/layout/top-bar}} -{{#toolbar/t-toolbar}} - {{#toolbar/t-links}} - {{/toolbar/t-links}} - {{#toolbar/t-actions}} - {{/toolbar/t-actions}} -{{/toolbar/t-toolbar}} +{{#layout/middle-zone}} + {{#layout/middle-zone-content}} + {{search/search-view filter=filter matchDoc=matchDoc matchContent=matchContent matchTag=matchTag matchFile=matchFile slog=slog}} + {{/layout/middle-zone-content}} -{{search/search-view filter=filter matchDoc=matchDoc matchContent=matchContent matchTag=matchTag matchFile=matchFile slog=slog}} + {{#layout/middle-zone-sidebar}} + + {{/layout/middle-zone-sidebar}} +{{/layout/middle-zone}} + +{{#layout/bottom-bar}} +{{/layout/bottom-bar}} \ No newline at end of file diff --git a/gui/app/styles/app.scss b/gui/app/styles/app.scss index 6d9e8099..c72dc1d8 100644 --- a/gui/app/styles/app.scss +++ b/gui/app/styles/app.scss @@ -16,7 +16,6 @@ @import "view/common.scss"; @import "widget/widget.scss"; -@import "view/navigation.scss"; @import "view/toolbar.scss"; @import "view/views.scss"; @import "layout/all.scss"; diff --git a/gui/app/styles/view/navigation.scss b/gui/app/styles/view/navigation.scss deleted file mode 100644 index b3ffff40..00000000 --- a/gui/app/styles/view/navigation.scss +++ /dev/null @@ -1,27 +0,0 @@ -.nav-bar { - background-color: $color-primary; - padding: 10px 20px; - color: $color-white; - font-size: 1rem; - - .nav-link, .nav-link:visited { - color: $color-white; - - &:hover { - color: darken($color-white, 15%); - } - } - - .nav-title { - font-size: 1.4rem; - font-weight: bold; - } - - .nav-msg { - font-size: 1rem; - } - - .nav-right { - float: right; - } -} diff --git a/gui/app/styles/view/search.scss b/gui/app/styles/view/search.scss index c8800c4b..fbceb6f0 100644 --- a/gui/app/styles/view/search.scss +++ b/gui/app/styles/view/search.scss @@ -1,12 +1,39 @@ .view-search { + margin-top: 30px; + > .heading { font-size: 1.5rem; font-weight: bold; color: $color-dark; + margin-top: 30px; + } + + .search-box { + width: 300px; + } + @media (min-width: 900px) { + .search-box { + width: 400px; + } + } + @media (min-width: 1200px) { + .search-box { + width: 600px; + } + } + @media (min-width: 1400px) { + .search-box { + width: 700px; + } + } + @media (min-width: 1800px) { + .search-box { + width: 900px; + } } > .documents { - margin: 60px 0; + margin: 20px 0; padding: 0; > .document { diff --git a/gui/app/templates/components/search/search-results.hbs b/gui/app/templates/components/search/search-results.hbs index 94f4e9b8..85ec4886 100644 --- a/gui/app/templates/components/search/search-results.hbs +++ b/gui/app/templates/components/search/search-results.hbs @@ -1,4 +1,4 @@ -