-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathsettings-users-that-thrust-you.component.html
110 lines (101 loc) · 3.54 KB
/
settings-users-that-thrust-you.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<ng-container *ngIf="$usersThatThrustYou | async as usersThatThrustYou">
<h2
class="orc-font-body-large"
i18n="@@account.usersThatTrustYou"
id="cy-individuals-trust-you"
>
Users that trust you
</h2>
<div>
<p i18n="@@account.orcidUsersWhoHaveYou">
ORCID users who have made you an account delegate for their ORCID record.
</p>
</div>
<ng-container *ngIf="usersThatThrustYou.delegators?.length && this.isMobile">
<mat-divider></mat-divider>
<div *ngFor="let userThatThrustYou of usersThatThrustYou.delegators">
<div class="mobile-elements-container">
<div class="mobile-ements-text-container">
<strong i18n="@@account.name">Name</strong>
<div>{{ userThatThrustYou?.giverName?.value }}</div>
<strong i18n="@@account.orcidId">ORCID iD</strong>
<div>
<a
class="underline"
target="_blank"
rel="noreferrer noopener"
href="{{ baseUrl }}{{ userThatThrustYou.giverOrcid.path }}"
>{{ userThatThrustYou.giverOrcid.path }}</a
>
</div>
<strong i18n="@@account.accessGranted">Access granted</strong>
<div>
{{ userThatThrustYou?.approvalDate | monthDayYearDateToString }}
</div>
</div>
</div>
<mat-divider></mat-divider>
</div>
</ng-container>
<div class="table-container">
<table
*ngIf="usersThatThrustYou.delegators?.length && !this.isMobile"
mat-table
[dataSource]="usersThatThrustYou.delegators"
class="mat-elevation-z0"
>
<ng-container matColumnDef="trustedIndividuals">
<th mat-header-cell *matHeaderCellDef i18n="@@account.name">Name</th>
<td mat-cell *matCellDef="let element">
{{ element?.giverName?.value }}
</td>
</ng-container>
<ng-container matColumnDef="orcid">
<th mat-header-cell *matHeaderCellDef i18n="@@account.orcidId">
ORCID iD
</th>
<td mat-cell *matCellDef="let element">
<a
class="underline"
target="_blank"
rel="noreferrer noopener"
href="{{ baseUrl }}{{ element.giverOrcid.path }}"
>{{ element.giverOrcid.path }}</a
>
</td>
</ng-container>
<ng-container matColumnDef="granted">
<th mat-header-cell *matHeaderCellDef i18n="@@account.accessGranted">
Access granted
</th>
<td mat-cell *matCellDef="let element">
{{ element?.approvalDate | monthDayYearDateToString }}
</td>
</ng-container>
<ng-container matColumnDef="actions" stickyEnd>
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element">
<div class="actions-container orc-font-body-small">
<mat-icon class="warn pointer">block</mat-icon>
<a
class="underline warn"
(click)="revokeAccess(element)"
i18n="@@account.revokeAccess"
id="cy-revoke-own-access"
[routerLink]="trustedPartiesUrl"
>
Revoke access</a
>
</div>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
</div>
<p *ngIf="!usersThatThrustYou.delegators.length">
<i i18n="@@account.youHavenBeenAddAsTrusted">
You haven't been added as a trusted individual yet.
</i>
</p>
</ng-container>