[ADF-2563] Improve versioning functionality (#3335)

* change input with textarea

* update file version use now the update content API

* provide way to test read only mode version list

* fix test

* test fix
This commit is contained in:
Eugenio Romano
2018-05-17 11:35:42 +01:00
committed by GitHub
parent 9772b2308a
commit 9e3a4aa49f
12 changed files with 58 additions and 52 deletions

View File

@@ -9,7 +9,8 @@
"ADF_VERSION_MANAGER": {
"ALLOW_DELETE": "Allow delete",
"SHOW_COMMENTS" : "Show comments on versions",
"ALLOW_DOWNLOAD" :"Enable version download"
"ALLOW_DOWNLOAD" :"Enable version download",
"READ_ONLY" : "Read only"
}
},
"title": "Welcome",

View File

@@ -1,7 +1,18 @@
<header mat-dialog-title>{{'VERSION.DIALOG.TITLE' | translate}}</header>
<section mat-dialog-content>
<section>
<mat-slide-toggle color="primary" [(ngModel)]="readOnly">
{{'APP.ADF_VERSION_MANAGER.READ_ONLY' | translate}}
</mat-slide-toggle>
</section>
<section mat-dialog-content *ngIf="!readOnly">
<adf-version-manager [node]="contentEntry" [allowDownload]="allowDownload" [showComments]="showComments" (uploadError)="uploadError($event)"></adf-version-manager>
</section>
<section mat-dialog-content *ngIf="readOnly">
<adf-version-list [node]="contentEntry" [showActions]="false" ></adf-version-list>
</section>
<footer mat-dialog-actions fxLayout="row" fxLayoutAlign="end center">
<button mat-button (click)="close()">{{'VERSION.DIALOG.CLOSE' | translate}}</button>
</footer>

View File

@@ -30,6 +30,7 @@ export class VersionManagerDialogAdapterComponent {
showComments = true;
allowDownload = true;
readOnly = false;
constructor(@Inject(MAT_DIALOG_DATA) data: any,
private snackBar: MatSnackBar,