diff --git a/gui/app/components/document/sidebar-attachment.js b/gui/app/components/document/sidebar-attachment.js index 81646851..ff5dd646 100644 --- a/gui/app/components/document/sidebar-attachment.js +++ b/gui/app/components/document/sidebar-attachment.js @@ -17,7 +17,7 @@ import Notifier from '../../mixins/notifier'; import Component from '@ember/component'; export default Component.extend(Modals, Notifier, { - classNames: ["section"], + classNames: ["document-meta"], documentService: service('document'), browserSvc: service('browser'), appMeta: service(), @@ -56,7 +56,7 @@ export default Component.extend(Modals, Notifier, { let uploadUrl = `${url}/documents/${documentId}/attachments`; // Handle upload clicks on button and anything inside that button. - let sel = ['#upload-document-files ', '#upload-document-files > div']; + let sel = ['#upload-document-files ', '#upload-document-files > span']; for (var i=0; i < 2; i++) { let dzone = new Dropzone(sel[i], { headers: { @@ -109,15 +109,6 @@ export default Component.extend(Modals, Notifier, { this.notifySuccess('File deleted'); this.getAttachments(); }); - }, - - onExport() { - this.get('documentSvc').export({}).then((htmlExport) => { - this.get('browserSvc').downloadFile(htmlExport, this.get('space.slug') + '.html'); - this.notifySuccess('Exported'); - }); - - this.modalClose("#space-export-modal"); } } }); diff --git a/gui/app/pods/document/index/template.hbs b/gui/app/pods/document/index/template.hbs index b6c8a276..9b6c7824 100644 --- a/gui/app/pods/document/index/template.hbs +++ b/gui/app/pods/document/index/template.hbs @@ -29,8 +29,6 @@ {{#ui/ui-toolbar dark=false light=true raised=true large=false bordered=true}} {{ui/ui-toolbar-icon icon=constants.Icon.Index color=constants.Color.Gray tooltip="Table of contents" selected=(eq sidebarTab "toc") onClick=(action "onSidebarChange" "toc")}} - {{ui/ui-toolbar-icon icon=constants.Icon.Attachment color=constants.Color.Gray tooltip="Attachments" - selected=(eq sidebarTab "files") onClick=(action "onSidebarChange" "files")}} {{#if (eq appMeta.edition constants.Product.EnterpriseEdition)}} {{ui/ui-toolbar-icon icon=constants.Icon.Chat color=constants.Color.Gray tooltip="Comments & Feedback" selected=(eq sidebarTab "feedback") onClick=(action "onSidebarChange" "feedback")}} @@ -55,12 +53,6 @@ onPageSequenceChange=(action "onPageSequenceChange")}} {{/if}} - {{#if (eq sidebarTab "files")}} - {{document/sidebar-attachment - document=document - permissions=permissions}} - {{/if}} - {{#if (eq sidebarTab "feedback")}} {{enterprise/sidebar-feedback document=document @@ -89,6 +81,7 @@ spaces=folders document=document versions=versions + attachments=attachments permissions=permissions contributionStatus=contributionStatus approvalStatus=approvalStatus}} diff --git a/gui/app/styles/core/view/document/sidebar-attachment.scss b/gui/app/styles/core/view/document/sidebar-attachment.scss index 274a8afa..07029ac6 100644 --- a/gui/app/styles/core/view/document/sidebar-attachment.scss +++ b/gui/app/styles/core/view/document/sidebar-attachment.scss @@ -1,9 +1,3 @@ -#upload-document-files { - > .dz-preview, .dz-processing { - display: none !important; - } -} - .document-sidebar-attachment { > .files { margin: 0; @@ -11,30 +5,48 @@ > .file { list-style-type: none; - margin: 10px 0 0 0; - padding: 5px; - width: 100%; + margin: 0; + padding: 0 10px 0 0; font-size: 0.9rem; position: relative; + display: inline-block; > a { display: inline-block; - font-size: 0.9rem; - vertical-align: text-top; - margin-right: 10px; - width: 90%; + font-size: 1rem; @extend .text-truncate; } > .menu { - position: absolute; - right: -10px; - top: 0; + display: inline-block; + color: map-get($gray-shades, 300); + font-size: 1.2rem; + + &:hover { + color: map-get($gray-shades, 600); + } } } } } +#upload-document-files { + > span { + display: block; + color: map-get($gray-shades, 600); + font-size: 1rem; + cursor: pointer; + + &:hover { + color: map-get($gray-shades, 800); + } + } + + > .dz-preview, .dz-processing { + display: none !important; + } +} + .dz-preview, .dz-processing { display: none !important; } diff --git a/gui/app/styles/core/view/space.scss b/gui/app/styles/core/view/space.scss index 7edcfc27..149f3149 100644 --- a/gui/app/styles/core/view/space.scss +++ b/gui/app/styles/core/view/space.scss @@ -17,7 +17,6 @@ } .view-space { - > .documents { margin: 0; padding: 0; @@ -76,84 +75,84 @@ margin-top: 0.4rem; color: $color-black-light-3; } - } - > .meta { - padding: 25px 0 0 0; + > .meta { + padding: 25px 0 0 0; - > .lifecycle { - display: inline-block; - text-transform: uppercase; - font-size: 0.9rem; - font-weight: 500; - text-align: center; - @include border-radius(5px); - background-color: map-get($gray-shades, 300); - padding: 0.25rem 1rem; - margin-right: 20px; - - > .draft { - color: map-get($yellow-shades, 600); - } - - > .live { - color: map-get($green-shades, 600); - } - - > .archived { - color: map-get($red-shades, 600); - } - } - - > .dicon { - color: map-get($gray-shades, 600); - font-size: 20px; - } - - .categories { - display: inline-block; - padding: 0; - - > .category { - padding: 0 15px 0 0; + > .lifecycle { display: inline-block; + text-transform: uppercase; + font-size: 0.9rem; + font-weight: 500; + text-align: center; + @include border-radius(5px); + background-color: map-get($gray-shades, 300); + padding: 0.25rem 1rem; + margin-right: 20px; - > .dicon { - color: map-get($gray-shades, 500); - font-size: 20px; - vertical-align: bottom; + > .draft { + color: map-get($yellow-shades, 600); } - > .name { - display: inline-block; - color: map-get($gray-shades, 800); - font-size: 1rem; + > .live { + color: map-get($green-shades, 600); + } + + > .archived { + color: map-get($red-shades, 600); } } - } - .hashtags { - display: inline-block; - padding: 0; + > .dicon { + color: map-get($gray-shades, 600); + font-size: 20px; + } - > .hashtag { - padding: 0 15px 0 0; + .categories { + display: inline-block; + padding: 0; - > .dicon { - color: map-get($gray-shades, 500); - font-size: 20px; - vertical-align: bottom; - } - - > .name { + > .category { + padding: 0 15px 0 0; display: inline-block; - color: map-get($gray-shades, 800); - font-size: 1rem; - } - &:hover { - > .dicon, > .name { - color: map-get($gray-shades, 600); + > .dicon { + color: map-get($gray-shades, 500); + font-size: 20px; + vertical-align: bottom; + } + + > .name { + display: inline-block; + color: map-get($gray-shades, 800); + font-size: 1rem; + } + } + } + + .hashtags { + display: inline-block; + padding: 0; + + > .hashtag { + padding: 0 15px 0 0; + + > .dicon { + color: map-get($gray-shades, 500); + font-size: 20px; + vertical-align: bottom; + } + + > .name { + display: inline-block; + color: map-get($gray-shades, 800); + font-size: 1rem; + } + + &:hover { + > .dicon, > .name { + color: map-get($gray-shades, 600); + } } } } diff --git a/gui/app/templates/components/document/document-meta.hbs b/gui/app/templates/components/document/document-meta.hbs index 20b90597..d434cce0 100644 --- a/gui/app/templates/components/document/document-meta.hbs +++ b/gui/app/templates/components/document/document-meta.hbs @@ -62,7 +62,6 @@ {{#attach-tooltip showDelay=1000}}Tag{{/attach-tooltip}} {{/each}} - {{#if unassigned}} {{#if permissions.spaceManage}}
Unassigned
@@ -70,6 +69,8 @@
Unassigned
{{/if}} {{/if}} - - + +{{document/sidebar-attachment document=document permissions=permissions}} + + diff --git a/gui/app/templates/components/document/sidebar-attachment.hbs b/gui/app/templates/components/document/sidebar-attachment.hbs index b1a4766e..b25d049c 100644 --- a/gui/app/templates/components/document/sidebar-attachment.hbs +++ b/gui/app/templates/components/document/sidebar-attachment.hbs @@ -1,13 +1,6 @@ -
attachments
-{{#if canEdit}} -
- - {{ui/ui-button color=constants.Color.Gray label="Upload" id="upload-document-files"}} - -
-{{/if}} - -{{#if hasAttachments}} +{{#if (or hasAttachments canEdit)}} + +
attachments
    {{#each files key="id" as |file|}} @@ -18,21 +11,19 @@ {{#if canEdit}} {{/if}} @@ -40,10 +31,12 @@ {{/each}}
-{{else}} -

No attachments

+ {{#if canEdit}} + {{#unless hasAttachments}} + + {{/unless}} +
+ Upload +
+ {{/if}} {{/if}} - -{{#ui/ui-dialog title="Delete Attachment" confirmCaption="Delete" buttonColor=constants.Color.Red show=showDialog onAction=(action "onDelete")}} -

Are you sure you want to delete {{deleteAttachment.name}}?

-{{/ui/ui-dialog}} diff --git a/gui/app/templates/components/folder/documents-list.hbs b/gui/app/templates/components/folder/documents-list.hbs index b07a457f..8202d26c 100644 --- a/gui/app/templates/components/folder/documents-list.hbs +++ b/gui/app/templates/components/folder/documents-list.hbs @@ -71,20 +71,20 @@ {{#if (not-eq viewDensity "3")}}
{{ document.excerpt }}
{{/if}} - {{/link-to}} - {{#if (eq viewDensity "1")}} -
-
-
- {{document.lifecycleLabel}} + {{#if (eq viewDensity "1")}} +
+
+
+ {{document.lifecycleLabel}} +
+ {{folder/document-categories categories=document.category}} + {{folder/document-tags documentTags=document.tags}}
- {{folder/document-categories categories=document.category}} - {{folder/document-tags documentTags=document.tags}} -
- {{/if}} + {{/if}} + {{/link-to}} {{#if hasDocumentActions}}