Adds: Links on buttons VIEW ALL, Translates: Buttons VIEW ALL
This commit is contained in:
parent
6890cd2799
commit
0e09d661d4
|
@ -1,9 +0,0 @@
|
||||||
.view-all {
|
|
||||||
cursor: pointer;
|
|
||||||
color: rgb(106, 164, 217);
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.view-all:hover {
|
|
||||||
color: rgb(46, 117, 182);
|
|
||||||
}
|
|
|
@ -10,7 +10,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<div class="stats">
|
<div class="stats">
|
||||||
<div class="view-all" [class.clickable]="isAuthenticated()" (click)="navigateToUrl()">VIEW ALL</div>
|
<div class="view-all" [class.clickable]="isAuthenticated()" (click)="navigateToUrl()">{{ 'GENERAL.ACTIONS.VIEW-ALL' | translate}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,3 +19,4 @@ th {
|
||||||
border-radius: 10em;
|
border-radius: 10em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{ 'RECENT-ACTIVITY.LICENSE' | translate}}
|
{{ 'RECENT-ACTIVITY.LICENSE' | translate}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" class="view-all">{{ 'GENERAL.ACTIONS.VIEW-ALL' | translate }}</a>
|
<div class="view-all" [class.clickable]="isAuthenticated()" (click)="navigateToUrl()">{{ 'GENERAL.ACTIONS.VIEW-ALL' | translate}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body table-responsive">
|
<div class="card-body table-responsive">
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<th></th>
|
<th></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody *ngIf="dmpActivities != null">
|
<tbody *ngIf="dmpActivities != null">
|
||||||
<tr *ngFor="let activity of dmpActivities">
|
<tr (click)="redirect(activity.id, recentActivityTypeEnum.Dmp)" *ngFor="let activity of dmpActivities" style="cursor: pointer;">
|
||||||
<td>{{ activity.label }}</td>
|
<td>{{ activity.label }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="template-name">
|
<div class="template-name">
|
||||||
|
|
|
@ -5,6 +5,8 @@ import { AuthService } from '../../../core/services/auth/auth.service';
|
||||||
import { DataTableRequest } from '../../../core/model/data-table/data-table-request';
|
import { DataTableRequest } from '../../../core/model/data-table/data-table-request';
|
||||||
import { DmpCriteria } from '../../../core/query/dmp/dmp-criteria';
|
import { DmpCriteria } from '../../../core/query/dmp/dmp-criteria';
|
||||||
import { DmpService } from '../../../core/services/dmp/dmp.service';
|
import { DmpService } from '../../../core/services/dmp/dmp.service';
|
||||||
|
import { RecentActivityType } from '../../../core/common/enum/recent-activity-type';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-recent-edited-activity',
|
selector: 'app-recent-edited-activity',
|
||||||
|
@ -13,8 +15,10 @@ import { DmpService } from '../../../core/services/dmp/dmp.service';
|
||||||
})
|
})
|
||||||
export class RecentEditedActivityComponent implements OnInit {
|
export class RecentEditedActivityComponent implements OnInit {
|
||||||
dmpActivities: DmpListingModel[];
|
dmpActivities: DmpListingModel[];
|
||||||
|
recentActivityTypeEnum = RecentActivityType;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
private router: Router,
|
||||||
public enumUtils: EnumUtils,
|
public enumUtils: EnumUtils,
|
||||||
private authentication: AuthService,
|
private authentication: AuthService,
|
||||||
private dmpService: DmpService
|
private dmpService: DmpService
|
||||||
|
@ -38,4 +42,24 @@ export class RecentEditedActivityComponent implements OnInit {
|
||||||
return !!this.authentication.current();
|
return !!this.authentication.current();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
redirect(id: string, type: RecentActivityType) {
|
||||||
|
switch (type) {
|
||||||
|
case RecentActivityType.Project: {
|
||||||
|
this.router.navigate(["projects/edit/" + id]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
case RecentActivityType.Dataset: {
|
||||||
|
this.router.navigate(["datasets/edit/" + id]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
case RecentActivityType.Dmp: {
|
||||||
|
this.router.navigate(["plans/edit/" + id]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw new Error("Unsupported Activity Type ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
navigateToUrl() { }
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
{{ 'RECENT-ACTIVITY.LICENSE' | translate}}
|
{{ 'RECENT-ACTIVITY.LICENSE' | translate}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" class="view-all">{{ 'GENERAL.ACTIONS.VIEW-ALL' | translate }}</a>
|
<div class="view-all" [class.clickable]="isAuthenticated()" (click)="navigateToUrl()">
|
||||||
|
{{ 'GENERAL.ACTIONS.VIEW-ALL' | translate}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body table-responsive">
|
<div class="card-body table-responsive">
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
|
@ -23,8 +24,7 @@
|
||||||
<th></th>
|
<th></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody *ngIf="dmpActivities != null">
|
<tbody *ngIf="dmpActivities != null">
|
||||||
<tr (click)="redirect(activity.id, recentActivityTypeEnum.Dmp)" *ngFor="let activity of dmpActivities"
|
<tr (click)="redirect(activity.id, recentActivityTypeEnum.Dmp)" *ngFor="let activity of dmpActivities" style="cursor: pointer;">
|
||||||
style="cursor: pointer;">
|
|
||||||
<td>{{ activity.label }}</td>
|
<td>{{ activity.label }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="template-name">
|
<div class="template-name">
|
||||||
|
|
|
@ -68,4 +68,6 @@ export class RecentVisitedActivityComponent extends BaseComponent
|
||||||
public isAuthenticated(): boolean {
|
public isAuthenticated(): boolean {
|
||||||
return !!this.authentication.current();
|
return !!this.authentication.current();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
navigateToUrl() { }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue