dataset-overview: comment out MAKE PUBLIC button

This commit is contained in:
gpapavgeri 2020-07-17 17:50:05 +03:00
parent 1dccfd834a
commit 4f3d71b48c
2 changed files with 25 additions and 25 deletions

View File

@ -109,12 +109,12 @@
<p class="mb-0 mr-0 pl-2 frame-txt" [matMenuTriggerFor]="exportMenu">
{{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }}</p>
</div>
<div *ngIf="!dataset.public && showPublishButton(dataset) && isUserOwner && dataset.dmp.isPublic" class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center" (click)="publish(dataset.id)">
<!-- <div *ngIf="!dataset.public && showPublishButton(dataset) && isUserOwner" class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center" (click)="publish(dataset.id)">
<button mat-mini-fab class="frame-btn">
<mat-icon class="mat-mini-fab-icon">public</mat-icon>
</button>
<p class="mb-0 pl-2 frame-txt">{{ 'DMP-LISTING.ACTIONS.MAKE-PUBLIC' | translate }}</p>
</div>
</div> -->
<mat-menu #exportMenu="matMenu" xPosition="before">
<button mat-menu-item (click)="downloadPDF(dataset.id)">
<i class="fa fa-file-pdf-o pr-2"></i>

View File

@ -444,29 +444,29 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
return this.isFinalizedDataset(dataset) && !dataset.public && this.hasPublishButton;
}
publish(id: String) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '500px',
restoreFocus: false,
data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PUBLISH-ITEM'),
privacyPolicyNames: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PRIVACY-POLICY-NAMES'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
isDeleteConfirmation: false
}
});
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) {
this.datasetService.publish(id)
.pipe(takeUntil(this._destroyed))
.subscribe(() => {
this.hasPublishButton = false;
this.reloadPage();
});
}
});
}
// publish(id: String) {
// const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
// maxWidth: '500px',
// restoreFocus: false,
// data: {
// message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PUBLISH-ITEM'),
// privacyPolicyNames: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PRIVACY-POLICY-NAMES'),
// confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
// cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
// isDeleteConfirmation: false
// }
// });
// dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
// if (result) {
// this.datasetService.publish(id)
// .pipe(takeUntil(this._destroyed))
// .subscribe(() => {
// this.hasPublishButton = false;
// this.reloadPage();
// });
// }
// });
// }
finalize(dataset: DatasetOverviewModel) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {