Fixes home page redirect bug and links of 'VIEW ALL' button - (Issue #161)

This commit is contained in:
apapachristou 2019-09-20 13:54:37 +03:00
parent e853c8c44a
commit 302a22e20a
2 changed files with 15 additions and 26 deletions

View File

@ -8,37 +8,27 @@
<div *ngIf="this.isAuthenticated()" class="container-fluid">
<div class="row" *ngIf="this.isAuthenticated()">
<div class="col-sm-6 col-md-6 col-lg-6">
<app-wizard title="{{'QUICKWIZARD.CREATE-ADD.CREATE.TITLE' | translate}}"
subtitle="{{'QUICKWIZARD.CREATE-ADD.CREATE.SUBTITLE' | translate}}" routerLink="/quick-wizard" icon="play_circle_outline">
<app-wizard title="{{'QUICKWIZARD.CREATE-ADD.CREATE.TITLE' | translate}}" subtitle="{{'QUICKWIZARD.CREATE-ADD.CREATE.SUBTITLE' | translate}}" routerLink="/quick-wizard" icon="play_circle_outline">
</app-wizard>
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
<app-wizard title="{{'QUICKWIZARD.CREATE-ADD.ADD.TITLE' | translate}}"
subtitle="{{'QUICKWIZARD.CREATE-ADD.ADD.SUBTITLE' | translate}}" routerLink="/datasetcreatewizard"
icon="play_circle_outline"></app-wizard>
<app-wizard title="{{'QUICKWIZARD.CREATE-ADD.ADD.TITLE' | translate}}" subtitle="{{'QUICKWIZARD.CREATE-ADD.ADD.SUBTITLE' | translate}}" routerLink="/datasetcreatewizard" icon="play_circle_outline"></app-wizard>
</div>
</div>
<div class="row">
<div class="col-md-9">
<div class="row">
<div class="col-lg-3 col-md-6 col-sm-6">
<app-info-counter [title]="'DASHBOARD.MY-DMPS'"
[subtitle]="dashboardStatisticsData?.totalDataManagementPlanCount" routerLink='/plans'
buttonRedirectLink="/plans/new" icon="view_agenda"></app-info-counter>
<app-info-counter [title]="'DASHBOARD.MY-DMPS'" [subtitle]="dashboardStatisticsData?.totalDataManagementPlanCount" routerLink='/plans' buttonRedirectLink="/plans/new" icon="view_agenda"></app-info-counter>
</div>
<div class="col-lg-3 col-md-6 col-sm-6">
<app-info-counter [title]="'DASHBOARD.MY-DATASETS'"
[subtitle]="dashboardStatisticsData?.totalDataSetCount" routerLink='/datasets'
buttonRedirectLink="/datasets/new" icon="library_books"></app-info-counter>
<app-info-counter [title]="'DASHBOARD.MY-DATASETS'" [subtitle]="dashboardStatisticsData?.totalDataSetCount" routerLink='/datasets' buttonRedirectLink="/datasets/new" icon="library_books"></app-info-counter>
</div>
<div class="col-lg-3 col-md-6 col-sm-6">
<app-info-counter [title]="'DASHBOARD.MY-GRANTS'"
[subtitle]="dashboardStatisticsData?.totalGrantCount" routerLink='/grants'
buttonRedirectLink="/grants/new" icon="work_outline"></app-info-counter>
<app-info-counter [title]="'DASHBOARD.MY-GRANTS'" [subtitle]="dashboardStatisticsData?.totalGrantCount" routerLink='/grants' buttonRedirectLink="/grants/new" icon="work_outline"></app-info-counter>
</div>
<div class="col-lg-3 col-md-6 col-sm-6">
<app-info-counter [title]="'DASHBOARD.ORGANIZATIONS'"
[subtitle]="dashboardStatisticsData?.totalOrganisationCount" icon="scatter_plot">
<app-info-counter [title]="'DASHBOARD.ORGANIZATIONS'" [subtitle]="dashboardStatisticsData?.totalOrganisationCount" icon="scatter_plot">
</app-info-counter>
</div>
</div>
@ -56,21 +46,16 @@
<div *ngIf="!this.isAuthenticated()" class="container-fluid">
<div class="row non-auth-stats">
<div class="col-lg-3 col-md-6 col-sm-6">
<app-info-counter [title]="'DASHBOARD.DMPS'"
[subtitle]="dashboardStatisticsData?.totalDataManagementPlanCount" routerLink='/plans'
buttonRedirectLink="/plans/new" icon="view_agenda"></app-info-counter>
<app-info-counter [title]="'DASHBOARD.DMPS'" [subtitle]="dashboardStatisticsData?.totalDataManagementPlanCount" routerLink='/explore-plans' buttonRedirectLink="/plans/new" icon="view_agenda"></app-info-counter>
</div>
<div class="col-lg-3 col-md-6 col-sm-6">
<app-info-counter [title]="'DASHBOARD.DATASETS'" [subtitle]="dashboardStatisticsData?.totalDataSetCount"
routerLink='/datasets' buttonRedirectLink="/datasets/new" icon="library_books"></app-info-counter>
<app-info-counter [title]="'DASHBOARD.DATASETS'" [subtitle]="dashboardStatisticsData?.totalDataSetCount" routerLink='/explore' buttonRedirectLink="/datasets/new" icon="library_books"></app-info-counter>
</div>
<div class="col-lg-3 col-md-6 col-sm-6">
<app-info-counter [title]="'DASHBOARD.GRANTS'" [subtitle]="dashboardStatisticsData?.totalGrantCount"
routerLink='/grants' buttonRedirectLink="/grants/new" icon="work_outline"></app-info-counter>
<app-info-counter [title]="'DASHBOARD.GRANTS'" [subtitle]="dashboardStatisticsData?.totalGrantCount" buttonRedirectLink="/grants/new" icon="work_outline"></app-info-counter>
</div>
<div class="col-lg-3 col-md-6 col-sm-6">
<app-info-counter title="Related Organizations"
[subtitle]="dashboardStatisticsData?.totalOrganisationCount" icon="scatter_plot"></app-info-counter>
<app-info-counter title="Related Organizations" [subtitle]="dashboardStatisticsData?.totalOrganisationCount" icon="scatter_plot"></app-info-counter>
</div>
</div>
<div class="d-flex flex-column align-items-center non-auth-title-container">

View File

@ -162,8 +162,12 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC
}
dmpClicked(dmp: DmpListingModel) {
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) {
this.router.navigate(['/datasets/publicEdit/' + dataset.id]);