[ACA-1523] Shared - file version manager (#486)

* workaround shared isFile

* revert commented
This commit is contained in:
Cilibiu Bogdan
2018-07-04 18:49:32 +03:00
committed by Denys Vuika
parent 7c66750edc
commit cdfcccff3c
2 changed files with 6 additions and 3 deletions

View File

@@ -80,8 +80,8 @@
<button
mat-menu-item
*ngIf="selection.count === 1 && permission.check(selection.nodes, ['update'], { target: 'allowableOperationsOnTarget' })"
[acaNodeVersions]="selection.nodes">
*ngIf="selection.file && permission.check(selection.file, ['update'], { target: 'allowableOperationsOnTarget' })"
[acaNodeVersions]="selection.file">
<mat-icon>history</mat-icon>
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>
</button>

View File

@@ -152,7 +152,10 @@ function updateSelectedNodes(
last = nodes[nodes.length - 1];
if (nodes.length === 1) {
file = nodes.find(entity => entity.entry.isFile);
file = nodes.find(entity => {
// workaround Shared
return entity.entry.isFile || entity.entry.nodeId;
});
folder = nodes.find(entity => entity.entry.isFolder);
}
}