Skip to content

Commit 51c95de

Browse files
[DURACOM-307] apply migration script to conflicted files resolved in favor of Angular 18 update
1 parent 1aa9fae commit 51c95de

193 files changed

Lines changed: 7922 additions & 6445 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/access-control/bulk-access/browse/bulk-access-browse.component.html

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<ngb-panel [id]="'browse'">
33
<ng-template ngbPanelTitle>
44
<div class="w-100 d-flex gap-3 justify-content-between collapse-toggle" (click)="acc.toggle('browse')"
5-
data-test="browse">
5+
data-test="browse">
66
<button type="button" class="btn btn-link p-0" (click)="$event.preventDefault()"
7-
[attr.aria-expanded]="acc.isExpanded('browse')"
8-
aria-controls="bulk-access-browse-panel-content">
7+
[attr.aria-expanded]="acc.isExpanded('browse')"
8+
aria-controls="bulk-access-browse-panel-content">
99
{{ 'admin.access-control.bulk-access-browse.header' | translate }}
1010
</button>
1111
</div>
@@ -18,9 +18,9 @@
1818
<ng-template ngbNavContent>
1919
<div class="bulk-access-search">
2020
<ds-search [configuration]="'administrativeBulkAccess'"
21-
[selectable]="true"
22-
[selectionConfig]="{ repeatable: true, listId: listId }"
23-
[showThumbnails]="false"></ds-search>
21+
[selectable]="true"
22+
[selectionConfig]="{ repeatable: true, listId: listId }"
23+
[showThumbnails]="false"></ds-search>
2424
</div>
2525
</ng-template>
2626
</li>
@@ -36,21 +36,25 @@
3636
[showPaginator]="false"
3737
(prev)="pagePrev()"
3838
(next)="pageNext()">
39-
<ul *ngIf="(objectsSelected$|async)?.hasSucceeded" class="list-unstyled ms-4">
40-
<li *ngFor='let object of (objectsSelected$|async)?.payload?.page | paginate: { itemsPerPage: (paginationOptions$ | async).pageSize,
41-
currentPage: (paginationOptions$ | async).currentPage, totalItems: (objectsSelected$|async)?.payload?.page.length }; let i = index; let last = last '
42-
class="mt-4 mb-4 d-flex"
43-
[attr.data-test]="'list-object' | dsBrowserOnly">
44-
<ds-selectable-list-item-control [index]="i"
45-
[object]="object"
46-
[selectionConfig]="{ repeatable: true, listId: listId }"></ds-selectable-list-item-control>
47-
<ds-listable-object-component-loader [listID]="listId"
48-
[index]="i"
49-
[object]="object"
50-
[showThumbnails]="false"
51-
[viewMode]="'list'"></ds-listable-object-component-loader>
52-
</li>
53-
</ul>
39+
@if ((objectsSelected$|async)?.hasSucceeded) {
40+
<ul class="list-unstyled ms-4">
41+
@for (object of (objectsSelected$|async)?.payload?.page | paginate: { itemsPerPage: (paginationOptions$ | async).pageSize,
42+
currentPage: (paginationOptions$ | async).currentPage, totalItems: (objectsSelected$|async)?.payload?.page.length }; track object; let i = $index; let last = $last) {
43+
<li
44+
class="mt-4 mb-4 d-flex"
45+
[attr.data-test]="'list-object' | dsBrowserOnly">
46+
<ds-selectable-list-item-control [index]="i"
47+
[object]="object"
48+
[selectionConfig]="{ repeatable: true, listId: listId }"></ds-selectable-list-item-control>
49+
<ds-listable-object-component-loader [listID]="listId"
50+
[index]="i"
51+
[object]="object"
52+
[showThumbnails]="false"
53+
[viewMode]="'list'"></ds-listable-object-component-loader>
54+
</li>
55+
}
56+
</ul>
57+
}
5458
</ds-pagination>
5559
</ng-template>
5660
</li>

