+
+
+

{{ 'ABOUT.WELCOME' | translate }}

+

{{ 'ABOUT.WELCOME-MESSAGE' | translate }}

+
+
+
-
+

{{'DASHBOARD.DATASETS' | translate}} {{titlePrefix}}

-
+
@@ -15,11 +21,11 @@
- +
- +
diff --git a/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.scss b/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.scss index 194373976..e69441181 100644 --- a/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.scss +++ b/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.scss @@ -11,6 +11,28 @@ } } +.header-image { + background: url("/assets/images/new-dashboard-bg.png") no-repeat; + background-size: cover; + margin-top: 70px; + min-height: 15em; + position: relative; + } + + .header-text-container { + background: rgba(255, 255, 255, 0.7); + position: absolute; + bottom: 0px; + padding-left: 5em; + padding-right: 10em; + padding-top: 2em; + padding-bottom: 2em; + } + + .explore-dmp-content { + padding: 30px 15px; + } + ::ng-deep .mat-paginator-container { flex-direction: row-reverse !important; justify-content: space-between !important; diff --git a/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.ts b/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.ts index 5c433745b..b726c510e 100644 --- a/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.ts +++ b/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.ts @@ -17,6 +17,8 @@ import { TranslateService } from '@ngx-translate/core'; import { Observable, of as observableOf } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { ExternalTagEditorModel } from '../dataset-wizard/dataset-wizard-editor.model'; +import { AuthService } from '@app/core/services/auth/auth.service'; +import { isNullOrUndefined } from 'util'; @Component({ selector: 'app-dataset-listing-component', @@ -38,17 +40,24 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB dmpSearchEnabled = true; listingItems: DatasetListingModel[] = []; + isPublic: boolean = false; + constructor( private datasetService: DatasetService, private router: Router, private route: ActivatedRoute, private dmpService: DmpService, private language: TranslateService, + private authService: AuthService ) { super(); } ngOnInit() { + this.isPublic = this.router.url === '/explore'; + if (!this.isPublic && isNullOrUndefined(this.authService.current())) { + this.router.navigateByUrl("/explore"); + } this.route.params .pipe(takeUntil(this._destroyed)) .subscribe(async (params: Params) => { @@ -78,7 +87,7 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB this.breadCrumbs = observableOf([{ parentComponentName: null, label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS'), - url: "/datasets" + url: this.isPublic ? "/explore" : "/datasets" }]); } @@ -126,6 +135,13 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB if (value.datasetTemplates) { request.criteria.datasetTemplates = value.datasetTemplates.map(x => x.id) } + if(value.grantStatus) { + request.criteria.grantStatus = value.grantStatus; + } + request.criteria.isPublic = this.isPublic; + if (this.isPublic) { + request.criteria.allVersions = true; + } // if (this.itemId) { // // request.criteria.groupIds = [this.itemId]; // request.criteria.allVersions = true; diff --git a/dmp-frontend/src/app/ui/dataset/listing/listing-item/dataset-listing-item.component.html b/dmp-frontend/src/app/ui/dataset/listing/listing-item/dataset-listing-item.component.html index d8fc539e5..eea41275e 100644 --- a/dmp-frontend/src/app/ui/dataset/listing/listing-item/dataset-listing-item.component.html +++ b/dmp-frontend/src/app/ui/dataset/listing/listing-item/dataset-listing-item.component.html @@ -1,5 +1,5 @@