|
6 | 6 | </button> |
7 | 7 | <mat-menu #accountMenu="matMenu" xPosition="before"> |
8 | 8 | <div class="header-account-menu"> |
9 | | - <div class="user-info flex flex-row items-center space-x-2"> |
10 | | - <mat-icon |
11 | | - *ngIf="roles.includes('student'); else teacherAvatar" |
12 | | - i18n-aria-label |
13 | | - aria-label="Account avatar" |
14 | | - >account_circle</mat-icon |
| 9 | + @if (!roles.includes('surveyStudent')) { |
| 10 | + <div class="user-info flex flex-row items-center space-x-2"> |
| 11 | + <mat-icon |
| 12 | + *ngIf="roles.includes('student'); else teacherAvatar" |
| 13 | + i18n-aria-label |
| 14 | + aria-label="Account avatar" |
| 15 | + >account_circle</mat-icon |
| 16 | + > |
| 17 | + <ng-template #teacherAvatar> |
| 18 | + <mat-icon i18n-aria-label aria-label="Account avatar">account_box</mat-icon> |
| 19 | + </ng-template> |
| 20 | + <span>{{ firstName }} {{ lastName }}</span> |
| 21 | + </div> |
| 22 | + <div *ngIf="isPreviousAdmin" class="user-switch"> |
| 23 | + <a (click)="switchToOriginalUser()" i18n>Switch back to original user</a> |
| 24 | + </div> |
| 25 | + <mat-divider></mat-divider> |
| 26 | + <a |
| 27 | + *ngIf="roles.includes('student')" |
| 28 | + routerLinkActive="active" |
| 29 | + [routerLinkActiveOptions]="{ exact: true }" |
| 30 | + mat-menu-item |
| 31 | + routerLink="/student" |
15 | 32 | > |
16 | | - <ng-template #teacherAvatar> |
17 | | - <mat-icon i18n-aria-label aria-label="Account avatar">account_box</mat-icon> |
18 | | - </ng-template> |
19 | | - <span>{{ firstName }} {{ lastName }}</span> |
20 | | - </div> |
21 | | - <div *ngIf="isPreviousAdmin" class="user-switch"> |
22 | | - <a (click)="switchToOriginalUser()" i18n>Switch back to original user</a> |
23 | | - </div> |
24 | | - <mat-divider></mat-divider> |
25 | | - <a |
26 | | - *ngIf="roles.includes('student')" |
27 | | - routerLinkActive="active" |
28 | | - [routerLinkActiveOptions]="{ exact: true }" |
29 | | - mat-menu-item |
30 | | - routerLink="/student" |
31 | | - > |
32 | | - <mat-icon>home</mat-icon> |
33 | | - <span i18n>Student Home</span> |
34 | | - </a> |
35 | | - <a |
36 | | - *ngIf="roles.includes('teacher')" |
37 | | - mat-menu-item |
38 | | - routerLink="/teacher" |
39 | | - routerLinkActive="active" |
40 | | - [routerLinkActiveOptions]="{ exact: true }" |
41 | | - > |
42 | | - <mat-icon>home</mat-icon> |
43 | | - <span i18n>Teacher Home</span> |
44 | | - </a> |
45 | | - <a |
46 | | - *ngIf="roles.includes('student')" |
47 | | - mat-menu-item |
48 | | - routerLink="/student/profile/edit" |
49 | | - routerLinkActive="active" |
50 | | - [routerLinkActiveOptions]="{ exact: true }" |
51 | | - > |
52 | | - <mat-icon>edit</mat-icon> |
53 | | - <span i18n>Edit Profile</span> |
54 | | - </a> |
55 | | - <a |
56 | | - *ngIf="roles.includes('teacher')" |
57 | | - mat-menu-item |
58 | | - routerLink="/teacher/profile/edit" |
59 | | - routerLinkActive="active" |
60 | | - [routerLinkActiveOptions]="{ exact: true }" |
61 | | - > |
62 | | - <mat-icon>edit</mat-icon> |
63 | | - <span i18n>Edit Profile</span> |
64 | | - </a> |
65 | | - <a *ngIf="roles.includes('researcher')" mat-menu-item (click)="switchToAdmin()"> |
66 | | - <mat-icon>settings</mat-icon> |
67 | | - <span i18n>Researcher Tools</span> |
68 | | - </a> |
69 | | - <a *ngIf="roles.includes('admin')" mat-menu-item (click)="switchToAdmin()"> |
70 | | - <mat-icon>settings</mat-icon> |
71 | | - <span i18n>Admin Tools</span> |
72 | | - </a> |
73 | | - <a |
74 | | - mat-menu-item |
75 | | - routerLink="/help" |
76 | | - routerLinkActive="active" |
77 | | - [routerLinkActiveOptions]="{ exact: true }" |
78 | | - > |
79 | | - <mat-icon>help</mat-icon> |
80 | | - <span i18n>Help</span> |
81 | | - </a> |
82 | | - <mat-divider></mat-divider> |
| 33 | + <mat-icon>home</mat-icon> |
| 34 | + <span i18n>Student Home</span> |
| 35 | + </a> |
| 36 | + <a |
| 37 | + *ngIf="roles.includes('teacher')" |
| 38 | + mat-menu-item |
| 39 | + routerLink="/teacher" |
| 40 | + routerLinkActive="active" |
| 41 | + [routerLinkActiveOptions]="{ exact: true }" |
| 42 | + > |
| 43 | + <mat-icon>home</mat-icon> |
| 44 | + <span i18n>Teacher Home</span> |
| 45 | + </a> |
| 46 | + <a |
| 47 | + *ngIf="roles.includes('student')" |
| 48 | + mat-menu-item |
| 49 | + routerLink="/student/profile/edit" |
| 50 | + routerLinkActive="active" |
| 51 | + [routerLinkActiveOptions]="{ exact: true }" |
| 52 | + > |
| 53 | + <mat-icon>edit</mat-icon> |
| 54 | + <span i18n>Edit Profile</span> |
| 55 | + </a> |
| 56 | + <a |
| 57 | + *ngIf="roles.includes('teacher')" |
| 58 | + mat-menu-item |
| 59 | + routerLink="/teacher/profile/edit" |
| 60 | + routerLinkActive="active" |
| 61 | + [routerLinkActiveOptions]="{ exact: true }" |
| 62 | + > |
| 63 | + <mat-icon>edit</mat-icon> |
| 64 | + <span i18n>Edit Profile</span> |
| 65 | + </a> |
| 66 | + <a *ngIf="roles.includes('researcher')" mat-menu-item (click)="switchToAdmin()"> |
| 67 | + <mat-icon>settings</mat-icon> |
| 68 | + <span i18n>Researcher Tools</span> |
| 69 | + </a> |
| 70 | + <a *ngIf="roles.includes('admin')" mat-menu-item (click)="switchToAdmin()"> |
| 71 | + <mat-icon>settings</mat-icon> |
| 72 | + <span i18n>Admin Tools</span> |
| 73 | + </a> |
| 74 | + <a |
| 75 | + mat-menu-item |
| 76 | + routerLink="/help" |
| 77 | + routerLinkActive="active" |
| 78 | + [routerLinkActiveOptions]="{ exact: true }" |
| 79 | + > |
| 80 | + <mat-icon>help</mat-icon> |
| 81 | + <span i18n>Help</span> |
| 82 | + </a> |
| 83 | + <mat-divider></mat-divider> |
| 84 | + } |
83 | 85 | <a mat-menu-item (click)="logOut()"> |
84 | 86 | <mat-icon color="warn">exit_to_app</mat-icon> |
85 | 87 | <span class="warn" i18n>Sign Out</span> |
|
0 commit comments