src/app/access-control/epeople-registry/epeople-registry.component.html

Lines changed: 64 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h1 id="header" class="pb-2">{{labelPrefix + 'head' | translate}}</h1>
66

77
<div>
88
<button class="me-auto btn btn-success addEPerson-button"
9-
[routerLink]="'create'">
9+
[routerLink]="'create'">
1010
<i class="fas fa-plus"></i>
1111
<span class="d-none d-sm-inline ms-1">{{labelPrefix + 'button.add' | translate}}</span>
1212
</button>
@@ -18,77 +18,84 @@ <h2 id="search" class="border-bottom pb-2">
1818
</h2>
1919
<form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)" class="d-flex justify-content-between">
2020
<div>
21-
<select name="scope" id="scope" formControlName="scope" class="form-select" aria-label="Search scope">
21+
<select name="scope" id="scope" formControlName="scope" class="form-select" aria-label="Search scope">
2222
<option value="metadata">{{labelPrefix + 'search.scope.metadata' | translate}}</option>
2323
<option value="email">{{labelPrefix + 'search.scope.email' | translate}}</option>
2424
</select>
2525
</div>
26-
<div class="flex-grow-1 me-3 ms-3">
27-
<div class="mb-3 input-group">
26+
<div class="flex-grow-1 me-3 ms-3">
27+
<div class="mb-3 input-group">
2828
<input type="text" name="query" id="query" formControlName="query"
29-
class="form-control" [attr.aria-label]="labelPrefix + 'search.placeholder' | translate"
30-
[placeholder]="(labelPrefix + 'search.placeholder' | translate)">
31-
<span class="input-group-append">
32-
<button type="submit" class="search-button btn btn-primary">
33-
<i class="fas fa-search"></i> {{ labelPrefix + 'search.button' | translate }}
34-
</button>
35-
</span>
29+
class="form-control" [attr.aria-label]="labelPrefix + 'search.placeholder' | translate"
30+
[placeholder]="(labelPrefix + 'search.placeholder' | translate)">
31+
<span class="input-group-append">
32+
<button type="submit" class="search-button btn btn-primary">
33+
<i class="fas fa-search"></i> {{ labelPrefix + 'search.button' | translate }}
34+
</button>
35+
</span>
3636
</div>
3737
</div>
3838
<div>
3939
<button (click)="clearFormAndResetResult();"
40-
class="search-button btn btn-secondary">{{labelPrefix + 'button.see-all' | translate}}</button>
40+
class="search-button btn btn-secondary">{{labelPrefix + 'button.see-all' | translate}}</button>
4141
</div>
4242
</form>
4343

