From 302a22e20acfa7eebe2c4eecac1a0552a4021cf0 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Fri, 20 Sep 2019 13:54:37 +0300 Subject: [PATCH] Fixes home page redirect bug and links of 'VIEW ALL' button - (Issue #161) --- .../app/ui/dashboard/dashboard.component.html | 35 ++++++------------- .../app/ui/dashboard/dashboard.component.ts | 6 +++- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html index de1c123b3..7eec343f1 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html @@ -8,37 +8,27 @@
- +
- +
- +
- +
- +
- +
@@ -56,21 +46,16 @@
- +
- +
- +
- +
diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts b/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts index c489236cf..7d7a429f4 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts @@ -162,7 +162,11 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC } dmpClicked(dmp: DmpListingModel) { - this.router.navigate(['/plans/publicEdit/' + dmp.id]); + if (!this.isAuthenticated()) { + this.router.navigate(['../explore-plans/overview', dmp.id], { relativeTo: this.route }); + } else { + this.router.navigate(['/plans/publicEdit/' + dmp.id]); + } } datasetClicked(dataset: DatasetListingModel) {