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"> <p class="mb-0 mr-0 pl-2 frame-txt" [matMenuTriggerFor]="exportMenu">
{{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }}</p> {{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }}</p>
</div> </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"> <button mat-mini-fab class="frame-btn">
<mat-icon class="mat-mini-fab-icon">public</mat-icon> <mat-icon class="mat-mini-fab-icon">public</mat-icon>
</button> </button>
<p class="mb-0 pl-2 frame-txt">{{ 'DMP-LISTING.ACTIONS.MAKE-PUBLIC' | translate }}</p> <p class="mb-0 pl-2 frame-txt">{{ 'DMP-LISTING.ACTIONS.MAKE-PUBLIC' | translate }}</p>
</div> </div> -->
<mat-menu #exportMenu="matMenu" xPosition="before"> <mat-menu #exportMenu="matMenu" xPosition="before">
<button mat-menu-item (click)="downloadPDF(dataset.id)"> <button mat-menu-item (click)="downloadPDF(dataset.id)">
<i class="fa fa-file-pdf-o pr-2"></i> <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; return this.isFinalizedDataset(dataset) && !dataset.public && this.hasPublishButton;
} }
publish(id: String) { // publish(id: String) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { // const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '500px', // maxWidth: '500px',
restoreFocus: false, // restoreFocus: false,
data: { // data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PUBLISH-ITEM'), // message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PUBLISH-ITEM'),
privacyPolicyNames: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PRIVACY-POLICY-NAMES'), // privacyPolicyNames: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PRIVACY-POLICY-NAMES'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'), // confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'), // cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
isDeleteConfirmation: false // isDeleteConfirmation: false
} // }
}); // });
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => { // dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) { // if (result) {
this.datasetService.publish(id) // this.datasetService.publish(id)
.pipe(takeUntil(this._destroyed)) // .pipe(takeUntil(this._destroyed))
.subscribe(() => { // .subscribe(() => {
this.hasPublishButton = false; // this.hasPublishButton = false;
this.reloadPage(); // this.reloadPage();
}); // });
} // }
}); // });
} // }
finalize(dataset: DatasetOverviewModel) { finalize(dataset: DatasetOverviewModel) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {