From fd84ed317c7a1a4b5cb0b914ed6d439add0b2a14 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Mon, 3 Aug 2020 11:40:38 +0300 Subject: [PATCH] Adds public home page: /home --- .../app/ui/dashboard/dashboard.component.html | 92 +- .../app/ui/dashboard/dashboard.component.scss | 46 +- .../app/ui/dashboard/dashboard.component.ts | 16 +- .../recent-edited-activity.component.html | 17 +- .../recent-edited-activity.component.ts | 60 +- ...ent-edited-dataset-activity.component.html | 10 +- ...ecent-edited-dataset-activity.component.ts | 75 +- .../recent-edited-dmp-activity.component.html | 12 +- .../recent-edited-dmp-activity.component.ts | 71 +- .../listing/dataset-listing.component.html | 5 +- .../listing/dataset-listing.component.ts | 16 +- .../dataset-listing-item.component.html | 3 +- .../overview/dataset-overview.component.ts | 877 +++++++++--------- .../ui/dmp/listing/dmp-listing.component.html | 5 +- .../ui/dmp/listing/dmp-listing.component.ts | 21 +- .../dmp-listing-item.component.html | 3 +- .../dmp/overview/dmp-overview.component.html | 4 +- .../ui/dmp/overview/dmp-overview.component.ts | 9 +- .../src/app/ui/navbar/navbar.component.html | 14 +- dmp-frontend/src/styles.scss | 16 +- 20 files changed, 837 insertions(+), 535 deletions(-) diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html index defc195ae..364b36b23 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html @@ -1,9 +1,6 @@
-
+
@@ -32,10 +29,7 @@
-
+
@@ -92,15 +86,87 @@
+ + +
+
+
+
+

{{ 'ABOUT.WELCOME' | translate }}

+

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

+
+
+
+
+
+
+
+ clear +
+

{{'DASHBOARD.TITLE' | translate}}

+

{{'DASHBOARD.INFO-TEXT' | translate}}

+
+
+
+
{{'DASHBOARD.LATEST-ACTIVITY' | translate}}
+ + + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+
+ + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+
+ + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+ +
+
+
+
+
+ +
+
{{'DASHBOARD.PERSONAL-USAGE' | translate}}
+
+ {{dashboardStatisticsData?.totalDataManagementPlanCount}}
+ {{'DASHBOARD.PUBLIC-DMPS' | translate}} +
+ {{dashboardStatisticsData?.totalDataSetCount}}
+ {{'DASHBOARD.PUBLIC-DATASETS' | translate}} +
+ {{dashboardStatisticsData?.totalGrantCount}}
+ {{'DASHBOARD.GRANTS' | translate}} +
+ {{dashboardStatisticsData?.totalOrganisationCount}}
+ {{'DASHBOARD.RELATED-ORGANISATIONS' | translate}} +
+
+
+
+
+
+
- - - - - \ No newline at end of file +--> diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts index 4e8e20359..943bc71cd 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts @@ -119,8 +119,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { .pipe(takeUntil(this._destroyed)) .subscribe(data => { this.dmp = data; - this.checkLockStatus(this.dmp.id); - this.setIsUserOwner(); + // this.checkLockStatus(this.dmp.id); this.getAllVersions(this.dmp); const breadCrumbs = []; breadCrumbs.push({ parentComponentName: null, label: this.language.instant('NAV-BAR.PUBLIC-DMPS'), url: "/explore-plans" }); @@ -156,8 +155,10 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { } isUserAuthor(userId: string): boolean { - const principal: Principal = this.authentication.current(); - return userId === principal.id; + if (this.isAuthenticated()) { + const principal: Principal = this.authentication.current(); + return userId === principal.id; + } else return false; } editClicked(dmp: DmpOverviewModel) { diff --git a/dmp-frontend/src/app/ui/navbar/navbar.component.html b/dmp-frontend/src/app/ui/navbar/navbar.component.html index cbc48d156..5f7074c62 100644 --- a/dmp-frontend/src/app/ui/navbar/navbar.component.html +++ b/dmp-frontend/src/app/ui/navbar/navbar.component.html @@ -19,8 +19,7 @@ {{ 'FAQ.TITLE' | translate }} @@ -33,9 +32,7 @@