|
3 | 3 | <div class="col-12"> |
4 | 4 |
|
5 | 5 | @if (activeEPerson$ | async) { |
6 | | - <h1 class="border-bottom pb-2">{{messagePrefix + '.edit' | translate}}</h1> |
| 6 | + <h1 class="border-bottom pb-2">{{messagePrefix + '.edit' | translate}}</h1> |
7 | 7 | } @else { |
8 | | - <h1 class="border-bottom pb-2">{{messagePrefix + '.create' | translate}}</h1> |
| 8 | + <h1 class="border-bottom pb-2">{{messagePrefix + '.create' | translate}}</h1> |
9 | 9 | } |
10 | 10 |
|
11 | 11 |
|
12 | 12 |
|
13 | | - <ds-form [formId]="formId" |
14 | | - [formModel]="formModel" |
15 | | - [formGroup]="formGroup" |
16 | | - [formLayout]="formLayout" |
17 | | - [displayCancel]="false" |
18 | | - [submitLabel]="submitLabel" |
19 | | - (submitForm)="onSubmit()"> |
| 13 | + <ds-form [formId]="formId" [formModel]="formModel" [formGroup]="formGroup" [formLayout]="formLayout" |
| 14 | + [displayCancel]="false" [submitLabel]="submitLabel" (submitForm)="onSubmit()"> |
20 | 15 | <div before class="btn-group"> |
21 | 16 | <button (click)="onCancel()" type="button" class="btn btn-outline-secondary"> |
22 | 17 | <i class="fas fa-arrow-left"></i> {{messagePrefix + '.return' | translate}} |
23 | 18 | </button> |
24 | 19 | </div> |
25 | 20 | @if (displayResetPassword) { |
26 | | - <div between class="btn-group"> |
27 | | - <button class="btn btn-primary" [dsBtnDisabled]="(canReset$ | async) !== true" type="button" (click)="resetPassword()"> |
28 | | - <i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}} |
29 | | - </button> |
30 | | - </div> |
| 21 | + <div between class="btn-group"> |
| 22 | + <button class="btn btn-primary" [dsBtnDisabled]="(canReset$ | async) !== true" type="button" |
| 23 | + (click)="resetPassword()"> |
| 24 | + <i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}} |
| 25 | + </button> |
| 26 | + </div> |
31 | 27 | } |
32 | 28 | @if (canImpersonate$ | async) { |
33 | | - <div between class="btn-group ms-1"> |
34 | | - @if (!isImpersonated) { |
35 | | - <button class="btn btn-primary" type="button" (click)="impersonate()"> |
36 | | - <i class="fa fa-user-secret"></i> {{'admin.access-control.epeople.actions.impersonate' | translate}} |
37 | | - </button> |
38 | | - } |
39 | | - @if (isImpersonated) { |
40 | | - <button class="btn btn-primary" type="button" (click)="stopImpersonating()"> |
41 | | - <i class="fa fa-user-secret"></i> {{'admin.access-control.epeople.actions.stop-impersonating' | translate}} |
42 | | - </button> |
43 | | - } |
44 | | - </div> |
| 29 | + <div between class="btn-group ms-1"> |
| 30 | + @if (!isImpersonated) { |
| 31 | + <button class="btn btn-primary" type="button" (click)="impersonate()"> |
| 32 | + <i class="fa fa-user-secret"></i> {{'admin.access-control.epeople.actions.impersonate' | translate}} |
| 33 | + </button> |
| 34 | + } |
| 35 | + @if (isImpersonated) { |
| 36 | + <button class="btn btn-primary" type="button" (click)="stopImpersonating()"> |
| 37 | + <i class="fa fa-user-secret"></i> {{'admin.access-control.epeople.actions.stop-impersonating' | translate}} |
| 38 | + </button> |
| 39 | + } |
| 40 | + </div> |
45 | 41 | } |
46 | 42 | @if (canDelete$ | async) { |
47 | | - <button after class="btn btn-danger delete-button" type="button" (click)="delete()"> |
48 | | - <i class="fas fa-trash"></i> {{'admin.access-control.epeople.actions.delete' | translate}} |
49 | | - </button> |
| 43 | + <button after class="btn btn-danger delete-button" type="button" (click)="delete()"> |
| 44 | + <i class="fas fa-trash"></i> {{'admin.access-control.epeople.actions.delete' | translate}} |
| 45 | + </button> |
50 | 46 | } |
51 | 47 | </ds-form> |
52 | 48 |
|
53 | 49 | @if (!formGroup) { |
54 | | - <ds-loading [showMessage]="false"></ds-loading> |
| 50 | + <ds-loading [showMessage]="false"></ds-loading> |
55 | 51 | } |
56 | 52 |
|
57 | 53 | @if (activeEPerson$ | async) { |
58 | | - <div> |
59 | | - <h2>{{messagePrefix + '.groupsEPersonIsMemberOf' | translate}}</h2> |
60 | | - @if (groups$ | async | dsHasNoValue) { |
61 | | - <ds-loading [showMessage]="false"></ds-loading> |
62 | | - } |
63 | | - @if ((groups$ | async)?.payload?.totalElements > 0) { |
64 | | - <ds-pagination |
65 | | - [paginationOptions]="config" |
66 | | - [collectionSize]="(groups$ | async)?.payload?.totalElements" |
67 | | - [hideGear]="true" |
68 | | - [hidePagerWhenSinglePage]="true" |
69 | | - (pageChange)="onPageChange($event)"> |
70 | | - <div class="table-responsive"> |
71 | | - <table id="groups" class="table table-striped table-hover table-bordered"> |
72 | | - <thead> |
73 | | - <tr> |
74 | | - <th scope="col" class="align-middle">{{messagePrefix + '.table.id' | translate}}</th> |
75 | | - <th scope="col" class="align-middle">{{messagePrefix + '.table.name' | translate}}</th> |
76 | | - <th scope="col" class="align-middle">{{messagePrefix + '.table.collectionOrCommunity' | translate}}</th> |
77 | | - </tr> |
78 | | - </thead> |
79 | | - <tbody> |
80 | | - @for (group of (groups$ | async)?.payload?.page; track group) { |
81 | | - <tr> |
82 | | - <td class="align-middle">{{group.id}}</td> |
83 | | - <td class="align-middle"> |
84 | | - <a (click)="groupsDataService.startEditingNewGroup(group)" |
85 | | - [routerLink]="[groupsDataService.getGroupEditPageRouterLink(group)]"> |
86 | | - {{ dsoNameService.getName(group) }} |
87 | | - </a> |
88 | | - </td> |
89 | | - <td class="align-middle"> |
90 | | - {{ dsoNameService.getName((group.object | async)?.payload) }} |
91 | | - </td> |
92 | | - </tr> |
93 | | - } |
94 | | - </tbody> |
95 | | - </table> |
96 | | - </div> |
97 | | - </ds-pagination> |
98 | | - } |
99 | | - @if ((groups$ | async)?.payload?.totalElements === 0) { |
100 | | - <div class="alert alert-info w-100 mb-2" role="alert"> |
101 | | - <div>{{messagePrefix + '.memberOfNoGroups' | translate}}</div> |
102 | | - <div> |
103 | | - <button [routerLink]="[groupsDataService.getGroupRegistryRouterLink()]" |
104 | | - class="btn btn-primary">{{messagePrefix + '.goToGroups' | translate}}</button> |
105 | | - </div> |
106 | | - </div> |
107 | | - } |
| 54 | + <div> |
| 55 | + <h2>{{messagePrefix + '.groupsEPersonIsMemberOf' | translate}}</h2> |
| 56 | + @if (groups$ | async | dsHasNoValue) { |
| 57 | + <ds-loading [showMessage]="false"></ds-loading> |
| 58 | + } |
| 59 | + @if ((groups$ | async)?.payload?.totalElements > 0) { |
| 60 | + <ds-pagination [paginationOptions]="config" [collectionSize]="(groups$ | async)?.payload?.totalElements" |
| 61 | + [hideGear]="true" [hidePagerWhenSinglePage]="true" (pageChange)="onPageChange($event)"> |
| 62 | + <div class="table-responsive"> |
| 63 | + <table id="groups" class="table table-striped table-hover table-bordered"> |
| 64 | + <thead> |
| 65 | + <tr> |
| 66 | + <th scope="col" class="align-middle">{{messagePrefix + '.table.id' | translate}}</th> |
| 67 | + <th scope="col" class="align-middle">{{messagePrefix + '.table.name' | translate}}</th> |
| 68 | + <th scope="col" class="align-middle">{{messagePrefix + '.table.collectionOrCommunity' | translate}} |
| 69 | + </th> |
| 70 | + </tr> |
| 71 | + </thead> |
| 72 | + <tbody> |
| 73 | + @for (group of (groups$ | async)?.payload?.page; track group) { |
| 74 | + <tr> |
| 75 | + <td class="align-middle">{{group.id}}</td> |
| 76 | + <td class="align-middle"> |
| 77 | + <a (click)="groupsDataService.startEditingNewGroup(group)" |
| 78 | + [routerLink]="[groupsDataService.getGroupEditPageRouterLink(group)]"> |
| 79 | + {{ dsoNameService.getName(group) }} |
| 80 | + </a> |
| 81 | + </td> |
| 82 | + <td class="align-middle"> |
| 83 | + {{ dsoNameService.getName((group.object | async)?.payload) }} |
| 84 | + </td> |
| 85 | + </tr> |
| 86 | + } |
| 87 | + </tbody> |
| 88 | + </table> |
| 89 | + </div> |
| 90 | + </ds-pagination> |
| 91 | + } |
| 92 | + @if ((groups$ | async)?.payload?.totalElements === 0) { |
| 93 | + <div class="alert alert-info w-100 mb-2" role="alert"> |
| 94 | + <div>{{messagePrefix + '.memberOfNoGroups' | translate}}</div> |
| 95 | + <div> |
| 96 | + <button [routerLink]="[groupsDataService.getGroupRegistryRouterLink()]" |
| 97 | + class="btn btn-primary">{{messagePrefix + '.goToGroups' | translate}}</button> |
| 98 | + </div> |
108 | 99 | </div> |
| 100 | + } |
| 101 | + </div> |
109 | 102 | } |
110 | 103 | </div> |
111 | 104 | </div> |
|
0 commit comments