44-
<ds-loading *ngIf="searching$ | async"></ds-loading>
45-
<ds-pagination
46-
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && (searching$ | async) !== true"
47-
[paginationOptions]="config"
48-
[collectionSize]="(pageInfoState$ | async)?.totalElements"
49-
[hideGear]="true"
50-
[hidePagerWhenSinglePage]="true">
51-
52-
<div class="table-responsive">
53-
<table id="epeople" class="table table-striped table-hover table-bordered">
54-
<thead>
55-
<tr>
56-
<th scope="col">{{labelPrefix + 'table.id' | translate}}</th>
57-
<th scope="col">{{labelPrefix + 'table.name' | translate}}</th>
58-
<th scope="col">{{labelPrefix + 'table.email' | translate}}</th>
59-
<th>{{labelPrefix + 'table.edit' | translate}}</th>
60-
</tr>
61-
</thead>
62-
<tbody>
63-
<tr *ngFor="let epersonDto of (ePeopleDto$ | async)?.page"
64-
[ngClass]="{'table-primary' : (activeEPerson$ | async) === epersonDto.eperson}">
65-
<td>{{epersonDto.eperson.id}}</td>
66-
<td>{{ dsoNameService.getName(epersonDto.eperson) }}</td>
67-
<td>{{epersonDto.eperson.email}}</td>
68-
<td>
69-
<div class="btn-group edit-field">
70-
<button [routerLink]="getEditEPeoplePage(epersonDto.eperson.id)"
44+
@if (searching$ | async) {
45+
<ds-loading></ds-loading>
46+
}
47+
@if ((pageInfoState$ | async)?.totalElements > 0 && (searching$ | async) !== true) {
48+
<ds-pagination
49+
[paginationOptions]="config"
50+
[collectionSize]="(pageInfoState$ | async)?.totalElements"
51+
[hideGear]="true"
52+
[hidePagerWhenSinglePage]="true">
53+
<div class="table-responsive">
54+
<table id="epeople" class="table table-striped table-hover table-bordered">
55+
<thead>
56+
<tr>
57+
<th scope="col">{{labelPrefix + 'table.id' | translate}}</th>
58+
<th scope="col">{{labelPrefix + 'table.name' | translate}}</th>
59+
<th scope="col">{{labelPrefix + 'table.email' | translate}}</th>
60+
<th>{{labelPrefix + 'table.edit' | translate}}</th>
61+
</tr>
62+
</thead>
63+
<tbody>
64+
@for (epersonDto of (ePeopleDto$ | async)?.page; track epersonDto) {
65+
<tr
66+
[ngClass]="{'table-primary' : (activeEPerson$ | async) === epersonDto.eperson}">
67+
<td>{{epersonDto.eperson.id}}</td>
68+
<td>{{ dsoNameService.getName(epersonDto.eperson) }}</td>
69+
<td>{{epersonDto.eperson.email}}</td>
70+
<td>
71+
<div class="btn-group edit-field">
72+
<button [routerLink]="getEditEPeoplePage(epersonDto.eperson.id)"
7173
class="btn btn-outline-primary btn-sm access-control-editEPersonButton"
7274
title="{{labelPrefix + 'table.edit.buttons.edit' | translate: { name: dsoNameService.getName(epersonDto.eperson) } }}">
73-
<i class="fas fa-edit fa-fw"></i>
74-
</button>
75-
<button *ngIf="epersonDto.ableToDelete" (click)="deleteEPerson(epersonDto.eperson)"
76-
class="delete-button btn btn-outline-danger btn-sm access-control-deleteEPersonButton"
77-
title="{{labelPrefix + 'table.edit.buttons.remove' | translate: { name: dsoNameService.getName(epersonDto.eperson) } }}">
78-
<i class="fas fa-trash-alt fa-fw"></i>
79-
</button>
80-
</div>
81-
</td>
82-
</tr>
83-
</tbody>
84-
</table>
85-
</div>
86-
87-
</ds-pagination>
75+
<i class="fas fa-edit fa-fw"></i>
76+
</button>
77+
@if (epersonDto.ableToDelete) {
78+
<button (click)="deleteEPerson(epersonDto.eperson)"
79+
class="delete-button btn btn-outline-danger btn-sm access-control-deleteEPersonButton"
80+
title="{{labelPrefix + 'table.edit.buttons.remove' | translate: { name: dsoNameService.getName(epersonDto.eperson) } }}">
81+
<i class="fas fa-trash-alt fa-fw"></i>
82+
</button>
83+
}
84+
</div>
85+
</td>
86+
</tr>
87+
}
88+
</tbody>
89+
</table>
90+
</div>
91+
</ds-pagination>
92+
}
8893

89-
<div *ngIf="(pageInfoState$ | async)?.totalElements === 0" class="alert alert-info w-100 mb-2" role="alert">
90-
{{labelPrefix + 'no-items' | translate}}
91-
</div>
94+
@if ((pageInfoState$ | async)?.totalElements === 0) {
95+
<div class="alert alert-info w-100 mb-2" role="alert">
96+
{{labelPrefix + 'no-items' | translate}}
97+
</div>
98+
}
9299
</div>
93100
</div>
94101
</div>

0 commit comments

Comments
 (0)