diff --git a/README.md b/README.md index 6ed3b34a..a489539b 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,9 @@ Space view. ## Latest version -[Community edition: v1.65.1](https://github.com/documize/community/releases) +[Community edition: v1.65.2](https://github.com/documize/community/releases) -[Enterprise edition: v1.67.1](https://documize.com/downloads) +[Enterprise edition: v1.67.2](https://documize.com/downloads) ## OS support diff --git a/gui/app/components/document/document-meta.js b/gui/app/components/document/document-meta.js index 8c8be254..7f1980db 100644 --- a/gui/app/components/document/document-meta.js +++ b/gui/app/components/document/document-meta.js @@ -10,36 +10,18 @@ // https://documize.com import $ from 'jquery'; +import { A } from '@ember/array'; import { computed } from '@ember/object'; import { notEmpty } from '@ember/object/computed'; import { inject as service } from '@ember/service'; -import { A } from '@ember/array'; -import { schedule } from '@ember/runloop'; -import ModalMixin from '../../mixins/modal'; +import Modals from '../../mixins/modal'; +import Tooltips from '../../mixins/tooltip'; import Component from '@ember/component'; -export default Component.extend(ModalMixin, { - documentService: service('document'), - categoryService: service('category'), +export default Component.extend(Modals, Tooltips, { + documentService: service('document'), sessionService: service('session'), - - categories: A([]), - newCategory: '', - showCategoryModal: false, - hasCategories: computed('categories', function() { - return this.get('categories').length > 0; - }), - canSelectCategory: computed('categories', function() { - return (this.get('categories').length > 0 && this.get('permissions.documentEdit')); - }), - canAddCategory: computed('categories', function() { - return this.get('permissions.spaceOwner') || this.get('permissions.spaceManage'); - }), - - maxTags: 3, - tagz: A([]), - tagzModal: A([]), - newTag: '', + categoryService: service('category'), contributorMsg: '', approverMsg: '', @@ -91,67 +73,56 @@ export default Component.extend(ModalMixin, { didReceiveAttrs() { this._super(...arguments); - this.load(); + this.workflowStatus(); + this.popovers(); + this.load(); }, didInsertElement() { this._super(...arguments); - $('#document-tags-modal').on('show.bs.modal', (event) => { // eslint-disable-line no-unused-vars - schedule('afterRender', () => { - $("#add-tag-field").focus(); - - $("#add-tag-field").off("keydown").on("keydown", function(e) { - if (e.shiftKey) { - return false; - } - - if (e.which === 13 || e.which === 45 || e.which === 189 || e.which === 8 || e.which === 127 || (e.which >= 65 && e.which <= 90) || (e.which >= 97 && e.which <= 122) || (e.which >= 48 && e.which <= 57)) { - return true; - } - - return false; - }); - - // make copy of tags for editing - this.set('tagzEdit', this.get('tagz')); - }); - }); + this.popovers(); + this.renderTooltips(); }, - willDestroyElement() { + willDestroyElement() { this._super(...arguments); - $("#add-tag-field").off("keydown"); - }, - load() { - this.get('categoryService').getUserVisible(this.get('folder.id')).then((categories) => { - let cats = A(categories); - this.set('categories', cats); - this.get('categoryService').getDocumentCategories(this.get('document.id')).then((selected) => { - this.set('selectedCategories', selected); - selected.forEach((s) => { - let cat = cats.findBy('id', s.id); - if (is.not.undefined(cat)) { - cat.set('selected', true); - this.set('categories', cats); - } - }); - }); + $('#document-lifecycle-popover').popover('dispose'); + $('#document-protection-popover').popover('dispose'); + this.removeTooltips(); + }, + + popovers() { + let constants = this.get('constants'); + + $('#document-lifecycle-popover').popover('dispose'); + $('#document-protection-popover').popover('dispose'); + + $('#document-lifecycle-popover').popover({ + html: true, + title: 'Lifecycle', + content: "
Draft — restricted visiblity and not searchable
Live — document visible to all
Archived — not visible or searchable
", + placement: 'top' }); - let tagz = []; - if (!_.isUndefined(this.get('document.tags')) && this.get('document.tags').length > 1) { - let tags = this.get('document.tags').split('#'); - _.each(tags, function(tag) { - if (tag.length > 0) { - tagz.pushObject(tag); - } - }); - } + let ccMsg = `${this.changeControlMsg}
`; - this.set('tagz', A(tagz)); + if (this.get('document.protection') === constants.ProtectionType.Review) { + ccMsg += 'Select who can view documents within category
- {{ui/ui-list-picker items=categories nameField='category' singleSelect=false}} - {{/ui/ui-dialog}} - - -{{/if}} + diff --git a/gui/app/templates/components/document/settings-general.hbs b/gui/app/templates/components/document/settings-general.hbs new file mode 100644 index 00000000..131bdc35 --- /dev/null +++ b/gui/app/templates/components/document/settings-general.hbs @@ -0,0 +1,21 @@ +Set name, excerpt and lifecycle stage
+ + +Categorize your content, assign tags to suppliment
+ +Lowercase, characters, numbers, hyphens only
+ + + + +Categories allow you divide a space into logical chunks
+ + {{ui/ui-list-picker items=categories nameField='category' singleSelect=false}} + {{#unless selectedCategories}} +This space has no categories defined yet.
+ {{#if canAddCategory}} ++ {{#link-to 'folder.category' space.id space.slug class="btn btn-secondary font-weight-bold"}}Manage categories{{/link-to}} +
+ {{/if}} + {{/unless}} + + +