1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 07:09:43 +02:00

Detect and hide empty doc toolbar

This commit is contained in:
Harvey Kandola 2019-01-13 09:39:42 +00:00
parent c1d796e6bc
commit ca213ba5d1
3 changed files with 815 additions and 806 deletions

View file

@ -41,6 +41,13 @@ export default Component.extend(ModalMixin, AuthMixin, Notifier, {
return false;
}),
hasToolbar: computed('permissions', 'showRevisions', 'showActivity', function() {
if (this.get('showRevisions') || this.get('showActivity')) return true;
if (this.get('permissions.documentAdd') || this.get('permissions.documentDelete')) return true;
if (this.get('appMeta.edition') === this.get('constants').Product.EnterpriseEdition &&
this.get('permissions.documentEdit')) return true;
}),
init() {
this._super(...arguments);
@ -149,7 +156,7 @@ export default Component.extend(ModalMixin, AuthMixin, Notifier, {
onExport() {
let spec = {
spaceId: this.get('document.folderId'),
spaceId: this.get('document.spaceId'),
data: [],
filterType: 'document',
};