preview versions (#285)

This commit is contained in:
Cilibiu Bogdan 2018-04-05 21:11:52 +03:00 committed by Denys Vuika
parent b1d093fd48
commit a73d3597a4
6 changed files with 23 additions and 9 deletions

View File

@ -196,7 +196,7 @@
</adf-content-metadata-card>
</adf-info-drawer-tab>
<adf-info-drawer-tab label="Versions">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.TABS.VERSIONS' | translate">
<ng-container *ngIf="infoInstance.node?.isFile;else choose_document_template">
<ng-container *ngIf="permission.check(infoInstance.node, ['update']);else no_permission_to_versions">
<adf-version-manager [node]="infoInstance.node"></adf-version-manager>

View File

@ -200,7 +200,7 @@
</adf-content-metadata-card>
</adf-info-drawer-tab>
<adf-info-drawer-tab label="Versions">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.TABS.VERSIONS' | translate">
<ng-container *ngIf="isFileSelected(documentList.selection);else choose_document_template">
<ng-container *ngIf="canManageVersions(documentList.selection); else no_permission_to_versions">
<adf-version-manager *ngIf="infoInstance.node"

View File

@ -10,6 +10,19 @@
[node]="node">
</adf-content-metadata-card>
</adf-info-drawer-tab>
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.TABS.VERSIONS' | translate">
<ng-container *ngIf="permission.check(node, ['update']);else no_permission_to_versions">
<adf-version-manager [node]="node"></adf-version-manager>
</ng-container>
<ng-template #no_permission_to_versions>
<div class="adf-manage-versions-no-permission">
<mat-icon class="adf-manage-versions-no-permission-icon">warning</mat-icon>
{{ 'VERSION.SELECTION.NO_PERMISSION' | translate }}
</div>
</ng-template>
</adf-info-drawer-tab>
</adf-info-drawer>
</ng-template>

View File

@ -171,8 +171,8 @@
(changed)="toggleSidebar($event)"
#infoInstance=nodeInfo>
<adf-info-drawer title="Details">
<adf-info-drawer-tab label="Properties">
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.TABS.PROPERTIES' | translate">
<div *ngIf="infoInstance.loading">
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div>
@ -185,7 +185,7 @@
</adf-content-metadata-card>
</adf-info-drawer-tab>
<adf-info-drawer-tab label="Versions">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.TABS.VERSIONS' | translate">
<ng-container *ngIf="isFileSelected(documentList.selection);else choose_document_template">
<ng-container *ngIf="canManageVersions(documentList.selection); else no_permission_to_versions">
<adf-version-manager *ngIf="infoInstance.node"

View File

@ -188,8 +188,8 @@
(changed)="toggleSidebar($event)"
#infoInstance=nodeInfo>
<adf-info-drawer title="Details">
<adf-info-drawer-tab label="Properties">
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.TABS.PROPERTIES' | translate">
<div *ngIf="infoInstance.loading">
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div>
@ -202,7 +202,7 @@
</adf-content-metadata-card>
</adf-info-drawer-tab>
<adf-info-drawer-tab label="Versions">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.TABS.VERSIONS' | translate">
<ng-container *ngIf="isFileSelected(documentList.selection);else choose_document_template">
<ng-container *ngIf="permission.check(documentList.selection[0], ['update']); else no_permission_to_versions">
<adf-version-manager *ngIf="infoInstance.node"

View File

@ -193,7 +193,8 @@
"INFO_DRAWER": {
"TITLE": "Details",
"TABS": {
"PROPERTIES": "Properties"
"PROPERTIES": "Properties",
"VERSIONS": "Versions"
}
}
},