Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#67394] Migrate templates to Control Flow syntax

Alexander Brandon Coles8f5be89a59c5
diff --git a/frontend/src/app/core/global_search/input/global-search-input.component.html b/frontend/src/app/core/global_search/input/global-search-input.component.html
index 3b65e2b4eef..7e16b300e6d 100644
--- a/frontend/src/app/core/global_search/input/global-search-input.component.html
+++ b/frontend/src/app/core/global_search/input/global-search-input.component.html
@@ -1,16 +1,17 @@
<div role="search" class="top-menu-search" [attr.aria-label]="placeholder">
- <button
- *ngIf="expanded"
- type="button"
- (click)="toggleMobileSearch()"
- class="top-menu-search--back-button"
- href="#"
- [attr.title]="text.close_search"
- [attr.aria-label]="text.close_search"
- >
- <i class="icon-arrow-left1" aria-hidden="true"></i>
- </button>
+ @if (expanded) {
+ <button
+ type="button"
+ (click)="toggleMobileSearch()"
+ class="top-menu-search--back-button"
+ href="#"
+ [attr.title]="text.close_search"
+ [attr.aria-label]="text.close_search"
+ >
+ <i class="icon-arrow-left1" aria-hidden="true"></i>
+ </button>
+ }
<button
type="button"
#btn
@@ -20,7 +21,7 @@
[attr.aria-label]="text.search"
[class.-input-focused]="expanded"
(click)="handleClick($event)"
- >
+ >
<op-icon icon-classes="icon5 icon-search ellipsis"></op-icon>
</button>
<op-autocompleter
@@ -53,25 +54,28 @@
[resource]="autocompleterOptions.resource"
[searchKey]="autocompleterOptions.searchKey"
[getOptionsFn]="autocompleterOptions.getOptionsFn"
- >
+ >
<ng-template op-autocompleter-header-tmp>
- <div *ngIf="!searchTerm && (hasRecentItems$ | async)">{{text.recently_viewed}}</div>
+ @if (!searchTerm && (hasRecentItems$ | async)) {
+ <div>{{text.recently_viewed}}</div>
+ }
</ng-template>
<ng-template op-autocompleter-option-tmp let-item let-index="index" let-search="searchTerm">
- <div *ngIf="!item.id; else workPackageItemTemplate">
- <div tabindex="-1" class="global-search--option" (click)="followItem(item)">
- <div class="global-search--search-term">{{ currentValue }}</div>
- <div class="global-search--project-scope" title="{{ item.projectScope }}">{{ item.text }} ↵</div>
+ @if (!item.id) {
+ <div>
+ <div tabindex="-1" class="global-search--option" (click)="followItem(item)">
+ <div class="global-search--search-term">{{ currentValue }}</div>
+ <div class="global-search--project-scope" title="{{ item.projectScope }}">{{ item.text }} ↵</div>
+ </div>
</div>
- </div>
- <ng-template #workPackageItemTemplate>
+ } @else {
<a
tabindex="-1"
class="global-search--option"
[href]="wpPath(item.id)"
(click)="redirectToWp(item.id, $event)"
style="line-height: 1"
- >
+ >
<div class="global-search--option-meta">
<div class="global-search--wp-line">
<span [ngClass]="highlighting('type', item.type.id)">
@@ -85,7 +89,7 @@
<span
class="global-search--wp-project"
[attr.title]="item.project.name"
- >
+ >
{{ item.project.name }}
</span>
</div>
@@ -94,7 +98,7 @@
</span>
</div>
</a>
- </ng-template>
+ }
</ng-template>
</op-autocompleter>
</div>
diff --git a/frontend/src/app/features/admin/types/attribute-group.component.html b/frontend/src/app/features/admin/types/attribute-group.component.html
index 64d59fd0c3f..8ae39855766 100644
--- a/frontend/src/app/features/admin/types/attribute-group.component.html
+++ b/frontend/src/app/features/admin/types/attribute-group.component.html
@@ -2,25 +2,28 @@
<div class="group-head">
<span class="group-handle icon-drag-handle"></span>
<op-group-edit-in-place
- [name]="group.name"
- (onValueChange)="rename($event)"
- class="group-name">
+ [name]="group.name"
+ (onValueChange)="rename($event)"
+ class="group-name">
</op-group-edit-in-place>
<span class="delete-group icon-small icon-close" (click)="deleteGroup.emit()"></span>
</div>
<div class="attributes" dragula="attributes" [(dragulaModel)]="group.attributes">
- <div *ngFor="let attribute of group.attributes"
- class="type-form-conf-attribute"
- [attr.data-key]="attribute.key">
- <span class="attribute-handle icon-drag-handle"></span>
- <span class="attribute-name">
- {{ attribute.translation }}
- <span class="attribute-cf-label"
- *ngIf="attribute.is_cf"
+ @for (attribute of group.attributes; track attribute) {
+ <div
+ class="type-form-conf-attribute"
+ [attr.data-key]="attribute.key">
+ <span class="attribute-handle icon-drag-handle"></span>
+ <span class="attribute-name">
+ {{ attribute.translation }}
+ @if (attribute.is_cf) {
+ <span class="attribute-cf-label"
[textContent]="text.custom_field">
- </span>
- </span>
- <span class="delete-attribute icon-small icon-close" (click)="removeFromGroup(attribute)"></span>
- </div>
+ </span>
+ }
+ </span>
+ <span class="delete-attribute icon-small icon-close" (click)="removeFromGroup(attribute)"></span>
+ </div>
+ }
</div>
</div> <!-- END attribute group -->
diff --git a/frontend/src/app/features/admin/types/group-edit-in-place.html b/frontend/src/app/features/admin/types/group-edit-in-place.html
index 991dcf01dd0..5fd62aa1bf9 100644
--- a/frontend/src/app/features/admin/types/group-edit-in-place.html
+++ b/frontend/src/app/features/admin/types/group-edit-in-place.html
@@ -1,11 +1,13 @@
-<div *ngIf="!editing"
- (click)="startEditing()"
- [textContent]="name"
- class="group-edit-handler">
-</div>
-<input
+@if (!editing) {
+ <div
+ (click)="startEditing()"
+ [textContent]="name"
+ class="group-edit-handler">
+ </div>
+}
+@if (editing) {
+ <input
#nameInput
- *ngIf="editing"
class="group-edit-in-place--input"
type="text"
opAutofocus
@@ -14,3 +16,4 @@
(blur)="saveEdition($event)"
(keydown.escape)="reset()"
(keydown.enter)="saveEdition($event)">
+}
diff --git a/frontend/src/app/features/admin/types/type-form-configuration.html b/frontend/src/app/features/admin/types/type-form-configuration.html
index 2fd43ea8544..ab507b1d661 100644
--- a/frontend/src/app/features/admin/types/type-form-configuration.html
+++ b/frontend/src/app/features/admin/types/type-form-configuration.html
@@ -3,41 +3,42 @@
<ul class="toolbar-items">
<li class="toolbar-item">
<button type="button -primary"
- class="form-configuration--reset button"
- (click)="resetToDefault($event)">
+ class="form-configuration--reset button"
+ (click)="resetToDefault($event)">
<op-icon icon-classes="button--icon icon-undo"></op-icon>
<span class="button--text" [textContent]="text.reset"></span>
</button>
</li>
- <li
- *ngIf="typeBanner.eeAvailable"
- class="toolbar-item drop-down">
- <a class="form-configuration--add-group button -primary" aria-haspopup="true">
- <op-icon icon-classes="button--icon icon-add"></op-icon>
- <span class="button--text" [textContent]="text.label_group"></span>
- <op-icon icon-classes="button--dropdown-indicator"></op-icon>
- </a>
- <ul class="menu-drop-down-container">
- <li>
- <button
- type="button"
- class="menu-item form-configuration--add-group"
- [textContent]="text.add_group"
- (click)="createGroup('attribute', '')"
- >
- </button>
- </li>
- <li>
- <button
- type="button"
- class="menu-item form-configuration--add-group"
- [textContent]="text.add_table"
- (click)="addGroupAndOpenQuery()"
- >
- </button>
- </li>
- </ul>
- </li>
+ @if (typeBanner.eeAvailable) {
+ <li
+ class="toolbar-item drop-down">
+ <a class="form-configuration--add-group button -primary" aria-haspopup="true">
+ <op-icon icon-classes="button--icon icon-add"></op-icon>
+ <span class="button--text" [textContent]="text.label_group"></span>
+ <op-icon icon-classes="button--dropdown-indicator"></op-icon>
+ </a>
+ <ul class="menu-drop-down-container">
+ <li>
+ <button
+ type="button"
+ class="menu-item form-configuration--add-group"
+ [textContent]="text.add_group"
+ (click)="createGroup('attribute', '')"
+ >
+ </button>
+ </li>
+ <li>
+ <button
+ type="button"
+ class="menu-item form-configuration--add-group"
+ [textContent]="text.add_table"
+ (click)="addGroupAndOpenQuery()"
+ >
+ </button>
+ </li>
+ </ul>
+ </li>
+ }
</ul>
</div>
</div>
@@ -45,18 +46,22 @@
<div class="grid-block wrap">
<div class="grid-content small-12 medium-6">
<div id="draggable-groups" dragula="groups" [(dragulaModel)]="groups">
- <ng-container *ngFor="let group of groups">
- <op-type-form-attribute-group *ngIf="group.type === 'attribute'"
- (removeAttribute)="deactivateAttribute($event)"
- (deleteGroup)="deleteGroup(group)"
- [group]="group">
- </op-type-form-attribute-group>
- <op-type-form-query-group *ngIf="group.type === 'query'"
- (editQuery)="editQuery(group)"
- (deleteGroup)="deleteGroup(group)"
- [group]="group">
- </op-type-form-query-group>
- </ng-container>
+ @for (group of groups; track group) {
+ @if (group.type === 'attribute') {
+ <op-type-form-attribute-group
+ (removeAttribute)="deactivateAttribute($event)"
+ (deleteGroup)="deleteGroup(group)"
+ [group]="group">
+ </op-type-form-attribute-group>
+ }
+ @if (group.type === 'query') {
+ <op-type-form-query-group
+ (editQuery)="editQuery(group)"
+ (deleteGroup)="deleteGroup(group)"
+ [group]="group">
+ </op-type-form-query-group>
+ }
+ }
</div>
</div>
<div class="grid-content small-12 medium-6">
@@ -67,18 +72,22 @@
<span class="advice" [textContent]="text.drag_to_activate"></span>
</div>
<div class="attributes" dragula="attributes" [(dragulaModel)]="inactives">
- <div *ngFor="let inactive_attribute of inactives"
- class="type-form-conf-attribute"
- [attr.data-key]="inactive_attribute.key">
- <span class="attribute-handle icon-drag-handle"></span>
- <span class="attribute-name">
+ @for (inactive_attribute of inactives; track inactive_attribute) {
+ <div
+ class="type-form-conf-attribute"
+ [attr.data-key]="inactive_attribute.key">
+ <span class="attribute-handle icon-drag-handle"></span>
+ <span class="attribute-name">
{{ inactive_attribute.translation }}
- <span *ngIf="inactive_attribute.is_cf"
+ @if (inactive_attribute.is_cf) {
+ <span
class="attribute-cf-label"
[textContent]="text.custom_field">
- </span>
- </span>
- </div>
+ </span>
+ }
+ </span>
+ </div>
+ }
</div>
</div>
</div>
diff --git a/frontend/src/app/features/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.html b/frontend/src/app/features/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.html
index 48607e42b48..578c87ef25e 100644
--- a/frontend/src/app/features/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.html
+++ b/frontend/src/app/features/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.html
@@ -1,28 +1,30 @@
-<ng-container *ngIf="shouldShowGroup()">
+@if (shouldShowGroup()) {
<div class="attributes-group description-group">
<div class="attributes-group--header">
<div class="attributes-group--header-container">
<h3 class="attributes-group--header-text"
- [textContent]="text.bcf"></h3>
+ [textContent]="text.bcf"></h3>
</div>
</div>
-
- <div class="bcf--viewpoints" *ngIf="galleryImages.length > 0">
- <ngx-gallery [options]="galleryOptions"
- [images]="galleryImages"
- (change)="onGalleryChanged($event)"
- (imagesReady)="selectViewpointInGallery()"
- (previewOpen)="galleryPreviewOpen()"
- (previewClose)="galleryPreviewClose()">
- </ngx-gallery>
- </div>
-
- <a *ngIf="viewerVisible && createAllowed"
- [title]="text.add_viewpoint"
- class="button"
- (click)="saveViewpoint(workPackage)">
- <op-icon icon-classes="button--icon icon-add"></op-icon>
- <span class="button--text"> {{text.viewpoint}} </span>
- </a>
+ @if (galleryImages.length > 0) {
+ <div class="bcf--viewpoints">
+ <ngx-gallery [options]="galleryOptions"
+ [images]="galleryImages"
+ (change)="onGalleryChanged($event)"
+ (imagesReady)="selectViewpointInGallery()"
+ (previewOpen)="galleryPreviewOpen()"
+ (previewClose)="galleryPreviewClose()">
+ </ngx-gallery>
+ </div>
+ }
+ @if (viewerVisible && createAllowed) {
+ <a
+ [title]="text.add_viewpoint"
+ class="button"
+ (click)="saveViewpoint(workPackage)">
+ <op-icon icon-classes="button--icon icon-add"></op-icon>
+ <span class="button--text"> {{text.viewpoint}} </span>
+ </a>
+ }
</div>
-</ng-container>
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/frontend/src/app/features/bim/ifc_models/bcf/list/bcf-list.component.html b/frontend/src/app/features/bim/ifc_models/bcf/list/bcf-list.component.html
index 08c7186ccaf..40ed2d8370e 100644
--- a/frontend/src/app/features/bim/ifc_models/bcf/list/bcf-list.component.html
+++ b/frontend/src/app/features/bim/ifc_models/bcf/list/bcf-list.component.html
@@ -1,37 +1,46 @@
-<div class="op-bcf-list--result-overlay"
- *ngIf="(showResultOverlay$ | async) && showTableView"></div>
+@if ((showResultOverlay$ | async) && showTableView) {
+ <div class="op-bcf-list--result-overlay"
+ ></div>
+}
<!-- TABLE representation of the WP -->
-<div class="op-bcf-list--work-packages-split-view--tabletimeline-container"
- [ngClass]="{ '_with-resizer': showResizer }"
- *ngIf="tableInformationLoaded && showTableView">
+@if (tableInformationLoaded && showTableView) {
+ <div class="op-bcf-list--work-packages-split-view--tabletimeline-container"
+ [ngClass]="{ '_with-resizer': showResizer }"
+ >
+ <wp-table [projectIdentifier]="CurrentProject.identifier"
+ [configuration]="wpTableConfiguration"
+ (itemClicked)="handleWorkPackageClicked($event)"
+ (stateLinkClicked)="openStateLink($event)"
+ class="work-packages-split-view--tabletimeline-content">
+ </wp-table>
+ </div>
+}
- <wp-table [projectIdentifier]="CurrentProject.identifier"
- [configuration]="wpTableConfiguration"
- (itemClicked)="handleWorkPackageClicked($event)"
- (stateLinkClicked)="openStateLink($event)"
- class="work-packages-split-view--tabletimeline-content">
- </wp-table>
-</div>
-
-<wp-resizer *ngIf="showResizer"
- elementClass="work-packages-partitioned-page--content-right"
- localStorageKey="openProject-splitViewFlexBasis">
-</wp-resizer>
+@if (showResizer) {
+ <wp-resizer
+ elementClass="work-packages-partitioned-page--content-right"
+ localStorageKey="openProject-splitViewFlexBasis">
+ </wp-resizer>
+}
<!-- GRID representation of the WP -->
-<div *ngIf="!showTableView"
- class="op-bcf-list--work-packages--card-view-container"
- [ngClass]="{ '_with-resizer': showResizer }">
- <wp-grid [configuration]="wpTableConfiguration"
- [showResizer]="false"
- (itemClicked)="handleWorkPackageClicked($event)"
- (stateLinkClicked)="openStateLink($event)">
- </wp-grid>
-</div>
+@if (!showTableView) {
+ <div
+ class="op-bcf-list--work-packages--card-view-container"
+ [ngClass]="{ '_with-resizer': showResizer }">
+ <wp-grid [configuration]="wpTableConfiguration"
+ [showResizer]="false"
+ (itemClicked)="handleWorkPackageClicked($event)"
+ (stateLinkClicked)="openStateLink($event)">
+ </wp-grid>
+ </div>
+}
<!-- Footer -->
-<div class="work-packages-split-view--tabletimeline-footer hide-when-print"
- *ngIf="tableInformationLoaded">
- <wp-table-pagination></wp-table-pagination>
-</div>
+@if (tableInformationLoaded) {
+ <div class="work-packages-split-view--tabletimeline-footer hide-when-print"
+ >
+ <wp-table-pagination></wp-table-pagination>
+ </div>
+}
diff --git a/frontend/src/app/features/bim/ifc_models/bcf/split/left/bcf-split-left.component.html b/frontend/src/app/features/bim/ifc_models/bcf/split/left/bcf-split-left.component.html
index 711ad18b51a..3e5901a97f4 100644
--- a/frontend/src/app/features/bim/ifc_models/bcf/split/left/bcf-split-left.component.html
+++ b/frontend/src/app/features/bim/ifc_models/bcf/split/left/bcf-split-left.component.html
@@ -1,7 +1,9 @@
-<op-ifc-viewer
- *ngIf="showViewer$ | async"
-></op-ifc-viewer>
+@if (showViewer$ | async) {
+ <op-ifc-viewer
+ ></op-ifc-viewer>
+}
-<op-bcf-list
- *ngIf="(showViewer$ | async) === false"
-></op-bcf-list>
+@if ((showViewer$ | async) === false) {
+ <op-bcf-list
+ ></op-bcf-list>
+}
diff --git a/frontend/src/app/features/bim/ifc_models/bcf/split/right/bcf-split-right.component.html b/frontend/src/app/features/bim/ifc_models/bcf/split/right/bcf-split-right.component.html
index feb95468c73..5c85421a144 100644
--- a/frontend/src/app/features/bim/ifc_models/bcf/split/right/bcf-split-right.component.html
+++ b/frontend/src/app/features/bim/ifc_models/bcf/split/right/bcf-split-right.component.html
@@ -1,4 +1,5 @@
-<op-bcf-list
- [showResizer]="true"
- *ngIf="showWorkPackages$ | async"
-></op-bcf-list>
+@if (showWorkPackages$ | async) {
+ <op-bcf-list
+ [showResizer]="true"
+ ></op-bcf-list>
+}
diff --git a/frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.html b/frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.html
index 6d3afe120e6..6c1d76e9cae 100644
--- a/frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.html
+++ b/frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.html
@@ -1,95 +1,96 @@
<div #outerContainer
- class="op-ifc-viewer">
+ class="op-ifc-viewer">
- <div *ngIf="modelCount === 0" class="op-toast -info">
- <div class="op-toast--content">
- <p>
- {{ text.empty_warning }}
- <br/>
- <a *ngIf="canManage"
- [href]="ifcData.manageIFCPath"
- target="_blank"
- [textContent]="text.use_this_link_to_manage">
- </a>
- </p>
- </div>
- </div>
-
- <div #viewerContainer
- *ngIf="modelCount"
- class="op-ifc-viewer--container xeokit-busy-modal-backdrop"
- data-test-selector="op-ifc-viewer--container">
-
- <div class="op-ifc-viewer--toolbar op-ifc-viewer--model-canvas-overlay">
- <div #xeokitToolbarIcons class="xeokit-toolbar-icon-replacements">
- <button id="xeokit-replace-reset">
- <svg op-threed-return-default-icon size="small"></svg>
- </button>
- <button id="xeokit-replace-threeD">
- <svg op-view-threed-icon size="small"></svg>
- </button>
- <button id="xeokit-replace-ortho">
- <svg op-orthographic-perspective-icon size="small"></svg>
- </button>
- <button id="xeokit-replace-fit">
- <svg op-view-fit-to-icon size="small"></svg>
- </button>
- <button id="xeokit-replace-firstPerson">
- <svg op-first-person-view-icon size="small"></svg>
- </button>
- <button id="xeokit-replace-showSpaces">
- <svg op-view-modal-icon size="small"></svg>
- </button>
- <button id="xeokit-replace-hide">
- <svg op-erase-icon size="small"></svg>
- </button>
- <button id="xeokit-replace-select">
- <svg op-cursor-select-icon size="small"></svg>
- </button>
- <button id="xeokit-replace-marquee">
- <svg op-cursor-rectangle-select-icon size="small"></svg>
- </button>
- <button id="xeokit-replace-section">
- <svg op-scissors-icon size="small"></svg>
- </button>
- </div>
-
- <div #toolbar
- class="op-ifc-viewer--toolbar-container"
- data-test-selector="op-ifc-viewer--toolbar-container">
- </div>
-
- <div class="op-ifc-viewer--toolbar-info-button">
- <button class="xeokit-btn"
- [class.active]="inspectorVisible$ | async"
- (click)="toggleInspector()">
- <svg info-icon size="small"></svg>
- </button>
+ @if (modelCount === 0) {
+ <div class="op-toast -info">
+ <div class="op-toast--content">
+ <p>
+ {{ text.empty_warning }}
+ <br/>
+ @if (canManage) {
+ <a
+ [href]="ifcData.manageIFCPath"
+ target="_blank"
+ [textContent]="text.use_this_link_to_manage">
+ </a>
+ }
+ </p>
</div>
</div>
+ }
- <canvas #modelCanvas
- class="op-ifc-viewer--model-canvas"
- data-test-selector="op-ifc-viewer--model-canvas"
- tabindex="0">
- </canvas>
-
- <div *ngIf="!keyboardEnabled"
- class="op-ifc-viewer--focus-warning op-ifc-viewer--model-canvas-overlay">
- <a class="op-ifc-viewer--keyboard-disabled-icon icon-no-color icon-input-disabled"
- (mousedown)="enableFromIcon($event)"
- [attr.title]="text.keyboard_input_disabled">
- </a>
+ @if (modelCount) {
+ <div #viewerContainer
+ class="op-ifc-viewer--container xeokit-busy-modal-backdrop"
+ data-test-selector="op-ifc-viewer--container">
+ <div class="op-ifc-viewer--toolbar op-ifc-viewer--model-canvas-overlay">
+ <div #xeokitToolbarIcons class="xeokit-toolbar-icon-replacements">
+ <button id="xeokit-replace-reset">
+ <svg op-threed-return-default-icon size="small"></svg>
+ </button>
+ <button id="xeokit-replace-threeD">
+ <svg op-view-threed-icon size="small"></svg>
+ </button>
+ <button id="xeokit-replace-ortho">
+ <svg op-orthographic-perspective-icon size="small"></svg>
+ </button>
+ <button id="xeokit-replace-fit">
+ <svg op-view-fit-to-icon size="small"></svg>
+ </button>
+ <button id="xeokit-replace-firstPerson">
+ <svg op-first-person-view-icon size="small"></svg>
+ </button>
+ <button id="xeokit-replace-showSpaces">
+ <svg op-view-modal-icon size="small"></svg>
+ </button>
+ <button id="xeokit-replace-hide">
+ <svg op-erase-icon size="small"></svg>
+ </button>
+ <button id="xeokit-replace-select">
+ <svg op-cursor-select-icon size="small"></svg>
+ </button>
+ <button id="xeokit-replace-marquee">
+ <svg op-cursor-rectangle-select-icon size="small"></svg>
+ </button>
+ <button id="xeokit-replace-section">
+ <svg op-scissors-icon size="small"></svg>
+ </button>
+ </div>
+ <div #toolbar
+ class="op-ifc-viewer--toolbar-container"
+ data-test-selector="op-ifc-viewer--toolbar-container">
+ </div>
+ <div class="op-ifc-viewer--toolbar-info-button">
+ <button class="xeokit-btn"
+ [class.active]="inspectorVisible$ | async"
+ (click)="toggleInspector()">
+ <svg info-icon size="small"></svg>
+ </button>
+ </div>
+ </div>
+ <canvas #modelCanvas
+ class="op-ifc-viewer--model-canvas"
+ data-test-selector="op-ifc-viewer--model-canvas"
+ tabindex="0">
+ </canvas>
+ @if (!keyboardEnabled) {
+ <div
+ class="op-ifc-viewer--focus-warning op-ifc-viewer--model-canvas-overlay">
+ <a class="op-ifc-viewer--keyboard-disabled-icon icon-no-color icon-input-disabled"
+ (mousedown)="enableFromIcon($event)"
+ [attr.title]="text.keyboard_input_disabled">
+ </a>
+ </div>
+ }
+ <canvas #navCubeCanvas
+ class="op-ifc-viewer--nav-cube-canvas op-ifc-viewer--model-canvas-overlay"
+ data-test-selector="op-ifc-viewer--nav-cube-canvas"></canvas>
</div>
-
- <canvas #navCubeCanvas
- class="op-ifc-viewer--nav-cube-canvas op-ifc-viewer--model-canvas-overlay"
- data-test-selector="op-ifc-viewer--nav-cube-canvas"></canvas>
- </div>
+ }
<div #inspectorPane
- class="op-ifc-viewer--inspector-container"
- [class.op-ifc-viewer--inspector-container-hidden]="!(inspectorVisible$ | async)"
- data-test-selector="op-ifc-viewer--inspector-container">
+ class="op-ifc-viewer--inspector-container"
+ [class.op-ifc-viewer--inspector-container-hidden]="!(inspectorVisible$ | async)"
+ data-test-selector="op-ifc-viewer--inspector-container">
</div>
</div>
diff --git a/frontend/src/app/features/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component.ts b/frontend/src/app/features/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component.ts
index 9a421b14ea3..853d77f17be 100644
--- a/frontend/src/app/features/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component.ts
+++ b/frontend/src/app/features/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component.ts
@@ -32,16 +32,18 @@ import { IfcModelsDataService } from 'core-app/features/bim/ifc_models/pages/vie
@Component({
template: `
- <a *ngIf="manageAllowed"
- class="button"
- [href]="manageIFCPath">
- <op-icon icon-classes="button--icon icon-settings2"></op-icon>
- <span class="button--text"
- [textContent]="text.manage"
- aria-hidden="true"></span>
- </a>
-
- `,
+ @if (manageAllowed) {
+ <a
+ class="button"
+ [href]="manageIFCPath">
+ <op-icon icon-classes="button--icon icon-settings2"></op-icon>
+ <span class="button--text"
+ [textContent]="text.manage"
+ aria-hidden="true"></span>
+ </a>
+ }
+
+ `,
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'op-bcf-manage-ifc-button',
standalone: false,
diff --git a/frontend/src/app/features/bim/ifc_models/toolbar/view-toggle/bcf-view-toggle-button.component.ts b/frontend/src/app/features/bim/ifc_models/toolbar/view-toggle/bcf-view-toggle-button.component.ts
index 420ceb18b85..afeac31ea53 100644
--- a/frontend/src/app/features/bim/ifc_models/toolbar/view-toggle/bcf-view-toggle-button.component.ts
+++ b/frontend/src/app/features/bim/ifc_models/toolbar/view-toggle/bcf-view-toggle-button.component.ts
@@ -32,19 +32,19 @@ import { BcfViewService } from 'core-app/features/bim/ifc_models/pages/viewer/bc
@Component({
template: `
- <ng-container *ngIf="(view$ | async) as current">
+ @if ((view$ | async); as current) {
<button class="button"
- id="bcf-view-toggle-button"
- opBcfViewDropdown>
+ id="bcf-view-toggle-button"
+ opBcfViewDropdown>
<op-icon icon-classes="button--icon {{bcfView.icon[current]}}"></op-icon>
<span class="button--text"
- aria-hidden="true"
- [textContent]="bcfView.text[current]">
+ aria-hidden="true"
+ [textContent]="bcfView.text[current]">
</span>
<op-icon icon-classes="button--icon icon-small icon-pulldown"></op-icon>
</button>
- </ng-container>
- `,
+ }
+ `,
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'op-bcf-view-toggle-button',
standalone: false,
diff --git a/frontend/src/app/features/boards/board/add-list-modal/add-list-modal.html b/frontend/src/app/features/boards/board/add-list-modal/add-list-modal.html
index b2bc7f75f55..8f58eab3c1f 100644
--- a/frontend/src/app/features/boards/board/add-list-modal/add-list-modal.html
+++ b/frontend/src/app/features/boards/board/add-list-modal/add-list-modal.html
@@ -1,18 +1,20 @@
<div
class="spot-modal spot-modal_autoheight confirm-form-submit--modal loading-indicator--location"
data-indicator-name="modal"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{ text.title }}</div>
<div class="spot-divider"></div>
<div class="spot-modal--body spot-container">
- <div *ngIf="showWarning && warningText"
- class="op-toast -warning">
- <div class="op-toast--content">
- <p [innerHTML]="warningText"></p>
+ @if (showWarning && warningText) {
+ <div
+ class="op-toast -warning">
+ <div class="op-toast--content">
+ <p [innerHTML]="warningText"></p>
+ </div>
</div>
- </div>
+ }
<div class="form--field">
<div class="form--field-container">
@@ -27,19 +29,20 @@
[fetchDataDirectly]="true"
[getOptionsFn]=autocompleterOptions.getOptionsFn
(change)="onModelChange($event)"
- >
- <ng-template op-autocompleter-footer-tmp *ngIf="autocompleterOptions.resource==='version'" let-search>
- <button
- class="op-select-footer--label"
- type="button"
- (click)="onNewActionCreated()">
+ >
+ @if (autocompleterOptions.resource==='version'; as search) {
+ <ng-template op-autocompleter-footer-tmp let-search>
+ <button
+ class="op-select-footer--label"
+ type="button"
+ (click)="onNewActionCreated()">
<span class="icon-context">
<op-icon icon-classes="icon-plus icon-context"></op-icon>
{{ text.button_create }} {{ ngSelectComponent.ngSelectInstance.searchTerm }}
</span>
- </button>
-
- </ng-template>
+ </button>
+ </ng-template>
+ }
</op-autocompleter>
</div>
</div>
diff --git a/frontend/src/app/features/boards/board/board-actions/assignee/assignee-board-header.html b/frontend/src/app/features/boards/board/board-actions/assignee/assignee-board-header.html
index 688c6952cf9..d0c638d2700 100644
--- a/frontend/src/app/features/boards/board/board-actions/assignee/assignee-board-header.html
+++ b/frontend/src/app/features/boards/board/board-actions/assignee/assignee-board-header.html
@@ -1,20 +1,27 @@
-<div class="op-assignee-board-header" *ngIf="user">
- <op-principal
- *ngIf="user.id"
- [principal]="user"
- [hideName]="true"
- size="mini"
- ></op-principal>
- <h2 class="editable-toolbar-title--fixed">
- <small [textContent]="text.assignee"></small>
- <br/>
- <a *ngIf="user.id"
- [href]="pathHelper.userPath(user.id)"
- [textContent]="user.name"
- target="_blank">
- </a>
- <span *ngIf="!user.id"
- [textContent]="user.name">
- </span>
- </h2>
-</div>
+@if (user) {
+ <div class="op-assignee-board-header">
+ @if (user.id) {
+ <op-principal
+ [principal]="user"
+ [hideName]="true"
+ size="mini"
+ ></op-principal>
+ }
+ <h2 class="editable-toolbar-title--fixed">
+ <small [textContent]="text.assignee"></small>
+ <br/>
+ @if (user.id) {
+ <a
+ [href]="pathHelper.userPath(user.id)"
+ [textContent]="user.name"
+ target="_blank">
+ </a>
+ }
+ @if (!user.id) {
+ <span
+ [textContent]="user.name">
+ </span>
+ }
+ </h2>
+ </div>
+}
diff --git a/frontend/src/app/features/boards/board/board-actions/status/status-board-header.html b/frontend/src/app/features/boards/board/board-actions/status/status-board-header.html
index db09f9312b7..3d3c854d12b 100644
--- a/frontend/src/app/features/boards/board/board-actions/status/status-board-header.html
+++ b/frontend/src/app/features/boards/board/board-actions/status/status-board-header.html
@@ -1,7 +1,9 @@
-<div class="op-status-board-header" *ngIf="status">
- <h2 class="editable-toolbar-title--fixed">
- <small [textContent]="text.status"></small>
- <br/>
- {{ status.name }}
- </h2>
-</div>
+@if (status) {
+ <div class="op-status-board-header">
+ <h2 class="editable-toolbar-title--fixed">
+ <small [textContent]="text.status"></small>
+ <br/>
+ {{ status.name }}
+ </h2>
+ </div>
+}
diff --git a/frontend/src/app/features/boards/board/board-actions/subproject/subproject-board-header.html b/frontend/src/app/features/boards/board/board-actions/subproject/subproject-board-header.html
index 57f51229ae3..251a3a8bece 100644
--- a/frontend/src/app/features/boards/board/board-actions/subproject/subproject-board-header.html
+++ b/frontend/src/app/features/boards/board/board-actions/subproject/subproject-board-header.html
@@ -1,10 +1,12 @@
-<div class="op-subproject-board-header" *ngIf="resource">
- <h2 class="editable-toolbar-title--fixed">
- <small [textContent]="text.project"></small>
- <br/>
- <a [href]="pathHelper.projectPath(idFromLink(resource.href))"
- [textContent]="resource.name"
- target="_blank">
- </a>
- </h2>
-</div>
+@if (resource) {
+ <div class="op-subproject-board-header">
+ <h2 class="editable-toolbar-title--fixed">
+ <small [textContent]="text.project"></small>
+ <br/>
+ <a [href]="pathHelper.projectPath(idFromLink(resource.href))"
+ [textContent]="resource.name"
+ target="_blank">
+ </a>
+ </h2>
+ </div>
+}
diff --git a/frontend/src/app/features/boards/board/board-actions/subtasks/subtasks-board-header.html b/frontend/src/app/features/boards/board/board-actions/subtasks/subtasks-board-header.html
index 2b564754313..08f58c793fa 100644
--- a/frontend/src/app/features/boards/board/board-actions/subtasks/subtasks-board-header.html
+++ b/frontend/src/app/features/boards/board/board-actions/subtasks/subtasks-board-header.html
@@ -1,14 +1,16 @@
-<div class="op-subtask-board-header" *ngIf="resource">
- <h2 class="editable-toolbar-title--fixed">
- <small [textContent]="text.workPackage"></small>
- <br/>
- <span class="op-subtask-board-header--work-package-type"
- [ngClass]="typeHighlightingClass"
- [textContent]="resource.type.name">
- </span>
- <a [href]="pathHelper.workPackagePath(idFromLink(resource.href))"
- [textContent]="resource.subjectWithId()"
- target="_blank">
- </a>
- </h2>
-</div>
+@if (resource) {
+ <div class="op-subtask-board-header">
+ <h2 class="editable-toolbar-title--fixed">
+ <small [textContent]="text.workPackage"></small>
+ <br/>
+ <span class="op-subtask-board-header--work-package-type"
+ [ngClass]="typeHighlightingClass"
+ [textContent]="resource.type.name">
+ </span>
+ <a [href]="pathHelper.workPackagePath(idFromLink(resource.href))"
+ [textContent]="resource.subjectWithId()"
+ target="_blank">
+ </a>
+ </h2>
+ </div>
+}
diff --git a/frontend/src/app/features/boards/board/board-actions/version/version-board-header.html b/frontend/src/app/features/boards/board/board-actions/version/version-board-header.html
index 91ac96a1c91..ee0efc7398a 100644
--- a/frontend/src/app/features/boards/board/board-actions/version/version-board-header.html
+++ b/frontend/src/app/features/boards/board/board-actions/version/version-board-header.html
@@ -1,15 +1,16 @@
-<div class="op-version-board-header"
- data-test-selector="op-version-board-header"
- [ngClass]="{ '-closed': version.isClosed(), '-locked': version.isLocked() }"
- *ngIf="version">
- <h2 class="editable-toolbar-title--fixed">
- <small [textContent]="text.version"></small>
- <br/>
- <a [href]="pathHelper.versionShowPath(version.id)"
- [textContent]="version.name"
- target="_blank">
- </a>
- </h2>
-
- <span class="op-version-board-header--info-row -italic -small-font"> {{version.endDate}} </span>
-</div>
+@if (version) {
+ <div class="op-version-board-header"
+ data-test-selector="op-version-board-header"
+ [ngClass]="{ '-closed': version.isClosed(), '-locked': version.isLocked() }"
+ >
+ <h2 class="editable-toolbar-title--fixed">
+ <small [textContent]="text.version"></small>
+ <br/>
+ <a [href]="pathHelper.versionShowPath(version.id)"
+ [textContent]="version.name"
+ target="_blank">
+ </a>
+ </h2>
+ <span class="op-version-board-header--info-row -italic -small-font"> {{version.endDate}} </span>
+ </div>
+}
diff --git a/frontend/src/app/features/boards/board/board-list/board-list-menu.component.html b/frontend/src/app/features/boards/board/board-list/board-list-menu.component.html
index 22966a2428a..4f20f1d5090 100644
--- a/frontend/src/app/features/boards/board/board-list/board-list-menu.component.html
+++ b/frontend/src/app/features/boards/board/board-list/board-list-menu.component.html
@@ -1,5 +1,7 @@
-<ng-container class="board-list--more-menu" *ngIf="canDelete()">
- <icon-triggered-context-menu
- [menuItemsFactory]="menuItems">
- </icon-triggered-context-menu>
-</ng-container>
+@if (canDelete()) {
+ <ng-container class="board-list--more-menu">
+ <icon-triggered-context-menu
+ [menuItemsFactory]="menuItems">
+ </icon-triggered-context-menu>
+ </ng-container>
+}
diff --git a/frontend/src/app/features/boards/board/board-list/board-list.component.html b/frontend/src/app/features/boards/board/board-list/board-list.component.html
index 6d27cc435c8..e3913af6e81 100644
--- a/frontend/src/app/features/boards/board/board-list/board-list.component.html
+++ b/frontend/src/app/features/boards/board/board-list/board-list.component.html
@@ -1,77 +1,81 @@
<div #loadingIndicator
- [attr.data-query-name]="listName"
- class="op-board-list loading-indicator--location"
- data-test-selector="op-board-list"
- data-tour-selector="op-board-list"
- [ngClass]="{ '-action-list': board.isAction }">
- <ng-container *ngIf="query">
-
- <div *ngIf="board.isAction"
- class="op-board-list--action-bar"
- [ngClass]="actionResourceClass">
- </div>
-
+ [attr.data-query-name]="listName"
+ class="op-board-list loading-indicator--location"
+ data-test-selector="op-board-list"
+ data-tour-selector="op-board-list"
+ [ngClass]="{ '-action-list': board.isAction }">
+ @if (query) {
+ @if (board.isAction) {
+ <div
+ class="op-board-list--action-bar"
+ [ngClass]="actionResourceClass">
+ </div>
+ }
<div class="op-board-list--header"
- data-test-selector="op-board-list--header">
- <ndc-dynamic *ngIf="headerComponent"
- [ndcDynamicComponent]="headerComponent"
- [ndcDynamicInputs]="{ resource: actionResource }">
- </ndc-dynamic>
+ data-test-selector="op-board-list--header">
+ @if (headerComponent) {
+ <ndc-dynamic
+ [ndcDynamicComponent]="headerComponent"
+ [ndcDynamicInputs]="{ resource: actionResource }">
+ </ndc-dynamic>
+ }
<h3 class="toolbar-title--container">
- <editable-toolbar-title *ngIf="!headerComponent"
- [title]="query.name"
- [smallHeader]="true"
- [inFlight]="inFlight"
- (onSave)="renameQuery(query, $event)"
- [editable]="canRename"
- [initialFocus]="initiallyFocused"
- class="-small">
- </editable-toolbar-title>
+ @if (!headerComponent) {
+ <editable-toolbar-title
+ [title]="query.name"
+ [smallHeader]="true"
+ [inFlight]="inFlight"
+ (onSave)="renameQuery(query, $event)"
+ [editable]="canRename"
+ [initialFocus]="initiallyFocused"
+ class="-small">
+ </editable-toolbar-title>
+ }
</h3>
<board-list-menu class="op-board-list--menu"
- data-test-selector="op-board-list--menu"
- [board]="board"
- (onRemove)="deleteList()">
+ data-test-selector="op-board-list--menu"
+ [board]="board"
+ (onRemove)="deleteList()">
</board-list-menu>
</div>
-
<div class="op-board-list--query-container drop-zone"
- [ngClass]="{ '-with-create-button': board.isAction || showAddButton }">
+ [ngClass]="{ '-with-create-button': board.isAction || showAddButton }">
<div class="op-board-list--button-container">
- <button [title]="text.addCard"
- *ngIf="showAddButton"
- data-test-selector="op-board-list--card-dropdown-add-button"
- data-tour-selector="op-board-list--card-dropdown-add-button"
- class="op-board-list--add-button op-board-list--card-dropdown-button button"
- op-addCardDropdown>
- <op-icon icon-classes="icon-small icon-add"></op-icon>
- </button>
+ @if (showAddButton) {
+ <button [title]="text.addCard"
+ data-test-selector="op-board-list--card-dropdown-add-button"
+ data-tour-selector="op-board-list--card-dropdown-add-button"
+ class="op-board-list--add-button op-board-list--card-dropdown-button button"
+ op-addCardDropdown>
+ <op-icon icon-classes="icon-small icon-add"></op-icon>
+ </button>
+ }
</div>
-
<wp-card-view [dragOutOfHandler]="canDragOutOfHandler"
- [dragInto]="canDragInto"
- [workPackageAddedHandler]="workPackageAddedHandler"
- [cardsRemovable]="board.isFree && canDragOutOf"
- [showInfoButton]="true"
- [highlightingMode]="board.highlightingMode"
- [showStatusButton]="showCardStatusButton()"
- (itemClicked)="openFullViewOnDoubleClick($event)"
- (stateLinkClicked)="openStateLink($event)">
-
+ [dragInto]="canDragInto"
+ [workPackageAddedHandler]="workPackageAddedHandler"
+ [cardsRemovable]="board.isFree && canDragOutOf"
+ [showInfoButton]="true"
+ [highlightingMode]="board.highlightingMode"
+ [showStatusButton]="showCardStatusButton()"
+ (itemClicked)="openFullViewOnDoubleClick($event)"
+ (stateLinkClicked)="openStateLink($event)">
</wp-card-view>
</div>
- </ng-container>
- <div class="op-board-list--toaster-box -error" *ngIf="loadingError">
- <p>
- <span [textContent]="errorMessage"></span>
- &ngsp;
- <buton
- type="button"
- class="spot-link"
- (click)="onRemove.emit()"
- >
- <span [textContent]="text.click_to_remove"></span>
- </buton>
- </p>
- </div>
+ }
+ @if (loadingError) {
+ <div class="op-board-list--toaster-box -error">
+ <p>
+ <span [textContent]="errorMessage"></span>
+ &ngsp;
+ <buton
+ type="button"
+ class="spot-link"
+ (click)="onRemove.emit()"
+ >
+ <span [textContent]="text.click_to_remove"></span>
+ </buton>
+ </p>
+ </div>
+ }
</div>
diff --git a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html
index d9f673fb6db..8c698f6a5ce 100644
--- a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html
+++ b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html
@@ -1,47 +1,55 @@
-<ng-container *ngIf="(board$ | async) as board">
- <op-enterprise-banner-frame
- *ngIf="!board.isFree"
- class="boards-list--enterprise-banner"
- feature="board_view"
- [dismissable]="true"
- ></op-enterprise-banner-frame>
- <div
- *ngIf="available"
- class="boards-list--container"
- [ngClass]="{ '-free' : board.isFree }"
- #container
- cdkDropList
- [cdkDropListDisabled]="!board.editable"
- cdkDropListOrientation="horizontal"
- (cdkDropListDropped)="moveList(board, $event)"
- >
- <div *ngFor="let boardWidget of boardWidgets; trackBy:trackByQueryId"
- class="boards-list--item"
- cdkDrag
- [cdkDragData]="boardWidget"
- >
- <span *ngIf="board.editable"
- class="boards-list-item-handle icon icon-drag-handle"
+@if ((board$ | async); as board) {
+ @if (!board.isFree) {
+ <op-enterprise-banner-frame
+ class="boards-list--enterprise-banner"
+ feature="board_view"
+ [dismissable]="true"
+ ></op-enterprise-banner-frame>
+ }
+ @if (available) {
+ <div
+ class="boards-list--container"
+ [ngClass]="{ '-free' : board.isFree }"
+ #container
+ cdkDropList
+ [cdkDropListDisabled]="!board.editable"
+ cdkDropListOrientation="horizontal"
+ (cdkDropListDropped)="moveList(board, $event)"
+ >
+ @for (boardWidget of boardWidgets; track trackByQueryId($index, boardWidget)) {
+ <div
+ class="boards-list--item"
+ cdkDrag
+ [cdkDragData]="boardWidget"
+ >
+ @if (board.editable) {
+ <span
+ class="boards-list-item-handle icon icon-drag-handle"
cdkDragHandle></span>
- <board-list [resource]="boardWidget"
- [board]="board"
- (onRemove)="removeList(board, boardWidget)"
- (visibilityChange)="changeVisibilityOfList(board, boardWidget, $event)">
- </board-list>
- </div>
- <span *ngIf="showHiddenListWarning"
+ }
+ <board-list [resource]="boardWidget"
+ [board]="board"
+ (onRemove)="removeList(board, boardWidget)"
+ (visibilityChange)="changeVisibilityOfList(board, boardWidget, $event)">
+ </board-list>
+ </div>
+ }
+ @if (showHiddenListWarning) {
+ <span
class="boards-list--tooltip tooltip--right"
[attr.data-tooltip]="text.hiddenListWarning">
- <i class="icon icon-attention"></i>
- </span>
-
- <div class="boards-list--add-item -no-text-select"
- *ngIf="board.editable"
- (click)="addList(board)">
- <div class="boards-list--add-item-text">
- <op-icon icon-classes="icon-add icon-context"></op-icon>
- <span [textContent]="text.addList"></span>
- </div>
+ <i class="icon icon-attention"></i>
+ </span>
+ }
+ @if (board.editable) {
+ <div class="boards-list--add-item -no-text-select"
+ (click)="addList(board)">
+ <div class="boards-list--add-item-text">
+ <op-icon icon-classes="icon-add icon-context"></op-icon>
+ <span [textContent]="text.addList"></span>
+ </div>
+ </div>
+ }
</div>
- </div>
-</ng-container>
+ }
+}
diff --git a/frontend/src/app/features/calendar/te-calendar/te-calendar.template.html b/frontend/src/app/features/calendar/te-calendar/te-calendar.template.html
index d4e00f1cfc8..3e2fc0f2bcd 100644
--- a/frontend/src/app/features/calendar/te-calendar/te-calendar.template.html
+++ b/frontend/src/app/features/calendar/te-calendar/te-calendar.template.html
@@ -3,26 +3,27 @@
class="te-calendar--container loading-indicator--location"
[attr.data-indicator-name]="'table'"
style="position: relative"
->
- <button
- *ngIf="memoizedCreateAllowed"
- class="button te-calendar--create-button"
- [attr.aria-label]="text.logTime"
- (click)="addEventToday()"
>
- <op-icon icon-classes="button--icon icon-log_time"></op-icon>
- <span
- class="button--text"
- [textContent]="text.logTime"
- aria-hidden="true"
- ></span>
- </button>
- <ng-container
- *ngIf="(calendarOptions$ | async) as calendarOptions">
- <full-calendar
- #ucCalendar
- *ngIf="calendarOptions"
- [options]="calendarOptions"
- ></full-calendar>
- </ng-container>
+ @if (memoizedCreateAllowed) {
+ <button
+ class="button te-calendar--create-button"
+ [attr.aria-label]="text.logTime"
+ (click)="addEventToday()"
+ >
+ <op-icon icon-classes="button--icon icon-log_time"></op-icon>
+ <span
+ class="button--text"
+ [textContent]="text.logTime"
+ aria-hidden="true"
+ ></span>
+ </button>
+ }
+ @if ((calendarOptions$ | async); as calendarOptions) {
+ @if (calendarOptions) {
+ <full-calendar
+ #ucCalendar
+ [options]="calendarOptions"
+ ></full-calendar>
+ }
+ }
</div>
diff --git a/frontend/src/app/features/calendar/wp-calendar/wp-calendar.template.html b/frontend/src/app/features/calendar/wp-calendar/wp-calendar.template.html
index cbb2ce9b751..2e6e2157fd7 100644
--- a/frontend/src/app/features/calendar/wp-calendar/wp-calendar.template.html
+++ b/frontend/src/app/features/calendar/wp-calendar/wp-calendar.template.html
@@ -1,18 +1,18 @@
<div class="op-wp-calendar"
- data-test-selector="op-wp-calendar"
- (contextmenu)="openContextMenu($event)"
- [attr.data-indicator-name]="'table'">
- <ng-container
- *ngIf="(calendarOptions$ | async) as calendarOptions"
- >
- <full-calendar
- #ucCalendar
- *ngIf="calendarOptions"
- [options]="calendarOptions"
- ></full-calendar>
- </ng-container>
+ data-test-selector="op-wp-calendar"
+ (contextmenu)="openContextMenu($event)"
+ [attr.data-indicator-name]="'table'">
+ @if ((calendarOptions$ | async); as calendarOptions) {
+ @if (calendarOptions) {
+ <full-calendar
+ #ucCalendar
+ [options]="calendarOptions"
+ ></full-calendar>
+ }
+ }
+ @if (static) {
<div
- *ngIf="static"
- [textContent]="workPackagesCalendar.tooManyResultsText"
- class="op-wp-calendar--notification"></div>
+ [textContent]="workPackagesCalendar.tooManyResultsText"
+ class="op-wp-calendar--notification"></div>
+ }
</div>
diff --git a/frontend/src/app/features/enterprise/enterprise-banner-frame.component.html b/frontend/src/app/features/enterprise/enterprise-banner-frame.component.html
index 25e1af41340..5f967f306af 100644
--- a/frontend/src/app/features/enterprise/enterprise-banner-frame.component.html
+++ b/frontend/src/app/features/enterprise/enterprise-banner-frame.component.html
@@ -1,6 +1,7 @@
-<turbo-frame
- [id]="frameID"
- *ngIf="visible"
- [src]="frameURL"
->
-</turbo-frame>
+@if (visible) {
+ <turbo-frame
+ [id]="frameID"
+ [src]="frameURL"
+ >
+ </turbo-frame>
+}
diff --git a/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.html b/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.html
index 2445ed8682a..dd920f0e75a 100644
--- a/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.html
+++ b/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.html
@@ -1,8 +1,9 @@
- <ng-container *ngIf="(unreadCount$ | async) as unreadCount">
+@if ((unreadCount$ | async); as unreadCount) {
+ @if (unreadCount !== 0) {
<span
- *ngIf="unreadCount !== 0"
[ngClass]="{ 'op-ian-bell--indicator': true, 'op-ian-bell--indicator_max': unreadCount > bellDisplayLimit }"
data-test-selector="op-ian-notifications-count"
[innerHTML]="unreadCountText$ | async"
></span>
- </ng-container>
+ }
+}
diff --git a/frontend/src/app/features/in-app-notifications/center/in-app-notification-center.component.html b/frontend/src/app/features/in-app-notifications/center/in-app-notification-center.component.html
index a8fc623d1df..0602b217436 100644
--- a/frontend/src/app/features/in-app-notifications/center/in-app-notification-center.component.html
+++ b/frontend/src/app/features/in-app-notifications/center/in-app-notification-center.component.html
@@ -2,62 +2,61 @@
<div
class="op-ian-center--content"
[class.op-ian-center--content_empty]="(loading$ | async) === true || (hasNotifications$ | async) === false"
- >
- <ng-container *ngIf="(loading$ | async) === false; else loading">
- <ng-container *ngIf="(hasNotifications$ | async); else noResults">
+ >
+ @if ((loading$ | async) === false) {
+ @if ((hasNotifications$ | async)) {
<cdk-virtual-scroll-viewport
- itemSize="100"
- class="op-ian-center--viewport"
- >
+ itemSize="100"
+ class="op-ian-center--viewport"
+ >
<op-in-app-notification-entry
- *cdkVirtualFor="let records of notifications$ | async; trackBy: trackNotificationGroups; templateCacheSize: 0"
- class="op-ian-item"
- [class.op-ian-item_expanded]="records[0].expanded"
- [class.op-ian-item_read]="records[0].readIAN === true"
- [class.op-ian-item_selected]="(selectedWorkPackage$ | async) === idFromLink(records[0]._links.resource.href)"
- [notification]="records[0]"
- [aggregatedNotifications]="records"
- attr.data-test-selector="op-ian-notification-item-{{records[0].id}}"
- [attr.data-qa-ian-read]="records[0].readIAN === true || undefined"
- [attr.data-qa-ian-selected]="(selectedWorkPackage$ | async) === idFromLink(records[0]._links.resource.href)"
+ *cdkVirtualFor="let records of notifications$ | async; trackBy: trackNotificationGroups; templateCacheSize: 0"
+ class="op-ian-item"
+ [class.op-ian-item_expanded]="records[0].expanded"
+ [class.op-ian-item_read]="records[0].readIAN === true"
+ [class.op-ian-item_selected]="(selectedWorkPackage$ | async) === idFromLink(records[0]._links.resource.href)"
+ [notification]="records[0]"
+ [aggregatedNotifications]="records"
+ attr.data-test-selector="op-ian-notification-item-{{records[0].id}}"
+ [attr.data-qa-ian-read]="records[0].readIAN === true || undefined"
+ [attr.data-qa-ian-selected]="(selectedWorkPackage$ | async) === idFromLink(records[0]._links.resource.href)"
></op-in-app-notification-entry>
</cdk-virtual-scroll-viewport>
- </ng-container>
- <ng-template #noResults>
+ } @else {
<div class="op-ian-center--loading-indicator">
- <img [src]="image.no_notification" class="op-ian-center-loading-image"/>
- <p class="op-ian-center-loading-text">
- <span [textContent]="noNotificationText((totalCount$ | async) > 0)"></span>
-
- </p>
- <span
- *ngIf="(totalCount$ | async) > 0"
- [textContent]="text.no_results.with_current_filter"
- ></span>
- <ng-container *ngIf="(totalCount$ | async) === 0">
+ <img [src]="image.no_notification" class="op-ian-center-loading-image"/>
+ <p class="op-ian-center-loading-text">
+ <span [textContent]="noNotificationText((totalCount$ | async) > 0)"></span>
+ </p>
+ @if ((totalCount$ | async) > 0) {
+ <span
+ [textContent]="text.no_results.with_current_filter"
+ ></span>
+ }
+ @if ((totalCount$ | async) === 0) {
<p>
<span [textContent]="text.no_results.at_all"></span>
<br/>
<span [innerHTML]="text.change_notification_settings"></span>
</p>
- </ng-container>
- </div>
- </ng-template>
- </ng-container>
- <ng-template #loading>
+ }
+ </div>
+ }
+ } @else {
<div class="op-ian-center--loading-indicator">
<img [src]="image.loading"
class="op-ian-center-loading-image"
data-test-selector="op-ian-center--loading-indicator"/>
</div>
- </ng-template>
+ }
</div>
<div class="op-ian-center--footer">
- <p
- class="op-ian-center--max-warning"
- *ngIf="hasMoreThanPageSize$ | async"
- [textContent]="totalCountWarning$ | async"
- >
- </p>
+ @if (hasMoreThanPageSize$ | async) {
+ <p
+ class="op-ian-center--max-warning"
+ [textContent]="totalCountWarning$ | async"
+ >
+ </p>
+ }
</div>
</div>
diff --git a/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.html b/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.html
index 1d6adf2d0b3..7d70fabbc23 100644
--- a/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.html
+++ b/frontend/src/app/features/in-app-notifications/entry/actors-line/in-app-notification-actors-line.component.html
@@ -1,9 +1,11 @@
<op-in-app-notification-relative-time
[notification]="notification"
-/>
+ />
<div class="op-ian-actors--container">
- <ng-container *ngFor="let actor of actors | slice:0:3; let idx = index; let last = last">
- <span *ngIf="last && actors.length > 1 && actors.length < 4" textContent=" {{ text.and }} "></span>
+ @for (actor of actors | slice:0:3; track actor; let idx = $index; let last = $last) {
+ @if (last && actors.length > 1 && actors.length < 4) {
+ <span textContent=" {{ text.and }} "></span>
+ }
<op-principal
class="op-ian-item--actors"
[principal]="actor"
@@ -11,7 +13,11 @@
[hideAvatar]="true"
[link]="!deviceService.isMobile"
></op-principal>
- <span *ngIf="(idx === 0 && actors.length > 2) || (idx === 1 && actors.length > 3)" [textContent]="', '"></span>
- </ng-container>
- <span *ngIf="actors.length > 3"> {{ text_for_additional_authors(actors.length - 3) }}</span>
+ @if ((idx === 0 && actors.length > 2) || (idx === 1 && actors.length > 3)) {
+ <span [textContent]="', '"></span>
+ }
+ }
+ @if (actors.length > 3) {
+ <span> {{ text_for_additional_authors(actors.length - 3) }}</span>
+ }
</div>
diff --git a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.html b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.html
index 453480b919e..5b39f3d3d22 100644
--- a/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.html
+++ b/frontend/src/app/features/in-app-notifications/entry/in-app-notification-entry.component.html
@@ -2,15 +2,14 @@
class="op-ian-item--row"
(click)="onClick()"
(dblclick)="onDoubleClick()"
->
- <ng-container *ngIf="workPackage$ && (workPackage$ | async) as workPackage; else workPackageLoading">
+ >
+ @if (workPackage$ && (workPackage$ | async); as workPackage) {
<div
class="op-ian-item--top-line"
- >
+ >
<div class="op-ian-item--status">
<op-in-app-notification-status [status]="workPackage.status"></op-in-app-notification-status>
</div>
-
<a
class="op-ian-item--work-package-id-link spot-link"
[class.spot-link_inactive]="isMobile()"
@@ -18,110 +17,113 @@
uiSref="work-packages.show"
[uiParams]="{workPackageId: workPackage.id, projects: null, projectPath: null}"
[textContent]="'#' + workPackage.id"
- >
+ >
</a>
- <div
- *ngIf="project"
- class="op-ian-item--project"
- >
- - <a
- class="op-ian-item--project-link"
- [class.spot-link_inactive]="isMobile()"
- [href]="project.showUrl"
- [textContent]="project.title"
- (click)="projectClicked($event)"
- target="_blank"
- ></a> -
+ @if (project) {
+ <div
+ class="op-ian-item--project"
+ >
+ - <a
+ class="op-ian-item--project-link"
+ [class.spot-link_inactive]="isMobile()"
+ [href]="project.showUrl"
+ [textContent]="project.title"
+ (click)="projectClicked($event)"
+ target="_blank"
+ ></a> -
</div>
-
- <div
- class="op-ian-item--reason-wrapper"
- >
- <span
- class="op-ian-item--reason"
- *ngFor="let item of translatedReasons | keyvalue; let first = first; let last = last"
+ }
+ <div
+ class="op-ian-item--reason-wrapper"
>
- {{ item.key }}<ng-container *ngIf="!last">, </ng-container>
+ @for (item of translatedReasons | keyvalue; track item; let first = $first; let last = $last) {
+ <span
+ class="op-ian-item--reason"
+ >
+ {{ item.key }}@if (!last) {
+ ,
+ }
</span>
- </div>
-
- <span
- *ngIf="!notification.readIAN"
- class="op-ian-item--reason-count"
- [textContent]="aggregatedNotifications.length"
- ></span>
-
- <div class="op-ian-item--buttons">
- <i
- *ngIf="!notification.readIAN"
- data-test-selector="mark-as-read-button"
- class="op-ian-item--button icon-mark-read"
- [title]="text.mark_as_read"
- (click)="markAsRead($event, aggregatedNotifications)"
- tabindex="0"
- >
- </i>
- <i
- class="op-ian-item--button op-ian-item--button_shown-on-focus icon-info1"
- (keydown.enter)="showDetails()"
- tabindex="0"
+ }
+ </div>
+ @if (!notification.readIAN) {
+ <span
+ class="op-ian-item--reason-count"
+ [textContent]="aggregatedNotifications.length"
+ ></span>
+ }
+ <div class="op-ian-item--buttons">
+ @if (!notification.readIAN) {
+ <i
+ data-test-selector="mark-as-read-button"
+ class="op-ian-item--button icon-mark-read"
+ [title]="text.mark_as_read"
+ (click)="markAsRead($event, aggregatedNotifications)"
+ tabindex="0"
>
- </i>
- </div>
- </div>
-
- <div
- class="op-ian-item--middle-line"
- >
- <span
- [ngClass]="'op-ian-item--work-package-type __hl_inline_type_' + workPackage.type.id"
- [textContent]="workPackage.type.name">
- </span>
- <span
- [textContent]="workPackage.subject"
- class="op-ian-item--work-package-subject"
- [class.-read]="notification.readIAN"
+ </i>
+ }
+ <i
+ class="op-ian-item--button op-ian-item--button_shown-on-focus icon-info1"
+ (keydown.enter)="showDetails()"
+ tabindex="0"
>
- </span>
- </div>
-
- <div
- class="op-ian-item--bottom-line"
+ </i>
+ </div>
+</div>
+<div
+ class="op-ian-item--middle-line"
+ >
+ <span
+ [ngClass]="'op-ian-item--work-package-type __hl_inline_type_' + workPackage.type.id"
+ [textContent]="workPackage.type.name">
+ </span>
+ <span
+ [textContent]="workPackage.subject"
+ class="op-ian-item--work-package-subject"
+ [class.-read]="notification.readIAN"
>
- <op-in-app-notification-reminder-alert
- *ngIf="hasReminderAlert"
- [aggregatedNotifications]="aggregatedNotifications"
+ </span>
+</div>
+<div
+ class="op-ian-item--bottom-line"
+ >
+ @if (hasReminderAlert) {
+ <op-in-app-notification-reminder-alert
+ [aggregatedNotifications]="aggregatedNotifications"
/>
- <ng-container *ngIf="!hasReminderAlert">
- <op-in-app-notification-date-alert
- *ngIf="showDateAlert"
- [aggregatedNotifications]="aggregatedNotifications"
- ></op-in-app-notification-date-alert>
- <op-in-app-notification-actors-line
- *ngIf="!showDateAlert"
- [notification]="notification"
- [aggregatedNotifications]="aggregatedNotifications"
- ></op-in-app-notification-actors-line>
- </ng-container>
- </div>
- </ng-container>
- <ng-template #workPackageLoading>
- <div class="op-ian-item--loading">
+ }
+ @if (!hasReminderAlert) {
+ @if (showDateAlert) {
+ <op-in-app-notification-date-alert
+ [aggregatedNotifications]="aggregatedNotifications"
+ ></op-in-app-notification-date-alert>
+ }
+ @if (!showDateAlert) {
+ <op-in-app-notification-actors-line
+ [notification]="notification"
+ [aggregatedNotifications]="aggregatedNotifications"
+ ></op-in-app-notification-actors-line>
+ }
+ }
+</div>
+} @else {
+ <div class="op-ian-item--loading">
+ @if (workPackage$) {
<op-content-loader
- *ngIf="workPackage$"
class="op-ian-item--loading-indicator"
viewBox="0 0 200 20"
- >
+ >
<svg:rect x="0" y="0" width="100%" height="5" rx="1" />
<svg:rect x="0" y="7" width="100%" height="5" rx="1" />
<svg:rect x="0" y="14" width="80%" height="5" rx="1" />
</op-content-loader>
-
- <span class="op-ian-item--reason-count"></span>
- <div class="op-ian-item--buttons">
- <i class="op-ian-item--button icon-mark-read">
- </i>
- </div>
+ }
+ <span class="op-ian-item--reason-count"></span>
+ <div class="op-ian-item--buttons">
+ <i class="op-ian-item--button icon-mark-read">
+ </i>
</div>
- </ng-template>
+ </div>
+}
</div>
diff --git a/frontend/src/app/features/in-app-notifications/entry/reminder-alert/in-app-notification-reminder-alert.component.html b/frontend/src/app/features/in-app-notifications/entry/reminder-alert/in-app-notification-reminder-alert.component.html
index 14ad39483e6..7512ade4381 100644
--- a/frontend/src/app/features/in-app-notifications/entry/reminder-alert/in-app-notification-reminder-alert.component.html
+++ b/frontend/src/app/features/in-app-notifications/entry/reminder-alert/in-app-notification-reminder-alert.component.html
@@ -1,12 +1,14 @@
-<op-in-app-notification-date-alert
- *ngIf="hasDateAlert"
- [aggregatedNotifications]="dateAlerts">
-</op-in-app-notification-date-alert>
-<op-in-app-notification-relative-time
- *ngIf="!hasDateAlert"
- [notification]="reminderAlert"
- [hasActorByLine]="false">
-</op-in-app-notification-relative-time>
+@if (hasDateAlert) {
+ <op-in-app-notification-date-alert
+ [aggregatedNotifications]="dateAlerts">
+ </op-in-app-notification-date-alert>
+}
+@if (!hasDateAlert) {
+ <op-in-app-notification-relative-time
+ [notification]="reminderAlert"
+ [hasActorByLine]="false">
+ </op-in-app-notification-relative-time>
+}
<span
class="op-ian-reminder-alert--note"
diff --git a/frontend/src/app/features/invite-user-modal/button/invite-user-button.component.html b/frontend/src/app/features/invite-user-modal/button/invite-user-button.component.html
index a398694ffbd..85c6d326a26 100644
--- a/frontend/src/app/features/invite-user-modal/button/invite-user-button.component.html
+++ b/frontend/src/app/features/invite-user-modal/button/invite-user-button.component.html
@@ -1,12 +1,13 @@
-<button
- class="op-select-footer--label"
- type="button"
- (click)="onAddNewClick($event)"
- *ngIf="canInviteUsersToProject$ | async"
->
- <span class="icon-context">
- <op-icon icon-classes="icon-user-plus icon-context"></op-icon>
- {{text.button}}
- </span>
-</button>
+@if (canInviteUsersToProject$ | async) {
+ <button
+ class="op-select-footer--label"
+ type="button"
+ (click)="onAddNewClick($event)"
+ >
+ <span class="icon-context">
+ <op-icon icon-classes="icon-user-plus icon-context"></op-icon>
+ {{text.button}}
+ </span>
+ </button>
+}
diff --git a/frontend/src/app/features/invite-user-modal/invite-user.component.html b/frontend/src/app/features/invite-user-modal/invite-user.component.html
index a966f532ed7..c2af72d7306 100644
--- a/frontend/src/app/features/invite-user-modal/invite-user.component.html
+++ b/frontend/src/app/features/invite-user-modal/invite-user.component.html
@@ -1,61 +1,66 @@
-<div
- class="spot-modal"
- *ngIf="loading"
-></div>
-<op-ium-project-selection
- *ngIf="!loading && step === Steps.ProjectSelection"
- [project]="project"
- [type]="type"
- (save)="onProjectSelectionSave($event)"
- (close)="closeMe()"
- tabindex="0"
- cdkFocusInitial
- cdkTrapFocus
- [cdkTrapFocusAutoCapture]="true"
-></op-ium-project-selection>
+@if (loading) {
+ <div
+ class="spot-modal"
+ ></div>
+}
+@if (!loading && step === Steps.ProjectSelection) {
+ <op-ium-project-selection
+ [project]="project"
+ [type]="type"
+ (save)="onProjectSelectionSave($event)"
+ (close)="closeMe()"
+ tabindex="0"
+ cdkFocusInitial
+ cdkTrapFocus
+ [cdkTrapFocusAutoCapture]="true"
+ ></op-ium-project-selection>
+}
-<op-ium-principal
- *ngIf="!loading && step === Steps.Principal"
- [project]="project"
- [roleData]="role"
- [messageData]="message"
- [principalData]="principalData"
- [type]="type"
- (save)="onPrincipalSave($event)"
- (back)="goTo(Steps.ProjectSelection)"
- (close)="closeMe()"
- tabindex="0"
- cdkFocusInitial
- cdkTrapFocus
- [cdkTrapFocusAutoCapture]="true"
-></op-ium-principal>
+@if (!loading && step === Steps.Principal) {
+ <op-ium-principal
+ [project]="project"
+ [roleData]="role"
+ [messageData]="message"
+ [principalData]="principalData"
+ [type]="type"
+ (save)="onPrincipalSave($event)"
+ (back)="goTo(Steps.ProjectSelection)"
+ (close)="closeMe()"
+ tabindex="0"
+ cdkFocusInitial
+ cdkTrapFocus
+ [cdkTrapFocusAutoCapture]="true"
+ ></op-ium-principal>
+}
-<op-ium-summary
- *ngIf="!loading && step === Steps.Summary"
- [project]="project"
- [principalData]="principalData"
- [type]="type"
- [role]="role"
- [message]="message"
- (save)="onSuccessfulSubmission($event)"
- (back)="goTo(Steps.Principal)"
- (close)="closeMe()"
- tabindex="0"
- cdkFocusInitial
- cdkTrapFocus
- [cdkTrapFocusAutoCapture]="true"
-></op-ium-summary>
+@if (!loading && step === Steps.Summary) {
+ <op-ium-summary
+ [project]="project"
+ [principalData]="principalData"
+ [type]="type"
+ [role]="role"
+ [message]="message"
+ (save)="onSuccessfulSubmission($event)"
+ (back)="goTo(Steps.Principal)"
+ (close)="closeMe()"
+ tabindex="0"
+ cdkFocusInitial
+ cdkTrapFocus
+ [cdkTrapFocusAutoCapture]="true"
+ ></op-ium-summary>
+}
-<op-ium-success
- [principal]="principalData.principal"
- [project]="project"
- [type]="type"
- [createdNewPrincipal]="createdNewPrincipal"
- *ngIf="!loading && step === Steps.Success"
- class="spot-modal"
- (close)="closeWithPrincipal()"
- tabindex="0"
- cdkFocusInitial
- cdkTrapFocus
- [cdkTrapFocusAutoCapture]="true"
-></op-ium-success>
+@if (!loading && step === Steps.Success) {
+ <op-ium-success
+ [principal]="principalData.principal"
+ [project]="project"
+ [type]="type"
+ [createdNewPrincipal]="createdNewPrincipal"
+ class="spot-modal"
+ (close)="closeWithPrincipal()"
+ tabindex="0"
+ cdkFocusInitial
+ cdkTrapFocus
+ [cdkTrapFocusAutoCapture]="true"
+ ></op-ium-success>
+}
diff --git a/frontend/src/app/features/invite-user-modal/principal/principal-search.component.html b/frontend/src/app/features/invite-user-modal/principal/principal-search.component.html
index a905438c872..265e34ebe2b 100644
--- a/frontend/src/app/features/invite-user-modal/principal/principal-search.component.html
+++ b/frontend/src/app/features/invite-user-modal/principal/principal-search.component.html
@@ -10,31 +10,33 @@
[compareWith]="compareWith"
bindValue="principal"
#ngselect
->
+ >
<ng-template ng-label-tmp let-item="item">
{{ item.principal?.name || item.name }}
</ng-template>
<ng-template ng-option-tmp let-item="item" let-search="searchTerm">
- <div
- *ngIf="item"
- class="ng-option-label"
- >
- <!--Selectable option-->
- <span
- data-hover-card-trigger-target="trigger"
- [attr.data-hover-card-url]="getHoverCardUrl(item.principal)"
- [ngOptionHighlight]="search">{{ item.principal.name }}</span>
- <span
- class="op-autocompleter__option-principal-email"
- *ngIf="item.principal.email"
- [ngOptionHighlight]="search">{{ item.principal.email }}</span>
-
- <!-- Already a member of the project -->
+ @if (item) {
<div
- *ngIf="item.disabled"
- class="ellipsis">{{ text.alreadyAMember() }}</div>
- </div>
+ class="ng-option-label"
+ >
+ <!--Selectable option-->
+ <span
+ data-hover-card-trigger-target="trigger"
+ [attr.data-hover-card-url]="getHoverCardUrl(item.principal)"
+ [ngOptionHighlight]="search">{{ item.principal.name }}</span>
+ @if (item.principal.email) {
+ <span
+ class="op-autocompleter__option-principal-email"
+ [ngOptionHighlight]="search">{{ item.principal.email }}</span>
+ }
+ <!-- Already a member of the project -->
+ @if (item.disabled) {
+ <div
+ class="ellipsis">{{ text.alreadyAMember() }}</div>
+ }
+ </div>
+ }
</ng-template>
<!--Nothing found -->
@@ -47,17 +49,21 @@
<ng-template ng-tag-tmp>
<!--Invite a new user by email-->
- <div *ngIf="canInviteByEmail$ | async">
- <op-icon icon-classes="icon-mail1 icon-context"></op-icon>
- <b>{{ text.inviteNewUser }}</b>
- {{ input }}
- </div>
+ @if (canInviteByEmail$ | async) {
+ <div>
+ <op-icon icon-classes="icon-mail1 icon-context"></op-icon>
+ <b>{{ text.inviteNewUser }}</b>
+ {{ input }}
+ </div>
+ }
<!--Create a new placeholder by name-->
- <div *ngIf="canCreateNewPlaceholder$ | async">
- <op-icon icon-classes="icon-add icon-context"></op-icon>
- <b>{{ text.createNewPlaceholder }}</b>
- {{ input }}
- </div>
+ @if (canCreateNewPlaceholder$ | async) {
+ <div>
+ <op-icon icon-classes="icon-add icon-context"></op-icon>
+ <b>{{ text.createNewPlaceholder }}</b>
+ {{ input }}
+ </div>
+ }
</ng-template>
</ng-select>
diff --git a/frontend/src/app/features/invite-user-modal/principal/principal.component.html b/frontend/src/app/features/invite-user-modal/principal/principal.component.html
index db8f176c28f..32acdea23d7 100644
--- a/frontend/src/app/features/invite-user-modal/principal/principal.component.html
+++ b/frontend/src/app/features/invite-user-modal/principal/principal.component.html
@@ -2,7 +2,7 @@
class="spot-modal"
[formGroup]="principalForm"
(ngSubmit)="onSubmit($event)"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{text.principal.title()}}</div>
<div class="spot-divider"></div>
@@ -11,61 +11,66 @@
<spot-form-field
[label]="textLabel"
required
- >
- <op-ium-principal-search
- *ngIf="!(hasPrincipalSelected && isNewPrincipal)"
- [spotFormBinding]="principalControl"
- [type]="type"
- [project]="project"
- slot="input"
- (createNew)="createNewFromInput($event)"
- ></op-ium-principal-search>
-
- <p
- *ngIf="isNewPrincipal && type === PrincipalType.User"
- slot="input"
>
- <b>{{ text.principal.inviteUser }}</b> {{ principal.name }}
- <button
- type="button"
- class="spot-link"
- (click)="principalControl?.setValue(null)"
- >{{ text.principal.change }}</button>
- </p>
+ @if (!(hasPrincipalSelected && isNewPrincipal)) {
+ <op-ium-principal-search
+ [spotFormBinding]="principalControl"
+ [type]="type"
+ [project]="project"
+ slot="input"
+ (createNew)="createNewFromInput($event)"
+ ></op-ium-principal-search>
+ }
- <p
- *ngIf="isNewPrincipal && type === PrincipalType.Placeholder"
- slot="input"
- >
- <b>{{ text.principal.createNewPlaceholder }}</b> {{ principal.name }}
- <button
- type="button"
- class="spot-link"
- (click)="principalControl?.setValue(null)"
- >{{ text.principal.change }}</button>
- </p>
+ @if (isNewPrincipal && type === PrincipalType.User) {
+ <p
+ slot="input"
+ >
+ <b>{{ text.principal.inviteUser }}</b> {{ principal.name }}
+ <button
+ type="button"
+ class="spot-link"
+ (click)="principalControl?.setValue(null)"
+ >{{ text.principal.change }}</button>
+ </p>
+ }
- <div
- slot="errors"
- class="spot-form-field--error"
- *ngIf="principalControl?.invalid"
- >
- {{ text.principal.required[type] }}
- </div>
+ @if (isNewPrincipal && type === PrincipalType.Placeholder) {
+ <p
+ slot="input"
+ >
+ <b>{{ text.principal.createNewPlaceholder }}</b> {{ principal.name }}
+ <button
+ type="button"
+ class="spot-link"
+ (click)="principalControl?.setValue(null)"
+ >{{ text.principal.change }}</button>
+ </p>
+ }
+
+ @if (principalControl?.invalid) {
+ <div
+ slot="errors"
+ class="spot-form-field--error"
+ >
+ {{ text.principal.required[type] }}
+ </div>
+ }
</spot-form-field>
- <op-dynamic-form
- *ngIf="isNewPrincipal && type === PrincipalType.User && userDynamicFieldConfig.schema"
- [dynamicFormGroup]="dynamicFieldsControl"
- [settings]="userDynamicFieldConfig"
- [formUrl]="apiV3Service.users.form.path"
- [handleSubmit]="false"
- ></op-dynamic-form>
+ @if (isNewPrincipal && type === PrincipalType.User && userDynamicFieldConfig.schema) {
+ <op-dynamic-form
+ [dynamicFormGroup]="dynamicFieldsControl"
+ [settings]="userDynamicFieldConfig"
+ [formUrl]="apiV3Service.users.form.path"
+ [handleSubmit]="false"
+ ></op-dynamic-form>
+ }
<spot-form-field
[label]="text.role.label()"
required
- >
+ >
<op-ium-role-search
[spotFormBinding]="roleControl"
slot="input"
@@ -76,33 +81,33 @@
[innerHtml]="text.role.description()"
></p>
- <div
- slot="errors"
- class="spot-form-field--error"
- *ngIf="roleControl?.invalid"
- >
- {{ text.role.required }}
- </div>
+ @if (roleControl?.invalid) {
+ <div
+ slot="errors"
+ class="spot-form-field--error"
+ >
+ {{ text.role.required }}
+ </div>
+ }
</spot-form-field>
- <spot-form-field
- [label]="text.message.label"
- *ngIf="type !== PrincipalType.Placeholder"
- >
-
- <textarea
- class="op-input op-ium-invite-message-field"
- [formControl]="messageControl"
- slot="input"
- #input>
- </textarea>
-
- <p
- class="spot-form-field--description"
- slot="action"
- [innerHtml]="text.message.description()">
- </p>
- </spot-form-field>
+ @if (type !== PrincipalType.Placeholder) {
+ <spot-form-field
+ [label]="text.message.label"
+ >
+ <textarea
+ class="op-input op-ium-invite-message-field"
+ [formControl]="messageControl"
+ slot="input"
+ #input>
+ </textarea>
+ <p
+ class="spot-form-field--description"
+ slot="action"
+ [innerHtml]="text.message.description()">
+ </p>
+ </spot-form-field>
+ }
</div>
<div class="spot-action-bar">
@@ -111,7 +116,7 @@
type="button"
class="button button_no-margin spot-action-bar--action"
(click)="back.emit()"
- >
+ >
<op-icon icon-classes="button--icon icon-arrow-left1"></op-icon>
{{ text.principal.backButton }}
</button>
diff --git a/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html b/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html
index c22b84e449e..ae7e7e22fc6 100644
--- a/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html
+++ b/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html
@@ -2,7 +2,7 @@
class="spot-modal"
[formGroup]="projectAndTypeForm"
(ngSubmit)="onSubmit($event)"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{text.title}}</div>
<div class="spot-divider"></div>
@@ -11,7 +11,7 @@
<spot-form-field
[label]="text.project.label"
required
- >
+ >
<op-project-autocompleter
slot="input"
formControlName="project"
@@ -20,28 +20,31 @@
appendTo=".spot-modal-overlay"
></op-project-autocompleter>
- <div
- slot="action"
- *ngIf="projectControl.errors?.lackingPermission"
- >
- {{ text.project.lackingPermissionInfo }}
- </div>
+ @if (projectControl.errors?.lackingPermission) {
+ <div
+ slot="action"
+ >
+ {{ text.project.lackingPermissionInfo }}
+ </div>
+ }
- <div
- slot="errors"
- class="spot-form-field--error"
- *ngIf="projectControl.errors?.required"
- >
- {{ text.project.required }}
- </div>
+ @if (projectControl.errors?.required) {
+ <div
+ slot="errors"
+ class="spot-form-field--error"
+ >
+ {{ text.project.required }}
+ </div>
+ }
- <div
- slot="errors"
- class="spot-form-field--error"
- *ngIf="projectControl.errors?.lackingPermission"
- >
- {{ text.project.lackingPermission }}
- </div>
+ @if (projectControl.errors?.lackingPermission) {
+ <div
+ slot="errors"
+ class="spot-form-field--error"
+ >
+ {{ text.project.lackingPermission }}
+ </div>
+ }
</spot-form-field>
<spot-form-field>
@@ -51,15 +54,16 @@
slot="input"
></op-option-list>
- <div
- *ngIf="projectAndTypeForm?.dirty && typeControl?.invalid"
- class="spot-form-field--errors"
- slot="errors"
- >
- <div class="spot-form-field--error">
- {{ text.type.required }}
+ @if (projectAndTypeForm?.dirty && typeControl?.invalid) {
+ <div
+ class="spot-form-field--errors"
+ slot="errors"
+ >
+ <div class="spot-form-field--error">
+ {{ text.type.required }}
+ </div>
</div>
- </div>
+ }
</spot-form-field>
</div>
diff --git a/frontend/src/app/features/invite-user-modal/summary/summary.component.html b/frontend/src/app/features/invite-user-modal/summary/summary.component.html
index de8aff04204..a36d6035bf1 100644
--- a/frontend/src/app/features/invite-user-modal/summary/summary.component.html
+++ b/frontend/src/app/features/invite-user-modal/summary/summary.component.html
@@ -2,7 +2,7 @@
name="sendUserInviteForm"
(submit)="onSubmit($event)"
class="op-ium-summary spot-modal"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{text.title()}}</div>
<div class="spot-divider"></div>
@@ -21,12 +21,13 @@
<p slot="input" class="spot-body-small op-ium-summary--details">{{ role.name }}</p>
</spot-form-field>
- <spot-form-field
- [label]="text.messageLabel"
- *ngIf="type !== PrincipalType.Placeholder && message"
- >
- <p slot="input" class="spot-body-small op-ium-summary--message">{{ message }}</p>
- </spot-form-field>
+ @if (type !== PrincipalType.Placeholder && message) {
+ <spot-form-field
+ [label]="text.messageLabel"
+ >
+ <p slot="input" class="spot-body-small op-ium-summary--message">{{ message }}</p>
+ </spot-form-field>
+ }
</div>
<div class="spot-action-bar">
diff --git a/frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.html b/frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.html
index 9180a9c999b..133f80107de 100644
--- a/frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.html
+++ b/frontend/src/app/features/team-planner/team-planner/add-work-packages/add-existing-pane.component.html
@@ -3,24 +3,20 @@
(ngModelChange)="searchString$.next($event)"
data-test-selector="op-add-existing-pane--search-input"
[placeholder]="text.placeholder"
->
+ >
<span
slot="before"
class="spot-icon spot-icon_search"
></span>
</spot-text-field>
-<ng-container
- *ngIf="(isLoading$ | async) === false; else loadingTemplate"
->
- <ng-container
- *ngIf="(isEmpty$ | async) === false; else emptyTemplate"
- >
+@if ((isLoading$ | async) === false) {
+ @if ((isEmpty$ | async) === false) {
<div
#container
class="op-add-existing-pane--results"
- >
- <ng-container *ngFor="let wp of currentWorkPackages$ | async">
+ >
+ @for (wp of currentWorkPackages$ | async; track wp) {
<wp-single-card
[workPackage]="wp"
[selectedWhenOpen]="true"
@@ -33,33 +29,31 @@
(cardClicked)="workPackagesCalendar.onCardClicked($event)"
(cardDblClicked)="workPackagesCalendar.onCardDblClicked($event)"
></wp-single-card>
- </ng-container>
+ }
</div>
- </ng-container>
-
- <ng-template #emptyTemplate>
+ } @else {
<div
class="op-add-existing-pane--empty-state"
data-test-selector="op-add-existing-pane--empty-state"
- >
- <img
- *ngIf="(noResultsFound$ | async)?.showImage"
- [src]="image.empty_state" class="op-add-existing-pane--empty-state-image"/>
+ >
+ @if ((noResultsFound$ | async)?.showImage) {
+ <img
+ [src]="image.empty_state" class="op-add-existing-pane--empty-state-image"/>
+ }
<span
[innerHTML]="(noResultsFound$ | async)?.text"
class="op-add-existing-pane--empty-state-text"
></span>
</div>
- </ng-template>
-</ng-container>
-
-<ng-template #loadingTemplate>
+ }
+} @else {
<op-content-loader
class="op-add-existing-pane--loading"
viewBox="0 0 200 44"
- >
+ >
<svg:rect x="0" y="0" width="50%" height="12" rx="1" />
<svg:rect x="0" y="16" width="100%" height="12" rx="1" />
<svg:rect x="0" y="32" width="100%" height="12" rx="1" />
</op-content-loader>
-</ng-template>
+}
+
diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
index 51fe150cd1e..8d928decf7c 100644
--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
@@ -1,10 +1,8 @@
<div
class="op-team-planner"
[ngClass]="{'op-team-planner_with_left_side_pane' : (showAddExistingPane | async)}"
->
- <ng-container
- *ngIf="(calendarOptions$ | async) && !isMobile"
>
+ @if ((calendarOptions$ | async) && !isMobile) {
<button
#addExistingToggle
class="button op-team-planner--add-existing-toggle"
@@ -19,14 +17,13 @@
[textContent]="text.add_existing">
</span>
</button>
-
- <op-add-existing-pane
- *ngIf="(showAddExistingPane | async)"
- class="op-team-planner--add-existing-pane"
- data-test-selector="add-existing-pane"
- >
- </op-add-existing-pane>
-
+ @if ((showAddExistingPane | async)) {
+ <op-add-existing-pane
+ class="op-team-planner--add-existing-pane"
+ data-test-selector="add-existing-pane"
+ >
+ </op-add-existing-pane>
+ }
<button
type="button"
class="button op-team-planner--view-select-dropdown"
@@ -36,158 +33,158 @@
(viewSelected)="switchView($event)"
data-test-selector="op-team-planner--view-select-dropdown">
<span class="button--text ellipsis"
- [textContent]="currentViewTitle"
- aria-hidden="true"></span>
+ [textContent]="currentViewTitle"
+ aria-hidden="true"></span>
<op-icon icon-classes="button--icon icon-small icon-pulldown hidden-for-mobile"></op-icon>
</button>
- </ng-container>
+ }
<div
class="op-team-planner--calendar-pane"
data-test-selector="op-team-planner--calendar-pane"
data-tour-selector="op-team-planner--calendar-pane"
- >
- <ng-container
- *ngIf="(calendarOptions$ | async) as calendarOptions"
>
-
- <full-calendar
- #ucCalendar
- *ngIf="calendarOptions"
- [options]="calendarOptions"
- class="op-team-planner--calendar fc-scroller"
- [ngClass]="{'op-team-planner--calendar_empty': (isEmpty$ | async)}"
- >
-
- <ng-template #resourceLabelContent let-resource="$implicit.resource">
- <div
- *ngIf="resource && resource.extendedProps.principal"
- class="tp-assignee"
+ @if ((calendarOptions$ | async); as calendarOptions) {
+ @if (calendarOptions) {
+ <full-calendar
+ #ucCalendar
+ [options]="calendarOptions"
+ class="op-team-planner--calendar fc-scroller"
+ [ngClass]="{'op-team-planner--calendar_empty': (isEmpty$ | async)}"
>
- <op-principal
- [principal]="resource.extendedProps.principal"
- class="tp-assignee--principal op-principal_wrapped"
- [hideName]="isMobile"
- ></op-principal>
- <button
- type="button"
- class="tp-assignee--remove"
- (click)="removeAssignee(resource.id)"
- [attr.aria-label]="text.remove_assignee"
- [attr.data-qa-remove-assignee]="resource.extendedProps.principal.id"
- >
- <op-icon icon-classes="icon-remove"></op-icon>
- </button>
- </div>
-
- <op-principal-loading-skeleton
- *ngIf="resource && !resource.extendedProps.principal && resource.id.startsWith('skeleton')"
- ></op-principal-loading-skeleton>
-
- <op-tp-add-assignee
- *ngIf="resource && !resource.extendedProps.principal && !resource.id.startsWith('skeleton')"
- (selectAssignee)="addAssignee($event)"
- [alreadySelected]="principalIds$ | async"
- ></op-tp-add-assignee>
- </ng-template>
-
- <ng-template #eventContent let-event="$implicit.event">
- <op-wp-loading-skeleton
- [viewBox]="event.extendedProps.viewBox"
- class="op-team-planner--wp-loading-skeleton"
- *ngIf="event.source && event.source.id === 'skeleton'"
- ></op-wp-loading-skeleton>
-
- <wp-single-card
- *ngIf="(!event.source || event.source.id === 'work_packages') && event.extendedProps.workPackage as wp"
- [workPackage]="wp"
- [selectedWhenOpen]="true"
- [orientation]="'horizontal'"
- [highlightingMode]="'type'"
- [showInfoButton]="true"
- [disabledInfo]="showDisabledText(wp)"
- [isClosed]="isStatusClosed(wp)"
- [showAsGhost]="shouldShowAsGhost(wp.id, (globalDraggingItem$ | async))"
- [showAsInlineCard]="true"
- [showStartDate]="!isWpStartDateInCurrentView(wp)"
- [showEndDate]="!isWpEndDateInCurrentView(wp)"
- (stateLinkClicked)="openStateLink($event)"
- (cardClicked)="workPackagesCalendar.onCardClicked($event)"
- (cardDblClicked)="workPackagesCalendar.onCardDblClicked($event)"
- (cardContextMenu)="workPackagesCalendar.showEventContextMenu($event)"
- ></wp-single-card>
- </ng-template>
-
- </full-calendar>
-
+ <ng-template #resourceLabelContent let-resource="$implicit.resource">
+ @if (resource && resource.extendedProps.principal) {
+ <div
+ class="tp-assignee"
+ >
+ <op-principal
+ [principal]="resource.extendedProps.principal"
+ class="tp-assignee--principal op-principal_wrapped"
+ [hideName]="isMobile"
+ ></op-principal>
+ <button
+ type="button"
+ class="tp-assignee--remove"
+ (click)="removeAssignee(resource.id)"
+ [attr.aria-label]="text.remove_assignee"
+ [attr.data-qa-remove-assignee]="resource.extendedProps.principal.id"
+ >
+ <op-icon icon-classes="icon-remove"></op-icon>
+ </button>
+ </div>
+ }
+ @if (resource && !resource.extendedProps.principal && resource.id.startsWith('skeleton')) {
+ <op-principal-loading-skeleton
+ ></op-principal-loading-skeleton>
+ }
+ @if (resource && !resource.extendedProps.principal && !resource.id.startsWith('skeleton')) {
+ <op-tp-add-assignee
+ (selectAssignee)="addAssignee($event)"
+ [alreadySelected]="principalIds$ | async"
+ ></op-tp-add-assignee>
+ }
+ </ng-template>
+ <ng-template #eventContent let-event="$implicit.event">
+ @if (event.source && event.source.id === 'skeleton') {
+ <op-wp-loading-skeleton
+ [viewBox]="event.extendedProps.viewBox"
+ class="op-team-planner--wp-loading-skeleton"
+ ></op-wp-loading-skeleton>
+ }
+ @if ((!event.source || event.source.id === 'work_packages') && event.extendedProps.workPackage; as wp) {
+ <wp-single-card
+ [workPackage]="wp"
+ [selectedWhenOpen]="true"
+ [orientation]="'horizontal'"
+ [highlightingMode]="'type'"
+ [showInfoButton]="true"
+ [disabledInfo]="showDisabledText(wp)"
+ [isClosed]="isStatusClosed(wp)"
+ [showAsGhost]="shouldShowAsGhost(wp.id, (globalDraggingItem$ | async))"
+ [showAsInlineCard]="true"
+ [showStartDate]="!isWpStartDateInCurrentView(wp)"
+ [showEndDate]="!isWpEndDateInCurrentView(wp)"
+ (stateLinkClicked)="openStateLink($event)"
+ (cardClicked)="workPackagesCalendar.onCardClicked($event)"
+ (cardDblClicked)="workPackagesCalendar.onCardDblClicked($event)"
+ (cardContextMenu)="workPackagesCalendar.showEventContextMenu($event)"
+ ></wp-single-card>
+ }
+ </ng-template>
+ </full-calendar>
+ }
<div
[textContent]="workPackagesCalendar.tooManyResultsText"
class="op-wp-calendar--notification">
</div>
-
- <div
- *ngIf="isEmpty$ | async"
- class="op-team-planner--no-data">
- <img [src]="image.empty_state" class="op-team-planner--empty-state-image" />
- <span [textContent]="text.noData"></span>
- <button
- type="button"
- class="op-team-planner--empty-state-button button -primary"
- data-test-selector="op-team-planner--empty-state-button"
- (click)="showAssigneeAddRow()"
- >
- <op-icon icon-classes="icon-add button--icon"></op-icon>
- <span
- class="button--text"
- [textContent]="text.add_assignee">
- </span>
- </button>
- </div>
- </ng-container>
+ @if (isEmpty$ | async) {
+ <div
+ class="op-team-planner--no-data">
+ <img [src]="image.empty_state" class="op-team-planner--empty-state-image" />
+ <span [textContent]="text.noData"></span>
+ <button
+ type="button"
+ class="op-team-planner--empty-state-button button -primary"
+ data-test-selector="op-team-planner--empty-state-button"
+ (click)="showAssigneeAddRow()"
+ >
+ <op-icon icon-classes="icon-add button--icon"></op-icon>
+ <span
+ class="button--text"
+ [textContent]="text.add_assignee">
+ </span>
+ </button>
+ </div>
+ }
+ }
<div class="op-team-planner--footer" data-test-selector="op-team-planner-footer">
- <div
- class="op-team-planner--add-assignee"
- *ngIf="!(showAddAssignee$ | async) && !(dropzone$ | async)?.dragging"
- >
- <button
- type="button"
- class="spot-link"
- (click)="showAssigneeAddRow()"
- data-test-selector="tp-assignee-add-button"
- data-tour-selector="tp-assignee-add-button"
- >
- <op-icon icon-classes="icon-add button--icon"></op-icon>
- <span
- class="button--text"
- [textContent]="text.add_assignee">
- </span>
- </button>
- </div>
- <ng-container *ngIf="(dropzone$ | async) as dropzone">
+ @if (!(showAddAssignee$ | async) && !(dropzone$ | async)?.dragging) {
<div
- *ngIf="dropzone.dragging"
- #removeDropzone
- (mouseenter)="dropzoneHovered$.next(true)"
- (mouseleave)="dropzoneHovered$.next(false)"
- (mouseup)="dropzone.canDrop && removeEvent(dropzone.dragging)"
- class="op-team-planner--remove-dropzone"
- data-test-selector="op-team-planner-dropzone"
- [class.op-team-planner--remove-dropzone_active]="dropzone.isHovering && dropzone.canDrop"
- [class.op-team-planner--remove-dropzone_forbidden]="!dropzone.canDrop"
- >
- <span
- *ngIf="dropzone.canDrop"
- class="op-team-planner--dropzone-label"
- [textContent]="text.drag_here_to_remove"
- ></span>
- <span
- *ngIf="!dropzone.canDrop"
- class="op-team-planner--dropzone-label"
- [textContent]="text.cannot_drag_here"
- ></span>
+ class="op-team-planner--add-assignee"
+ >
+ <button
+ type="button"
+ class="spot-link"
+ (click)="showAssigneeAddRow()"
+ data-test-selector="tp-assignee-add-button"
+ data-tour-selector="tp-assignee-add-button"
+ >
+ <op-icon icon-classes="icon-add button--icon"></op-icon>
+ <span
+ class="button--text"
+ [textContent]="text.add_assignee">
+ </span>
+ </button>
</div>
- </ng-container>
+ }
+ @if ((dropzone$ | async); as dropzone) {
+ @if (dropzone.dragging) {
+ <div
+ #removeDropzone
+ (mouseenter)="dropzoneHovered$.next(true)"
+ (mouseleave)="dropzoneHovered$.next(false)"
+ (mouseup)="dropzone.canDrop && removeEvent(dropzone.dragging)"
+ class="op-team-planner--remove-dropzone"
+ data-test-selector="op-team-planner-dropzone"
+ [class.op-team-planner--remove-dropzone_active]="dropzone.isHovering && dropzone.canDrop"
+ [class.op-team-planner--remove-dropzone_forbidden]="!dropzone.canDrop"
+ >
+ @if (dropzone.canDrop) {
+ <span
+ class="op-team-planner--dropzone-label"
+ [textContent]="text.drag_here_to_remove"
+ ></span>
+ }
+ @if (!dropzone.canDrop) {
+ <span
+ class="op-team-planner--dropzone-label"
+ [textContent]="text.cannot_drag_here"
+ ></span>
+ }
+ </div>
+ }
+ }
</div>
</div>
</div>
diff --git a/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.html b/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.html
index 20649a7f09b..cd12d7475a4 100644
--- a/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.html
+++ b/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.html
@@ -1,26 +1,25 @@
<div
class="inline-create-container"
->
- <button
- *ngIf="!active"
- (click)="active = true"
- class="spot-link"
- type="button"
>
- <span class="spot-icon spot-icon_add"></span>
- <span [textContent]="text.add_setting"></span>
- </button>
+ @if (!active) {
+ <button
+ (click)="active = true"
+ class="spot-link"
+ type="button"
+ >
+ <span class="spot-icon spot-icon_add"></span>
+ <span [textContent]="text.add_setting"></span>
+ </button>
+ }
- <op-project-autocompleter
- *ngIf="active"
-
- (change)="selectProject($event)"
- (keydown.escape)="active = false"
-
- [filters]="APIFilters"
- [mapResultsFn]="this.mapProjectsFn.bind(this)"
-
- [placeholder]="text.please_select"
- dropdownPosition="top"
- ></op-project-autocompleter>
+ @if (active) {
+ <op-project-autocompleter
+ (change)="selectProject($event)"
+ (keydown.escape)="active = false"
+ [filters]="APIFilters"
+ [mapResultsFn]="this.mapProjectsFn.bind(this)"
+ [placeholder]="text.please_select"
+ dropdownPosition="top"
+ ></op-project-autocompleter>
+ }
</div>
diff --git a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.html b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.html
index c25bab2e653..826be67dd72 100644
--- a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.html
+++ b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.html
@@ -2,7 +2,7 @@
[formGroup]="form"
(ngSubmit)="saveChanges()"
class="op-form"
->
+ >
<div class="op-form--section-header">
<h3 class="op-form--section-header-title">{{ text.notifyImmediately.title }}</h3>
<p>{{ text.notifyImmediately.description }}</p>
@@ -11,11 +11,11 @@
<spot-selector-field
class="op-notifications-settings--bold-label"
[label]="text.mentioned.title">
- <input
- disabled
- checked
- type="checkbox"
- slot="input"
+ <input
+ disabled
+ checked
+ type="checkbox"
+ slot="input"
/>
</spot-selector-field>
@@ -27,43 +27,43 @@
checked
type="checkbox"
slot="input"
- />
+ />
</spot-selector-field>
<spot-selector-field
[label]="text.assignee"
[control]="form.get('assignee')"
- >
+ >
<input
slot="input"
type="checkbox"
formControlName="assignee"
data-qa-global-notification-type="assignee"
- />
+ />
</spot-selector-field>
<spot-selector-field
[label]="text.responsible"
[control]="form.get('responsible')"
- >
+ >
<input
slot="input"
type="checkbox"
formControlName="responsible"
data-qa-global-notification-type="responsible"
- />
+ />
</spot-selector-field>
<spot-selector-field
[label]="text.shared"
[control]="form.get('shared')"
- >
+ >
<input
slot="input"
type="checkbox"
formControlName="shared"
data-qa-global-notification-type="shared"
- />
+ />
</spot-selector-field>
<div class="op-form--section-header">
@@ -71,100 +71,106 @@
<p>{{ text.dateAlerts.description }}</p>
</div>
- <div *ngIf="eeAvailable">
- <div
- class="op-reminder-settings-date-alerts--row"
- formGroupName="startDate"
- >
- <input
- type="checkbox"
- formControlName="active"
- class="op-reminder-settings-date-alerts--active"
- data-qa-global-notification-type="op-settings-start-date-active"
- id="op-settings-start-date"
- />
- <label
- class="op-reminder-settings-date-alerts--label"
- [textContent]="text.startDate"
- for="op-settings-start-date"
- ></label>
- <select
- formControlName="time"
- class="op-reminder-settings-date-alerts--time form--select -narrow"
- data-qa-global-notification-type= "op-reminder-settings-start-date-alerts"
- required="true"
- *ngIf="dateAlertsStatuses.startDate"
- >
- <option
- *ngFor="let availableTime of availableTimes"
- [value]="availableTime.value"
+ @if (eeAvailable) {
+ <div>
+ <div
+ class="op-reminder-settings-date-alerts--row"
+ formGroupName="startDate"
>
- {{availableTime.title}}
- </option>
- </select>
- </div>
-
- <div
- class="op-reminder-settings-date-alerts--row"
- formGroupName="dueDate"
- >
- <input
- type="checkbox"
- formControlName="active"
- class="op-reminder-settings-date-alerts--active"
- data-qa-global-notification-type= "op-settings-due-date-active"
- id="op-settings-due-date"
- />
- <label
- class="op-reminder-settings-date-alerts--label"
- [textContent]="text.dueDate"
- for="op-settings-due-date"
- ></label>
- <select
- formControlName="time"
- class="op-reminder-settings-date-alerts--time form--select -narrow"
- data-qa-global-notification-type= "op-reminder-settings-due-date-alerts"
- required="true"
- *ngIf="dateAlertsStatuses.dueDate"
- >
- <option
- *ngFor="let availableTime of availableTimes"
- [value]="availableTime.value">
- {{availableTime.title}}
- </option>
- </select>
- </div>
-
- <div
- class="op-reminder-settings-date-alerts--row"
- formGroupName="overdue"
- >
- <input
- formControlName="active"
- type="checkbox"
- class="op-reminder-settings-date-alerts--active"
- data-qa-global-notification-type="op-settings-overdue-date-active"
- id="op-settings-overdue-date">
- <label
- class="op-reminder-settings-date-alerts--label"
- [textContent]="text.overdue"
- for="op-settings-overdue-date"
- ></label>
- <select
- formControlName="time"
- class="op-reminder-settings-date-alerts--time form--select -narrow"
- data-qa-global-notification-type="op-reminder-settings-overdue-alerts"
- required="true"
- *ngIf="dateAlertsStatuses.overdue"
- >
- <option
- *ngFor="let availableTime of availableTimesOverdue"
- [value]="availableTime.value">
- {{availableTime.title}}
- </option>
- </select>
+ <input
+ type="checkbox"
+ formControlName="active"
+ class="op-reminder-settings-date-alerts--active"
+ data-qa-global-notification-type="op-settings-start-date-active"
+ id="op-settings-start-date"
+ />
+ <label
+ class="op-reminder-settings-date-alerts--label"
+ [textContent]="text.startDate"
+ for="op-settings-start-date"
+ ></label>
+ @if (dateAlertsStatuses.startDate) {
+ <select
+ formControlName="time"
+ class="op-reminder-settings-date-alerts--time form--select -narrow"
+ data-qa-global-notification-type= "op-reminder-settings-start-date-alerts"
+ required="true"
+ >
+ @for (availableTime of availableTimes; track availableTime) {
+ <option
+ [value]="availableTime.value"
+ >
+ {{availableTime.title}}
+ </option>
+ }
+ </select>
+ }
+ </div>
+ <div
+ class="op-reminder-settings-date-alerts--row"
+ formGroupName="dueDate"
+ >
+ <input
+ type="checkbox"
+ formControlName="active"
+ class="op-reminder-settings-date-alerts--active"
+ data-qa-global-notification-type= "op-settings-due-date-active"
+ id="op-settings-due-date"
+ />
+ <label
+ class="op-reminder-settings-date-alerts--label"
+ [textContent]="text.dueDate"
+ for="op-settings-due-date"
+ ></label>
+ @if (dateAlertsStatuses.dueDate) {
+ <select
+ formControlName="time"
+ class="op-reminder-settings-date-alerts--time form--select -narrow"
+ data-qa-global-notification-type= "op-reminder-settings-due-date-alerts"
+ required="true"
+ >
+ @for (availableTime of availableTimes; track availableTime) {
+ <option
+ [value]="availableTime.value">
+ {{availableTime.title}}
+ </option>
+ }
+ </select>
+ }
+ </div>
+ <div
+ class="op-reminder-settings-date-alerts--row"
+ formGroupName="overdue"
+ >
+ <input
+ formControlName="active"
+ type="checkbox"
+ class="op-reminder-settings-date-alerts--active"
+ data-qa-global-notification-type="op-settings-overdue-date-active"
+ id="op-settings-overdue-date">
+ <label
+ class="op-reminder-settings-date-alerts--label"
+ [textContent]="text.overdue"
+ for="op-settings-overdue-date"
+ ></label>
+ @if (dateAlertsStatuses.overdue) {
+ <select
+ formControlName="time"
+ class="op-reminder-settings-date-alerts--time form--select -narrow"
+ data-qa-global-notification-type="op-reminder-settings-overdue-alerts"
+ required="true"
+ >
+ @for (availableTime of availableTimesOverdue; track availableTime) {
+ <option
+ [value]="availableTime.value">
+ {{availableTime.title}}
+ </option>
+ }
+ </select>
+ }
+ </div>
</div>
- </div>
+ }
<op-enterprise-banner-frame
feature="date_alerts"
@@ -184,7 +190,7 @@
type="checkbox"
formControlName="workPackageCreated"
data-qa-global-notification-type="work_package_created"
- />
+ />
</spot-selector-field>
<spot-selector-field
@@ -195,7 +201,7 @@
type="checkbox"
formControlName="workPackageProcessed"
data-qa-global-notification-type="work_package_processed"
- />
+ />
</spot-selector-field>
<spot-selector-field
@@ -206,7 +212,7 @@
type="checkbox"
formControlName="workPackageScheduled"
data-qa-global-notification-type="work_package_scheduled"
- />
+ />
</spot-selector-field>
<spot-selector-field
@@ -217,7 +223,7 @@
type="checkbox"
formControlName="workPackagePrioritized"
data-qa-global-notification-type="work_package_prioritized"
- />
+ />
</spot-selector-field>
<spot-selector-field
@@ -228,7 +234,7 @@
type="checkbox"
formControlName="workPackageCommented"
data-qa-global-notification-type="work_package_commented"
- />
+ />
</spot-selector-field>
@@ -237,13 +243,14 @@
<p>{{text.projectSpecific.description}}</p>
</div>
- <op-notification-settings-table
- *ngIf="userId"
- [userId]="userId"
- [settings]="form.controls.projectSettings"
- formArrayName="projectSettings"
- class="op-notification-settings-page--table"
- ></op-notification-settings-table>
+ @if (userId) {
+ <op-notification-settings-table
+ [userId]="userId"
+ [settings]="form.controls.projectSettings"
+ formArrayName="projectSettings"
+ class="op-notification-settings-page--table"
+ ></op-notification-settings-table>
+ }
<div class="generic-table--action-buttons">
<button
diff --git a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.html b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.html
index 826cf8ed54f..557e25147f6 100644
--- a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.html
+++ b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.html
@@ -1,272 +1,279 @@
-<div
- class="op-scrollable-table"
- *ngIf="settings.length > 0"
->
- <table class="op-table">
- <thead>
- <tr>
- <th class="op-table--cell op-table--cell_heading">
- {{ text.notify_me }}
- </th>
- <ng-container *ngFor="let item of settings.controls">
+@if (settings.length > 0) {
+ <div
+ class="op-scrollable-table"
+ >
+ <table class="op-table">
+ <thead>
+ <tr>
<th class="op-table--cell op-table--cell_heading">
- <a
- class="spot-link"
- [href]="projectLink(item.controls.project.value.href)"
- >{{ item.controls.project.value.title }}</a>
+ {{ text.notify_me }}
</th>
- </ng-container>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">
- <h5>{{ text.notifyImmediately.title }}</h5>
- <p>{{ text.notifyImmediately.description }}</p>
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell"></td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">
- {{ text.mentioned_header.title }}
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell"><input type="checkbox" disabled checked /></td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">{{ text.watched_header }}</th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell"><input type="checkbox" disabled checked /></td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">
- {{ text.assignee }}
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell" [formGroup]="item">
- <input
- type="checkbox"
- formControlName="assignee"
- data-qa-project-notification-type="assignee"
- [attr.data-qa-project]="item.controls.project.value.title"
- />
- </td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">
- {{ text.responsible }}
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell" [formGroup]="item">
- <input
- type="checkbox"
- formControlName="responsible"
- data-qa-project-notification-type="responsible"
- [attr.data-qa-project]="item.controls.project.value.title"
- />
- </td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">
- {{ text.shared }}
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell" [formGroup]="item">
- <input
- type="checkbox"
- formControlName="shared"
- data-qa-project-notification-type="shared"
- [attr.data-qa-project]="item.controls.project.value.title"
- />
- </td>
- </ng-container>
- </tr>
-
- <tr *ngIf="eeAvailable">
- <th class="op-table--cell op-table--cell_soft-heading">
- <h5>{{ text.dateAlerts.title }}</h5>
- <p>{{ text.dateAlerts.description }}</p>
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell"></td>
- </ng-container>
- </tr>
-
- <tr *ngIf="eeAvailable">
- <th class="op-table--cell op-table--cell_soft-heading">
- {{ text.startDate }}
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell--date-alerts" [formGroup]="item">
- <select
- formControlName="startDate"
- class="op-reminder-settings-table-date-alerts--time form--select"
- data-qa-project-notification-type="op-reminder-settings-start-date-alerts"
- [attr.data-qa-project]="item.controls.project.value.title"
- required="true"
- >
- <option
- *ngFor="let availableTime of availableTimes"
- [ngValue]="availableTime.value"
- >
- {{availableTime.title}}
- </option>
- </select>
- </td>
- </ng-container>
- </tr>
-
- <tr *ngIf="eeAvailable">
- <th class="op-table--cell op-table--cell_soft-heading">
- {{ text.dueDate }}
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell--date-alerts" [formGroup]="item">
- <select
- formControlName="dueDate"
- class="op-reminder-settings-table-date-alerts--time form--select"
- data-qa-project-notification-type="op-reminder-settings-due-date-alerts"
- [attr.data-qa-project]="item.controls.project.value.title"
- required="true"
- >
- <option
- *ngFor="let availableTime of availableTimes"
- [ngValue]="availableTime.value"
- >
- {{availableTime.title}}
- </option>
- </select>
- </td>
- </ng-container>
- </tr>
-
- <tr *ngIf="eeAvailable">
- <th class="op-table--cell op-table--cell_soft-heading">
- {{ text.overdue }}
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell--date-alerts" [formGroup]="item">
- <select
- formControlName="overdue"
- class="op-reminder-settings-table-date-alerts--time form--select"
- data-qa-project-notification-type="op-reminder-settings-overdue-alerts"
- [attr.data-qa-project]="item.controls.project.value.title"
- required="true"
- >
- <option
- *ngFor="let availableTime of availableTimesOverdue"
- [ngValue]="availableTime.value"
- >
- {{availableTime.title}}
- </option>
- </select>
- </td>
- </ng-container>
- </tr>
-
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">
- <h5>{{ text.alsoNotifyFor.title }}</h5>
- <p>{{ text.alsoNotifyFor.description }}</p>
- </th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell"></td>
- </ng-container>
- </tr>
-
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_created_header }}</th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell" [formGroup]="item">
- <input
- type="checkbox"
- formControlName="workPackageCreated"
- data-qa-project-notification-type="work_package_created"
- [attr.data-qa-project]="item.controls.project.value.title"
- />
- </td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_processed_header }}</th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell" [formGroup]="item">
- <input
- type="checkbox"
- formControlName="workPackageProcessed"
- data-qa-project-notification-type="work_package_processed"
- [attr.data-qa-project]="item.controls.project.value.title"
- />
- </td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_scheduled_header }}</th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell" [formGroup]="item">
- <input
- type="checkbox"
- formControlName="workPackageScheduled"
- data-qa-project-notification-type="work_package_scheduled"
- [attr.data-qa-project]="item.controls.project.value.title"
- />
- </td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_prioritized_header }}</th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell" [formGroup]="item">
- <input
- type="checkbox"
- formControlName="workPackagePrioritized"
- data-qa-project-notification-type="work_package_prioritized"
- [attr.data-qa-project]="item.controls.project.value.title"
- />
- </td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_commented_header }}</th>
- <ng-container *ngFor="let item of settings.controls">
- <td class="op-table--cell" [formGroup]="item">
- <input
- type="checkbox"
- formControlName="workPackageCommented"
- data-qa-project-notification-type="work_package_commented"
- [attr.data-qa-project]="item.controls.project.value.title"
- />
- </td>
- </ng-container>
- </tr>
- <tr>
- <th class="op-table--cell op-table--cell_soft-heading"></th>
- <ng-container *ngFor="let item of settings.controls; let index = index">
- <td class="op-table--cell">
- <button
- type="button"
- class="spot-link"
- (click)="removeProjectSettings(index)"
- >
- {{ text.remove_project_settings }}
- </button>
- </td>
- </ng-container>
- </tr>
- </tbody>
- </table>
-</div>
+ @for (item of settings.controls; track item) {
+ <th class="op-table--cell op-table--cell_heading">
+ <a
+ class="spot-link"
+ [href]="projectLink(item.controls.project.value.href)"
+ >{{ item.controls.project.value.title }}</a>
+ </th>
+ }
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ <h5>{{ text.notifyImmediately.title }}</h5>
+ <p>{{ text.notifyImmediately.description }}</p>
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell"></td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ {{ text.mentioned_header.title }}
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell"><input type="checkbox" disabled checked /></td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.watched_header }}</th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell"><input type="checkbox" disabled checked /></td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ {{ text.assignee }}
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell" [formGroup]="item">
+ <input
+ type="checkbox"
+ formControlName="assignee"
+ data-qa-project-notification-type="assignee"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ />
+ </td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ {{ text.responsible }}
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell" [formGroup]="item">
+ <input
+ type="checkbox"
+ formControlName="responsible"
+ data-qa-project-notification-type="responsible"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ />
+ </td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ {{ text.shared }}
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell" [formGroup]="item">
+ <input
+ type="checkbox"
+ formControlName="shared"
+ data-qa-project-notification-type="shared"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ />
+ </td>
+ }
+ </tr>
+ @if (eeAvailable) {
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ <h5>{{ text.dateAlerts.title }}</h5>
+ <p>{{ text.dateAlerts.description }}</p>
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell"></td>
+ }
+ </tr>
+ }
+ @if (eeAvailable) {
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ {{ text.startDate }}
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell--date-alerts" [formGroup]="item">
+ <select
+ formControlName="startDate"
+ class="op-reminder-settings-table-date-alerts--time form--select"
+ data-qa-project-notification-type="op-reminder-settings-start-date-alerts"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ required="true"
+ >
+ @for (availableTime of availableTimes; track availableTime) {
+ <option
+ [ngValue]="availableTime.value"
+ >
+ {{availableTime.title}}
+ </option>
+ }
+ </select>
+ </td>
+ }
+ </tr>
+ }
+ @if (eeAvailable) {
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ {{ text.dueDate }}
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell--date-alerts" [formGroup]="item">
+ <select
+ formControlName="dueDate"
+ class="op-reminder-settings-table-date-alerts--time form--select"
+ data-qa-project-notification-type="op-reminder-settings-due-date-alerts"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ required="true"
+ >
+ @for (availableTime of availableTimes; track availableTime) {
+ <option
+ [ngValue]="availableTime.value"
+ >
+ {{availableTime.title}}
+ </option>
+ }
+ </select>
+ </td>
+ }
+ </tr>
+ }
+ @if (eeAvailable) {
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ {{ text.overdue }}
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell--date-alerts" [formGroup]="item">
+ <select
+ formControlName="overdue"
+ class="op-reminder-settings-table-date-alerts--time form--select"
+ data-qa-project-notification-type="op-reminder-settings-overdue-alerts"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ required="true"
+ >
+ @for (availableTime of availableTimesOverdue; track availableTime) {
+ <option
+ [ngValue]="availableTime.value"
+ >
+ {{availableTime.title}}
+ </option>
+ }
+ </select>
+ </td>
+ }
+ </tr>
+ }
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">
+ <h5>{{ text.alsoNotifyFor.title }}</h5>
+ <p>{{ text.alsoNotifyFor.description }}</p>
+ </th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell"></td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_created_header }}</th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell" [formGroup]="item">
+ <input
+ type="checkbox"
+ formControlName="workPackageCreated"
+ data-qa-project-notification-type="work_package_created"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ />
+ </td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_processed_header }}</th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell" [formGroup]="item">
+ <input
+ type="checkbox"
+ formControlName="workPackageProcessed"
+ data-qa-project-notification-type="work_package_processed"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ />
+ </td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_scheduled_header }}</th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell" [formGroup]="item">
+ <input
+ type="checkbox"
+ formControlName="workPackageScheduled"
+ data-qa-project-notification-type="work_package_scheduled"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ />
+ </td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_prioritized_header }}</th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell" [formGroup]="item">
+ <input
+ type="checkbox"
+ formControlName="workPackagePrioritized"
+ data-qa-project-notification-type="work_package_prioritized"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ />
+ </td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_commented_header }}</th>
+ @for (item of settings.controls; track item) {
+ <td class="op-table--cell" [formGroup]="item">
+ <input
+ type="checkbox"
+ formControlName="workPackageCommented"
+ data-qa-project-notification-type="work_package_commented"
+ [attr.data-qa-project]="item.controls.project.value.title"
+ />
+ </td>
+ }
+ </tr>
+ <tr>
+ <th class="op-table--cell op-table--cell_soft-heading"></th>
+ @for (item of settings.controls; track item; let index = $index) {
+ <td class="op-table--cell">
+ <button
+ type="button"
+ class="spot-link"
+ (click)="removeProjectSettings(index)"
+ >
+ {{ text.remove_project_settings }}
+ </button>
+ </td>
+ }
+ </tr>
+ </tbody>
+ </table>
+ </div>
+}
-<op-notification-setting-inline-create
- *ngIf="userId"
- [userId]="userId"
- [settings]="settings"
- (selected)="addProjectSettings($event)"
- data-test-selector="notification-setting-inline-create"
-></op-notification-setting-inline-create>
+@if (userId) {
+ <op-notification-setting-inline-create
+ [userId]="userId"
+ [settings]="settings"
+ (selected)="addProjectSettings($event)"
+ data-test-selector="notification-setting-inline-create"
+ ></op-notification-setting-inline-create>
+}
diff --git a/frontend/src/app/features/user-preferences/reminder-settings/email-alerts/email-alerts-settings.component.html b/frontend/src/app/features/user-preferences/reminder-settings/email-alerts/email-alerts-settings.component.html
index caaa1a8ad11..2312f5211d6 100644
--- a/frontend/src/app/features/user-preferences/reminder-settings/email-alerts/email-alerts-settings.component.html
+++ b/frontend/src/app/features/user-preferences/reminder-settings/email-alerts/email-alerts-settings.component.html
@@ -4,15 +4,16 @@
<p [textContent]="text.explanation"></p>
</div>
- <spot-selector-field
- [label]="text[setting]"
- [control]="form.get(setting)"
- *ngFor="let setting of alerts"
- >
- <input
- slot="input"
- type="checkbox"
- [formControlName]="setting"
- />
- </spot-selector-field>
+ @for (setting of alerts; track setting) {
+ <spot-selector-field
+ [label]="text[setting]"
+ [control]="form.get(setting)"
+ >
+ <input
+ slot="input"
+ type="checkbox"
+ [formControlName]="setting"
+ />
+ </spot-selector-field>
+ }
</ng-container>
diff --git a/frontend/src/app/features/user-preferences/reminder-settings/page/reminder-settings-page.component.html b/frontend/src/app/features/user-preferences/reminder-settings/page/reminder-settings-page.component.html
index 0808073d085..8f15e4e1a09 100644
--- a/frontend/src/app/features/user-preferences/reminder-settings/page/reminder-settings-page.component.html
+++ b/frontend/src/app/features/user-preferences/reminder-settings/page/reminder-settings-page.component.html
@@ -1,19 +1,19 @@
-<form
- *ngIf="formInitialized"
- [formGroup]="form"
- (ngSubmit)="saveChanges()"
- class="op-form"
->
- <op-immediate-reminder-settings class="op-form--fieldset"></op-immediate-reminder-settings>
- <op-reminder-settings-daily-time class="op-form--fieldset"></op-reminder-settings-daily-time>
- <op-workdays-settings class="op-form--fieldset"></op-workdays-settings>
- <op-email-alerts-settings class="op-form--fieldset"></op-email-alerts-settings>
-
- <div class="op-form--submit">
- <button
- class="button -primary"
- [textContent]="text.save"
- type="submit"
- ></button>
- </div>
-</form>
+@if (formInitialized) {
+ <form
+ [formGroup]="form"
+ (ngSubmit)="saveChanges()"
+ class="op-form"
+ >
+ <op-immediate-reminder-settings class="op-form--fieldset"></op-immediate-reminder-settings>
+ <op-reminder-settings-daily-time class="op-form--fieldset"></op-reminder-settings-daily-time>
+ <op-workdays-settings class="op-form--fieldset"></op-workdays-settings>
+ <op-email-alerts-settings class="op-form--fieldset"></op-email-alerts-settings>
+ <div class="op-form--submit">
+ <button
+ class="button -primary"
+ [textContent]="text.save"
+ type="submit"
+ ></button>
+ </div>
+ </form>
+}
diff --git a/frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.html b/frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.html
index 696b5e33c5f..8c6f9ce975e 100644
--- a/frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.html
+++ b/frontend/src/app/features/user-preferences/reminder-settings/pause-reminders/pause-reminders.component.html
@@ -1,23 +1,24 @@
<div
class="op-pause-reminders"
[formGroup]="form"
->
+ >
<spot-selector-field
class="op-pause-reminders--checkbox"
[label]="text.label"
[control]="form.get('enabled')"
- >
+ >
<input
slot="input"
type="checkbox"
formControlName="enabled"
- />
+ />
</spot-selector-field>
- <op-basic-range-date-picker
- *ngIf="(enabled$ | async)"
- [required]="enabled$ | async"
- [value]="selectedDates$ | async"
- (valueChange)="setDates($event)"
- ></op-basic-range-date-picker>
+ @if ((enabled$ | async)) {
+ <op-basic-range-date-picker
+ [required]="enabled$ | async"
+ [value]="selectedDates$ | async"
+ (valueChange)="setDates($event)"
+ ></op-basic-range-date-picker>
+ }
</div>
diff --git a/frontend/src/app/features/user-preferences/reminder-settings/reminder-time/reminder-settings-daily-time.component.html b/frontend/src/app/features/user-preferences/reminder-settings/reminder-time/reminder-settings-daily-time.component.html
index 09c5e01ec36..072fbc969a9 100644
--- a/frontend/src/app/features/user-preferences/reminder-settings/reminder-time/reminder-settings-daily-time.component.html
+++ b/frontend/src/app/features/user-preferences/reminder-settings/reminder-time/reminder-settings-daily-time.component.html
@@ -1,71 +1,73 @@
-<ng-container
- *ngIf="(selectedTimes$ | async) as selectedTimes"
- [formGroup]="form"
->
- <div class="op-form--section-header">
+@if ((selectedTimes$ | async); as selectedTimes) {
+ <ng-container
+ [formGroup]="form"
+ >
+ <div class="op-form--section-header">
<h3 [textContent]="text.title" class="op-form--section-header-title"></h3>
<p [textContent]="text.explanation"></p>
- </div>
-
- <spot-selector-field
- [label]="text.enable"
- [control]="form.get('enabled')">
- <input
- slot="input"
- type="checkbox"
- formControlName="enabled"
- />
- </spot-selector-field>
-
- <div
- *ngFor="let time of selectedTimes; index as i; trackBy: index"
- class="op-reminder-settings-daily-time--row"
- >
- <input
- *ngIf="(activeTimes$ | async) as activeTimes"
- type="checkbox"
- [ngModel]="isActive(time)"
- (ngModelChange)="toggleActive($event, i, selectedTimes)"
- [ngModelOptions]="{standalone: true}"
- [disabled]="isDisabled(time, activeTimes)"
- class="op-reminder-settings-daily-time--active"
- attr.data-test-selector="op-settings-daily-time--active-{{i + 1}}">
- <label
- class="op-reminder-settings-daily-time--label"
- [textContent]="text.timeLabel(i + 1)"
- attr.for="op-reminder-settings-daily-time-{{i + 1}}--time">
- </label>
- <select
- [ngModel]="time"
- (ngModelChange)="changeTime($event, selectedTimes, i)"
- [ngModelOptions]="{standalone: true}"
- [disabled]="(enabled$ | async) === false"
- class="op-reminder-settings-daily-time--time form--select -narrow"
- attr.id="op-reminder-settings-daily-time-{{i + 1}}--time"
- required="true">
- <option
- *ngFor="let availableTime of availableTimes"
- [value]="availableTime"
- [disabled]="time !== availableTime && selectedTimes.includes(availableTime)">
- {{timeLabel(availableTime)}}
- </option>
- </select>
+ </div>
+ <spot-selector-field
+ [label]="text.enable"
+ [control]="form.get('enabled')">
+ <input
+ slot="input"
+ type="checkbox"
+ formControlName="enabled"
+ />
+ </spot-selector-field>
+ @for (time of selectedTimes; track index(i, time); let i = $index) {
+ <div
+ class="op-reminder-settings-daily-time--row"
+ >
+ @if ((activeTimes$ | async); as activeTimes) {
+ <input
+ type="checkbox"
+ [ngModel]="isActive(time)"
+ (ngModelChange)="toggleActive($event, i, selectedTimes)"
+ [ngModelOptions]="{standalone: true}"
+ [disabled]="isDisabled(time, activeTimes)"
+ class="op-reminder-settings-daily-time--active"
+ attr.data-test-selector="op-settings-daily-time--active-{{i + 1}}">
+ }
+ <label
+ class="op-reminder-settings-daily-time--label"
+ [textContent]="text.timeLabel(i + 1)"
+ attr.for="op-reminder-settings-daily-time-{{i + 1}}--time">
+ </label>
+ <select
+ [ngModel]="time"
+ (ngModelChange)="changeTime($event, selectedTimes, i)"
+ [ngModelOptions]="{standalone: true}"
+ [disabled]="(enabled$ | async) === false"
+ class="op-reminder-settings-daily-time--time form--select -narrow"
+ attr.id="op-reminder-settings-daily-time-{{i + 1}}--time"
+ required="true">
+ @for (availableTime of availableTimes; track availableTime) {
+ <option
+ [value]="availableTime"
+ [disabled]="time !== availableTime && selectedTimes.includes(availableTime)">
+ {{timeLabel(availableTime)}}
+ </option>
+ }
+ </select>
+ @if (timeRemovable$ | async) {
+ <button
+ class="spot-link op-reminder-settings-daily-time--remove"
+ type="button"
+ (click)="removeTime(selectedTimes, i)"
+ attr.data-test-selector="op-settings-daily-time--remove-{{i + 1}}">
+ <op-icon icon-classes="icon-small icon-remove icon4"></op-icon>
+ </button>
+ }
+ </div>
+ }
<button
- class="spot-link op-reminder-settings-daily-time--remove"
+ class="button op-reminder-settings-daily-time--add"
type="button"
- *ngIf="timeRemovable$ | async"
- (click)="removeTime(selectedTimes, i)"
- attr.data-test-selector="op-settings-daily-time--remove-{{i + 1}}">
- <op-icon icon-classes="icon-small icon-remove icon4"></op-icon>
+ [disabled]="nonAddable$ | async"
+ (click)="addTime(selectedTimes)">
+ <i class="button--icon icon-add"></i>
+ <span class="button--text">{{text.addTime}}</span>
</button>
- </div>
-
- <button
- class="button op-reminder-settings-daily-time--add"
- type="button"
- [disabled]="nonAddable$ | async"
- (click)="addTime(selectedTimes)">
- <i class="button--icon icon-add"></i>
- <span class="button--text">{{text.addTime}}</span>
- </button>
-</ng-container>
+ </ng-container>
+}
diff --git a/frontend/src/app/features/user-preferences/reminder-settings/workdays/workdays-settings.component.html b/frontend/src/app/features/user-preferences/reminder-settings/workdays/workdays-settings.component.html
index d3c7e83d680..c046e39611a 100644
--- a/frontend/src/app/features/user-preferences/reminder-settings/workdays/workdays-settings.component.html
+++ b/frontend/src/app/features/user-preferences/reminder-settings/workdays/workdays-settings.component.html
@@ -3,18 +3,19 @@
<h3 [textContent]="text.title" class="op-form--section-header-title"></h3>
</div>
- <spot-selector-field
- *ngFor="let workday of localeWorkdays; let i = index"
- formArrayName="workdays"
- [label]="workday"
- [control]="controlForLocalWorkday(workday)"
- >
- <input
- slot="input"
- type="checkbox"
- [formControlName]="indexOfLocalWorkday(workday)"
- />
- </spot-selector-field>
+ @for (workday of localeWorkdays; track workday; let i = $index) {
+ <spot-selector-field
+ formArrayName="workdays"
+ [label]="workday"
+ [control]="controlForLocalWorkday(workday)"
+ >
+ <input
+ slot="input"
+ type="checkbox"
+ [formControlName]="indexOfLocalWorkday(workday)"
+ />
+ </spot-selector-field>
+ }
<op-pause-reminders></op-pause-reminders>
</ng-container>
diff --git a/frontend/src/app/features/work-packages/components/filters/filter-container/filter-container.directive.html b/frontend/src/app/features/work-packages/components/filters/filter-container/filter-container.directive.html
index e6f7341887f..20434682a37 100644
--- a/frontend/src/app/features/work-packages/components/filters/filter-container/filter-container.directive.html
+++ b/frontend/src/app/features/work-packages/components/filters/filter-container/filter-container.directive.html
@@ -1,26 +1,30 @@
-<button
- class="button -small advanced-filters--toggle"
- (click)="wpFiltersService.toggleVisibility()"
- [class.-active]="visible$ | async"
- *ngIf="showFilterButton"
->
- <i class="button--icon icon-filter"></i>
- <span class="button--text" [textContent]="filterButtonText"></span>
-</button>
+@if (showFilterButton) {
+ <button
+ class="button -small advanced-filters--toggle"
+ (click)="wpFiltersService.toggleVisibility()"
+ [class.-active]="visible$ | async"
+ >
+ <i class="button--icon icon-filter"></i>
+ <span class="button--text" [textContent]="filterButtonText"></span>
+ </button>
+}
<div
class="work-packages--filters-optional-container"
[ngClass]="{ '-loaded': loaded }"
->
- <div
- id="query_form_content"
- class="hide-when-print" *ngIf="visible$ | async"
>
- <op-query-filters
- *ngIf="!!filters"
- [filters]="filters"
- [showCloseFilter]="true"
- (filtersChanged)="replaceIfComplete($event)"
- ></op-query-filters>
- </div>
+ @if (visible$ | async) {
+ <div
+ id="query_form_content"
+ class="hide-when-print"
+ >
+ @if (!!filters) {
+ <op-query-filters
+ [filters]="filters"
+ [showCloseFilter]="true"
+ (filtersChanged)="replaceIfComplete($event)"
+ ></op-query-filters>
+ }
+ </div>
+ }
</div>
diff --git a/frontend/src/app/features/work-packages/components/filters/filter-date-time-value/filter-date-time-value.component.html b/frontend/src/app/features/work-packages/components/filters/filter-date-time-value/filter-date-time-value.component.html
index 97e00c37d36..a8549b64182 100644
--- a/frontend/src/app/features/work-packages/components/filters/filter-date-time-value/filter-date-time-value.component.html
+++ b/frontend/src/app/features/work-packages/components/filters/filter-date-time-value/filter-date-time-value.component.html
@@ -10,10 +10,11 @@
[opAutofocus]="shouldFocus"
></op-basic-single-date-picker>
-<span
- class="advanced-filters--tooltip-trigger -multiline"
- [attr.data-tooltip]="timeZoneText"
- *ngIf="isTimeZoneDifferent"
->
- <span class="spot-icon spot-icon_warning"></span>
-</span>
+@if (isTimeZoneDifferent) {
+ <span
+ class="advanced-filters--tooltip-trigger -multiline"
+ [attr.data-tooltip]="timeZoneText"
+ >
+ <span class="spot-icon spot-icon_warning"></span>
+ </span>
+}
diff --git a/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.html b/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.html
index b29454ccebc..bc77d65921d 100644
--- a/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.html
+++ b/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.html
@@ -19,10 +19,11 @@
classes="advanced-filters--date-field"
></op-basic-single-date-picker>
-<span
- class="advanced-filters--tooltip-trigger -multiline"
- *ngIf="isTimeZoneDifferent"
- [attr.data-tooltip]="timeZoneText"
->
- <span class="spot-icon spot-icon_warning"></span>
-</span>
+@if (isTimeZoneDifferent) {
+ <span
+ class="advanced-filters--tooltip-trigger -multiline"
+ [attr.data-tooltip]="timeZoneText"
+ >
+ <span class="spot-icon spot-icon_warning"></span>
+ </span>
+}
diff --git a/frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.html b/frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.html
index 6e8644b27eb..ed45ac565de 100644
--- a/frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.html
+++ b/frontend/src/app/features/work-packages/components/filters/query-filter/query-filter.component.html
@@ -4,13 +4,14 @@
for="operators-{{filter.id}}"
class="advanced-filters--filter-name"
[class.op-query-filter--icon-label]="baselineIncompatibleFilter"
- >
+ >
<span [textContent]="filter.name" [attr.title]="filter.name"></span>
- <span
- *ngIf="baselineIncompatibleFilter"
- [title]="text.incompatible_filter"
- data-test-selector="query-filter-baseline-incompatible"
+ @if (baselineIncompatibleFilter) {
+ <span
+ [title]="text.incompatible_filter"
+ data-test-selector="query-filter-baseline-incompatible"
class="spot-icon spot-icon_warning"></span>
+ }
</label>
<!-- Operator -->
@@ -19,117 +20,125 @@
<label
for="operators-{{filter.id}}"
class="sr-only"
- >
+ >
{{ filter.name }}
{{ text.open_filter }}
</label>
- <select
- required
- *ngIf="valueType !== '[1]Boolean'"
- class="advanced-filters--select"
- id="operators-{{filter.id}}"
- name="op[{{filter.id}}]"
- [(ngModel)]="filter.operator"
- (ngModelChange)="onFilterUpdated(filter)"
- [compareWith]="compareByHref"
- style="vertical-align: top;"
- >
- <option
- *ngFor="let operator of availableOperators"
- [textContent]="operator.name"
- [ngValue]="operator"
- >
- </option>
- </select>
-
- <op-filter-boolean-value
- *ngIf="valueType === '[1]Boolean'"
- (filterChanged)="onFilterUpdated($event)"
- [shouldFocus]="shouldFocus"
- [filter]="filter"
- ></op-filter-boolean-value>
- </div>
- <!-- Values -->
- <ng-container *ngIf="showValuesInput && valueType">
- <div class="advanced-filters--filter-value" [ngSwitch]="valueType">
- <op-filter-integer-value
- *ngSwitchCase="'[1]Integer'"
- (filterChanged)="onFilterUpdated($event)"
- [shouldFocus]="shouldFocus"
- [filter]="filter"
- ></op-filter-integer-value>
-
- <op-filter-date-value
- *ngSwitchCase="'[1]Date'"
- (filterChanged)="onFilterUpdated($event)"
- [shouldFocus]="shouldFocus"
- [filter]="filter"
- ></op-filter-date-value>
-
- <op-filter-dates-value
- *ngSwitchCase="'[2]Date'"
- (filterChanged)="onFilterUpdated($event)"
- [shouldFocus]="shouldFocus"
- [filter]="filter"
- ></op-filter-dates-value>
-
- <op-filter-date-time-value
- *ngSwitchCase="'[1]DateTime'"
- (filterChanged)="onFilterUpdated($event)"
- [shouldFocus]="shouldFocus"
- [filter]="filter"
- ></op-filter-date-time-value>
-
- <op-filter-date-times-value
- *ngSwitchCase="'[2]DateTime'"
- [shouldFocus]="shouldFocus"
- (filterChanged)="onFilterUpdated($event)"
- [filter]="filter"
- ></op-filter-date-times-value>
-
- <op-filter-string-value
- *ngSwitchCase="'[1]String'"
- (filterChanged)="onFilterUpdated($event)"
- [shouldFocus]="shouldFocus"
- [filter]="filter"
- ></op-filter-string-value>
-
- <op-filter-string-value
- *ngSwitchCase="'[1]Float'"
- (filterChanged)="onFilterUpdated($event)"
- [shouldFocus]="shouldFocus"
- [filter]="filter"
- ></op-filter-string-value>
+ @if (valueType !== '[1]Boolean') {
+ <select
+ required
+ class="advanced-filters--select"
+ id="operators-{{filter.id}}"
+ name="op[{{filter.id}}]"
+ [(ngModel)]="filter.operator"
+ (ngModelChange)="onFilterUpdated(filter)"
+ [compareWith]="compareByHref"
+ style="vertical-align: top;"
+ >
+ @for (operator of availableOperators; track operator) {
+ <option
+ [textContent]="operator.name"
+ [ngValue]="operator"
+ >
+ </option>
+ }
+ </select>
+ }
- <op-filter-project
- *ngSwitchCase="'[]Project'"
+ @if (valueType === '[1]Boolean') {
+ <op-filter-boolean-value
(filterChanged)="onFilterUpdated($event)"
[shouldFocus]="shouldFocus"
[filter]="filter"
- ></op-filter-project>
-
- <ng-container *ngSwitchDefault>
- <op-filter-toggled-multiselect-value
- *ngIf="filter.currentSchema.loadedAllowedValues()"
- (filterChanged)="onFilterUpdated($event)"
- [shouldFocus]="shouldFocus"
- [filter]="filter"
- ></op-filter-toggled-multiselect-value>
- <op-filter-searchable-multiselect-value
- *ngIf="!filter.currentSchema.loadedAllowedValues()"
- (filterChanged)="onFilterUpdated($event)"
- [shouldFocus]="shouldFocus"
- [filter]="filter"
- ></op-filter-searchable-multiselect-value>
- </ng-container>
+ ></op-filter-boolean-value>
+ }
+ </div>
+ <!-- Values -->
+ @if (showValuesInput && valueType) {
+ <div class="advanced-filters--filter-value">
+ @switch (valueType) {
+ @case ('[1]Integer') {
+ <op-filter-integer-value
+ (filterChanged)="onFilterUpdated($event)"
+ [shouldFocus]="shouldFocus"
+ [filter]="filter"
+ ></op-filter-integer-value>
+ }
+ @case ('[1]Date') {
+ <op-filter-date-value
+ (filterChanged)="onFilterUpdated($event)"
+ [shouldFocus]="shouldFocus"
+ [filter]="filter"
+ ></op-filter-date-value>
+ }
+ @case ('[2]Date') {
+ <op-filter-dates-value
+ (filterChanged)="onFilterUpdated($event)"
+ [shouldFocus]="shouldFocus"
+ [filter]="filter"
+ ></op-filter-dates-value>
+ }
+ @case ('[1]DateTime') {
+ <op-filter-date-time-value
+ (filterChanged)="onFilterUpdated($event)"
+ [shouldFocus]="shouldFocus"
+ [filter]="filter"
+ ></op-filter-date-time-value>
+ }
+ @case ('[2]DateTime') {
+ <op-filter-date-times-value
+ [shouldFocus]="shouldFocus"
+ (filterChanged)="onFilterUpdated($event)"
+ [filter]="filter"
+ ></op-filter-date-times-value>
+ }
+ @case ('[1]String') {
+ <op-filter-string-value
+ (filterChanged)="onFilterUpdated($event)"
+ [shouldFocus]="shouldFocus"
+ [filter]="filter"
+ ></op-filter-string-value>
+ }
+ @case ('[1]Float') {
+ <op-filter-string-value
+ (filterChanged)="onFilterUpdated($event)"
+ [shouldFocus]="shouldFocus"
+ [filter]="filter"
+ ></op-filter-string-value>
+ }
+ @case ('[]Project') {
+ <op-filter-project
+ (filterChanged)="onFilterUpdated($event)"
+ [shouldFocus]="shouldFocus"
+ [filter]="filter"
+ ></op-filter-project>
+ }
+ @default {
+ @if (filter.currentSchema.loadedAllowedValues()) {
+ <op-filter-toggled-multiselect-value
+ (filterChanged)="onFilterUpdated($event)"
+ [shouldFocus]="shouldFocus"
+ [filter]="filter"
+ ></op-filter-toggled-multiselect-value>
+ }
+ @if (!filter.currentSchema.loadedAllowedValues()) {
+ <op-filter-searchable-multiselect-value
+ (filterChanged)="onFilterUpdated($event)"
+ [shouldFocus]="shouldFocus"
+ [filter]="filter"
+ ></op-filter-searchable-multiselect-value>
+ }
+ }
+ }
</div>
- </ng-container>
+ }
- <div
- class="advanced-filters--filter-value"
- *ngIf="!showValuesInput"
- ></div>
+ @if (!showValuesInput) {
+ <div
+ class="advanced-filters--filter-value"
+ ></div>
+ }
<div class="advanced-filters--remove-filter">
<button
@@ -137,7 +146,7 @@
class="spot-link"
[title]="text.button_delete"
(click)="removeThisFilter()"
- >
+ >
<op-icon icon-classes="icon-close advanced-filters--remove-filter-icon"></op-icon>
</button>
</div>
diff --git a/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.html b/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.html
index 09950aa4add..a1968720f9b 100644
--- a/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.html
+++ b/frontend/src/app/features/work-packages/components/filters/query-filters/query-filters.component.html
@@ -1,83 +1,83 @@
-<fieldset id="filters" *ngIf="filters" class="advanced-filters--container">
- <legend [textContent]="text.selected_filter_list"></legend>
-
- <a *ngIf="showCloseFilter"
- [attr.title]="text.close_form"
- class="advanced-filters--close icon-context icon-close"
- (click)="closeFilter()">
- </a>
-
- <ul class="advanced-filters--filters">
- <li id="filter_search"
+@if (filters) {
+ <fieldset id="filters" class="advanced-filters--container">
+ <legend [textContent]="text.selected_filter_list"></legend>
+ @if (showCloseFilter) {
+ <a
+ [attr.title]="text.close_form"
+ class="advanced-filters--close icon-context icon-close"
+ (click)="closeFilter()">
+ </a>
+ }
+ <ul class="advanced-filters--filters">
+ <li id="filter_search"
class="advanced-filters--filter --without-operator">
- <label for="filter-by-text-input"
- class="advanced-filters--filter-name"
- [textContent]="text.filter_by_text"
- [attr.title]="text.filter_by_text">
- </label>
-
- <div class="advanced-filters--filter-value">
- <wp-filter-by-text-input
- (deactivateFilter)="deactivateFilter($event)">
- </wp-filter-by-text-input>
- </div>
- </li>
-
- <li class="advanced-filters--spacer"></li>
-
- <ng-container *ngFor="let filter of filters; trackBy: trackByName ; let index = index">
- <li *ngIf="isFilterAvailable(filter)"
- id="filter_{{filter.id}}"
- query-filter
- [shouldFocus]="index === focusElementIndex"
- [filter]="filter"
- (deactivateFilter)="deactivateFilter($event)"
- (filterChanged)="filtersChanged.emit(filters)"
- class="advanced-filters--filter">
+ <label for="filter-by-text-input"
+ class="advanced-filters--filter-name"
+ [textContent]="text.filter_by_text"
+ [attr.title]="text.filter_by_text">
+ </label>
+ <div class="advanced-filters--filter-value">
+ <wp-filter-by-text-input
+ (deactivateFilter)="deactivateFilter($event)">
+ </wp-filter-by-text-input>
+ </div>
+ </li>
+ <li class="advanced-filters--spacer"></li>
+ @for (filter of filters; track trackByName(index, filter); let index = $index) {
+ @if (isFilterAvailable(filter)) {
+ <li
+ id="filter_{{filter.id}}"
+ query-filter
+ [shouldFocus]="index === focusElementIndex"
+ [filter]="filter"
+ (deactivateFilter)="deactivateFilter($event)"
+ (filterChanged)="filtersChanged.emit(filters)"
+ class="advanced-filters--filter">
+ </li>
+ }
+ }
+ @if (isSecondSpacerVisible) {
+ <li class="advanced-filters--spacer"></li>
+ }
+ <li class="advanced-filters--add-filter">
+ <!-- Add filters -->
+ <label for="add_filter_select" aria-hidden="true" class="advanced-filters--add-filter-label">
+ <op-icon icon-classes="icon-add icon4"></op-icon>
+ {{ text.label_filter_add }}:
+ </label>
+ <label for="add_filter_select" class="sr-only">
+ {{ text.label_filter_add }}
+ {{ text.open_filter }}
+ {{ text.close_filter }}
+ </label>
+ <div class="advanced-filters--add-filter-value">
+ <ng-select #ngSelectComponent
+ [items]="remainingFilters"
+ [clearSearchOnAdd]="true"
+ [multiple]="false"
+ [clearable]="true"
+ [clearOnBackspace]="true"
+ [closeOnSelect]="true"
+ [virtualScroll]="true"
+ [placeholder]="text.please_select"
+ [searchFn]="searchFunction"
+ (open)="onOpen()"
+ (change)="onFilterAdded($event)"
+ id="add_filter_select"
+ bindLabel="name"
+ appendTo="body">
+ </ng-select>
+ </div>
</li>
- </ng-container>
-
- <li class="advanced-filters--spacer" *ngIf="isSecondSpacerVisible"></li>
-
- <li class="advanced-filters--add-filter">
- <!-- Add filters -->
- <label for="add_filter_select" aria-hidden="true" class="advanced-filters--add-filter-label">
- <op-icon icon-classes="icon-add icon4"></op-icon>
- {{ text.label_filter_add }}:
- </label>
- <label for="add_filter_select" class="sr-only">
- {{ text.label_filter_add }}
- {{ text.open_filter }}
- {{ text.close_filter }}
- </label>
-
- <div class="advanced-filters--add-filter-value">
- <ng-select #ngSelectComponent
- [items]="remainingFilters"
- [clearSearchOnAdd]="true"
- [multiple]="false"
- [clearable]="true"
- [clearOnBackspace]="true"
- [closeOnSelect]="true"
- [virtualScroll]="true"
- [placeholder]="text.please_select"
- [searchFn]="searchFunction"
- (open)="onOpen()"
- (change)="onFilterAdded($event)"
- id="add_filter_select"
- bindLabel="name"
- appendTo="body">
- </ng-select>
+ </ul>
+ @if (baselineIncompatibleFilters.length > 0) {
+ <div
+ class="op-toast -warning">
+ <div class="op-toast--content">
+ <p [textContent]="text.baseline_warning">
+ </p>
+ </div>
</div>
- </li>
- </ul>
-
- <div
- *ngIf="baselineIncompatibleFilters.length > 0"
- class="op-toast -warning">
- <div class="op-toast--content">
- <p [textContent]="text.baseline_warning">
- </p>
- </div>
- </div>
-</fieldset>
+ }
+ </fieldset>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.html b/frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.html
index e71fa1921cb..b121b4926ac 100644
--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.html
@@ -1,12 +1,13 @@
<span class="op-baseline-legends--filter">
<span [textContent]="legendDescription"></span>
&ngsp;
- <span
- *ngIf="userOffset !== offset"
- data-test-selector="baseline-legend-time-offset"
- class="spot-icon spot-icon_1 spot-icon_info2"
- title="{{ text.in_your_timezone }} {{ localDate }}"
- ></span>
+ @if (userOffset !== offset) {
+ <span
+ data-test-selector="baseline-legend-time-offset"
+ class="spot-icon spot-icon_1 spot-icon_info2"
+ title="{{ text.in_your_timezone }} {{ localDate }}"
+ ></span>
+ }
</span>
<div class="op-baseline-legends--details hidden-for-mobile">
<span class="spot-icon spot-icon_1 spot-icon_arrow-in op-baseline-legends--details-icon-added"></span>
diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.html b/frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.html
index 5f0e3330865..c43c1bf7883 100644
--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component.html
@@ -14,7 +14,7 @@
>
<span class="spot-icon spot-icon_baseline"></span>
{{ text.toggle_title }}
-
+
<span class="spot-icon spot-icon_dropdown"></span>
</button>
<op-baseline
diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html
index 23e7812a7d3..8ea9e719773 100644
--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html
@@ -1,222 +1,207 @@
<div class="op-baseline--header"
- [class.op-baseline--header_banner-active]="!available"
- [class.op-baseline_tab]="!showActionBar">
+ [class.op-baseline--header_banner-active]="!available"
+ [class.op-baseline_tab]="!showActionBar">
<op-enterprise-banner-frame
feature="baseline_comparison"
[dismissable]="true"
></op-enterprise-banner-frame>
- <span
- *ngIf="available"
- class="spot-body-small" [textContent]="text.header_description"
- ></span>
-</div>
-<form
- *ngIf="visible && (nonWorkingDays$ | async); else loadingTemplate"
- (submit)="onSubmit($event)"
- class="spot-container op-baseline--body"
- [class.op-baseline--body_ranged]="selectedFilter === 'betweenTwoSpecificDates'"
- [class.op-baseline_tab]="!showActionBar"
->
-
-
- <spot-form-field
- [label]="text.show_changes_since">
-
- <div slot="input">
- <select
- name="op-baseline-filter"
- class="op-baseline--filter"
- (change)="filterChange($event.target.value)"
- >
- <option [textContent]="text.drop_down_none_option"
- [selected]="!filterSelected"
- [value]="'-'"></option>
- <option
- *ngFor="let availableValue of baselineAvailableValues"
- [value]="availableValue.value"
- [selected]="availableValue.value === selectedFilter"
- [disabled]="!(available || availableValue.value === 'oneDayAgo')"
- >
- {{availableValue.title}}
- </option>
- </select>
-
- </div>
- <span slot="description" *ngIf="mappedSelectedDate"> {{ mappedSelectedDate }} </span>
- </spot-form-field>
-
- <spot-form-field
- [label]="text.date"
- *ngIf="selectedFilter === 'aSpecificDate'"
- class="op-baseline--date">
-
- <input
- slot="input"
- name="op-baseline-date"
- [value]="selectedDates[0] || ''"
- (input)="dateChange([$event.target.value])"
- type="text"
- class="op-baseline--date-input"/>
- </spot-form-field>
-
- <spot-form-field
- *ngIf="selectedFilter && selectedFilter !== 'betweenTwoSpecificDates'"
- [label]="text.time"
- class="op-baseline--time">
-
- <input
- slot="input"
- name="op-baseline-time"
- [value]="selectedTimes[0]"
- (change)="timesChange([$event.target.value])"
- type="time"
- class="op-baseline--time-input"/>
-
+ @if (available) {
<span
- slot="input"
- class="op-baseline--time-help spot-body-small"
- [attr.title]="text.help_description"
- [textContent]="mappedOffset(selectedOffsets[0])"
+ class="spot-body-small" [textContent]="text.header_description"
></span>
-
- <span
- *ngIf="userOffset !== selectedOffsets[0]"
- slot="description"
- [textContent]="text.time_description(0)"></span>
- </spot-form-field>
-
- <div
- *ngIf="selectedFilter === 'betweenTwoSpecificDates'"
- class="op-baseline--range-container"
+ }
+</div>
+@if (visible && (nonWorkingDays$ | async)) {
+ <form
+ (submit)="onSubmit($event)"
+ class="spot-container op-baseline--body"
+ [class.op-baseline--body_ranged]="selectedFilter === 'betweenTwoSpecificDates'"
+ [class.op-baseline_tab]="!showActionBar"
>
-
- <spot-form-field
- [label]="text.from"
- class="op-baseline--from-date">
-
- <input
- slot="input"
- name="op-baseline-from-date"
- [value]="selectedDates[0] || ''"
- (input)="dateChange([$event.target.value, selectedDates[1] || ''])"
- type="text"
- class="op-baseline--date-input"/>
- <button
- slot="action"
- type="button"
- class="spot-link"
- (click)="setToday('from')"
- [textContent]="text.today">
- </button>
- </spot-form-field>
-
- <spot-form-field
- [label]="text.to"
- class="op-baseline--date">
-
- <input
- slot="input"
- name="op-baseline-to-date"
- [value]="selectedDates[1] || ''"
- (input)="dateChange([selectedDates[0] || '', $event.target.value])"
- type="text"
- class="op-baseline--date-input"/>
- <button
- slot="action"
- type="button"
- class="spot-link"
- (click)="setToday('to')"
- [textContent]="text.today">
- </button>
- </spot-form-field>
-
<spot-form-field
- class="op-baseline--time">
-
- <input
- slot="input"
- name="op-baseline-from-time"
- [value]="selectedTimes[0] || ''"
- (change)="timesChange([$event.target.value, selectedTimes[1]])"
- type="time"
- class="op-baseline--time-input"/>
-
- <spot-tooltip
- slot="input"
- class="op-baseline--time-tooltip op-baseline--time-help spot-body-small"
- [alignment]="tooltipPosition"
- [disabled]="false"
- [light]="true">
- <span slot="trigger" class="op-baseline--time-zone" [textContent]="mappedOffset(selectedOffsets[0])"></span>
- <span slot="body" class="spot-body-small op-baseline--time-tooltip-body">{{ text.help_description }}</span>
- </spot-tooltip>
-
-
- <span
- *ngIf="userOffset !== selectedOffsets[0]"
- slot="description" [textContent]="text.time_description(0)"></span>
- </spot-form-field>
-
- <spot-form-field
- class="op-baseline--time">
-
- <input
- slot="input"
- name="op-baseline-to-time"
- [value]="selectedTimes[1] || ''"
- (change)="timesChange([selectedTimes[0], $event.target.value])"
- type="time"
- class="op-baseline--time-input"/>
-
- <spot-tooltip
- slot="input"
- class="op-baseline--time-tooltip op-baseline--time-help spot-body-small"
- [alignment]="tooltipPosition"
- [disabled]="false"
- [light]="true">
- <span slot="trigger" class="op-baseline--time-zone" [textContent]="mappedOffset(selectedOffsets[1])"></span>
- <span slot="body" class="spot-body-small op-baseline--time-tooltip-body">{{ text.help_description }}</span>
- </spot-tooltip>
-
-
- <span
- *ngIf="userOffset !== selectedOffsets[1]"
- slot="description" [textContent]="text.time_description(1)"></span>
+ [label]="text.show_changes_since">
+ <div slot="input">
+ <select
+ name="op-baseline-filter"
+ class="op-baseline--filter"
+ (change)="filterChange($event.target.value)"
+ >
+ <option [textContent]="text.drop_down_none_option"
+ [selected]="!filterSelected"
+ [value]="'-'"></option>
+ @for (availableValue of baselineAvailableValues; track availableValue) {
+ <option
+ [value]="availableValue.value"
+ [selected]="availableValue.value === selectedFilter"
+ [disabled]="!(available || availableValue.value === 'oneDayAgo')"
+ >
+ {{availableValue.title}}
+ </option>
+ }
+ </select>
+ </div>
+ @if (mappedSelectedDate) {
+ <span slot="description"> {{ mappedSelectedDate }} </span>
+ }
</spot-form-field>
- </div>
-
- <op-datepicker-sheet
- class="op-baseline--datepicker"
- *ngIf="selectedFilter === 'aSpecificDate' || selectedFilter === 'betweenTwoSpecificDates'"
- [dates]="selectedFilter === 'betweenTwoSpecificDates' ? selectedDates : [selectedDates[0]]"
- [mode]="selectedFilter === 'betweenTwoSpecificDates' ? 'range' : 'single'"
- [isDisabled]="futureDateComparer()"
- (datesSelected)="selectedDates = $event"
- >
- </op-datepicker-sheet>
-
- <div class="spot-action-bar"
- *ngIf="showActionBar">
-
- <div class="spot-action-bar--right">
- <button
- class="button spot-action-bar--action"
- [disabled]="!selectedFilter"
- type="button"
- (click)="resetSelection()"
- >
- {{ text.clear }}
- </button>
- <button
- class="button -primary spot-action-bar--action"
- >
- {{ text.apply }}
- </button>
- </div>
- </div>
-</form>
-
-<ng-template #loadingTemplate>
+ @if (selectedFilter === 'aSpecificDate') {
+ <spot-form-field
+ [label]="text.date"
+ class="op-baseline--date">
+ <input
+ slot="input"
+ name="op-baseline-date"
+ [value]="selectedDates[0] || ''"
+ (input)="dateChange([$event.target.value])"
+ type="text"
+ class="op-baseline--date-input"/>
+ </spot-form-field>
+ }
+ @if (selectedFilter && selectedFilter !== 'betweenTwoSpecificDates') {
+ <spot-form-field
+ [label]="text.time"
+ class="op-baseline--time">
+ <input
+ slot="input"
+ name="op-baseline-time"
+ [value]="selectedTimes[0]"
+ (change)="timesChange([$event.target.value])"
+ type="time"
+ class="op-baseline--time-input"/>
+ <span
+ slot="input"
+ class="op-baseline--time-help spot-body-small"
+ [attr.title]="text.help_description"
+ [textContent]="mappedOffset(selectedOffsets[0])"
+ ></span>
+ @if (userOffset !== selectedOffsets[0]) {
+ <span
+ slot="description"
+ [textContent]="text.time_description(0)"></span>
+ }
+ </spot-form-field>
+ }
+ @if (selectedFilter === 'betweenTwoSpecificDates') {
+ <div
+ class="op-baseline--range-container"
+ >
+ <spot-form-field
+ [label]="text.from"
+ class="op-baseline--from-date">
+ <input
+ slot="input"
+ name="op-baseline-from-date"
+ [value]="selectedDates[0] || ''"
+ (input)="dateChange([$event.target.value, selectedDates[1] || ''])"
+ type="text"
+ class="op-baseline--date-input"/>
+ <button
+ slot="action"
+ type="button"
+ class="spot-link"
+ (click)="setToday('from')"
+ [textContent]="text.today">
+ </button>
+ </spot-form-field>
+ <spot-form-field
+ [label]="text.to"
+ class="op-baseline--date">
+ <input
+ slot="input"
+ name="op-baseline-to-date"
+ [value]="selectedDates[1] || ''"
+ (input)="dateChange([selectedDates[0] || '', $event.target.value])"
+ type="text"
+ class="op-baseline--date-input"/>
+ <button
+ slot="action"
+ type="button"
+ class="spot-link"
+ (click)="setToday('to')"
+ [textContent]="text.today">
+ </button>
+ </spot-form-field>
+ <spot-form-field
+ class="op-baseline--time">
+ <input
+ slot="input"
+ name="op-baseline-from-time"
+ [value]="selectedTimes[0] || ''"
+ (change)="timesChange([$event.target.value, selectedTimes[1]])"
+ type="time"
+ class="op-baseline--time-input"/>
+ <spot-tooltip
+ slot="input"
+ class="op-baseline--time-tooltip op-baseline--time-help spot-body-small"
+ [alignment]="tooltipPosition"
+ [disabled]="false"
+ [light]="true">
+ <span slot="trigger" class="op-baseline--time-zone" [textContent]="mappedOffset(selectedOffsets[0])"></span>
+ <span slot="body" class="spot-body-small op-baseline--time-tooltip-body">{{ text.help_description }}</span>
+ </spot-tooltip>
+ @if (userOffset !== selectedOffsets[0]) {
+ <span
+ slot="description" [textContent]="text.time_description(0)"></span>
+ }
+ </spot-form-field>
+ <spot-form-field
+ class="op-baseline--time">
+ <input
+ slot="input"
+ name="op-baseline-to-time"
+ [value]="selectedTimes[1] || ''"
+ (change)="timesChange([selectedTimes[0], $event.target.value])"
+ type="time"
+ class="op-baseline--time-input"/>
+ <spot-tooltip
+ slot="input"
+ class="op-baseline--time-tooltip op-baseline--time-help spot-body-small"
+ [alignment]="tooltipPosition"
+ [disabled]="false"
+ [light]="true">
+ <span slot="trigger" class="op-baseline--time-zone" [textContent]="mappedOffset(selectedOffsets[1])"></span>
+ <span slot="body" class="spot-body-small op-baseline--time-tooltip-body">{{ text.help_description }}</span>
+ </spot-tooltip>
+ @if (userOffset !== selectedOffsets[1]) {
+ <span
+ slot="description" [textContent]="text.time_description(1)"></span>
+ }
+ </spot-form-field>
+ </div>
+ }
+ @if (selectedFilter === 'aSpecificDate' || selectedFilter === 'betweenTwoSpecificDates') {
+ <op-datepicker-sheet
+ class="op-baseline--datepicker"
+ [dates]="selectedFilter === 'betweenTwoSpecificDates' ? selectedDates : [selectedDates[0]]"
+ [mode]="selectedFilter === 'betweenTwoSpecificDates' ? 'range' : 'single'"
+ [isDisabled]="futureDateComparer()"
+ (datesSelected)="selectedDates = $event"
+ >
+ </op-datepicker-sheet>
+ }
+ @if (showActionBar) {
+ <div class="spot-action-bar"
+ >
+ <div class="spot-action-bar--right">
+ <button
+ class="button spot-action-bar--action"
+ [disabled]="!selectedFilter"
+ type="button"
+ (click)="resetSelection()"
+ >
+ {{ text.clear }}
+ </button>
+ <button
+ class="button -primary spot-action-bar--action"
+ >
+ {{ text.apply }}
+ </button>
+ </div>
+ </div>
+ }
+ </form>
+} @else {
<op-baseline-loading></op-baseline-loading>
-</ng-template>
+}
+
diff --git a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.html b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.html
index a38b37bb1a8..ce0c4841e77 100644
--- a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.html
+++ b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb-parent.html
@@ -1,39 +1,46 @@
-<ng-container *ngIf="!active">
- <a *ngIf="parent"
- [attr.title]="parent.name"
- uiSref="work-packages.show"
- [uiParams]="{ workPackageId: parent.id }"
- class="op-wp-breadcrumb-parent nocut"
- data-test-selector="op-wp-breadcrumb-parent">
- <span [textContent]="parent.name"></span>
- </a>
- <button
- *ngIf="canModifyParent()"
+@if (!active) {
+ @if (parent) {
+ <a
+ [attr.title]="parent.name"
+ uiSref="work-packages.show"
+ [uiParams]="{ workPackageId: parent.id }"
+ class="op-wp-breadcrumb-parent nocut"
+ data-test-selector="op-wp-breadcrumb-parent">
+ <span [textContent]="parent.name"></span>
+ </a>
+ }
+ @if (canModifyParent()) {
+ <button
type="button"
class="spot-link wp-relation--parent-change -no-decoration hide-when-print"
[title]="parent ? text.edit_parent : text.set_parent"
(click)="open()"
- >
- <span *ngIf="!parent" [textContent]="text.set_parent"></span>
- <op-icon icon-classes="icon-small {{ parent ? 'icon-edit icon5 icon-no-color' : 'icon-add icon4' }}"></op-icon>
- </button>
- <button
- *ngIf="canModifyParent() && parent"
+ >
+ @if (!parent) {
+ <span [textContent]="text.set_parent"></span>
+ }
+ <op-icon icon-classes="icon-small {{ parent ? 'icon-edit icon5 icon-no-color' : 'icon-add icon4' }}"></op-icon>
+ </button>
+ }
+ @if (canModifyParent() && parent) {
+ <button
type="button"
class="spot-link wp-relation--parent-remove hide-when-print -no-decoration"
[title]="text.remove_parent"
(click)="updateParent(null)"
- >
- <op-icon icon-classes="icon-small icon-no-color icon-remove icon4"></op-icon>
- </button>
-</ng-container>
+ >
+ <op-icon icon-classes="icon-small icon-no-color icon-remove icon4"></op-icon>
+ </button>
+ }
+}
-<wp-relations-autocomplete
- *ngIf="active"
- [placeholder]="text.set_or_remove_parent"
- [workPackage]="workPackage"
- (cancel)="close()"
- (change)="updateParent($event)"
- data-test-selector="wp-relations-autocomplete"
- filterCandidatesFor="parent">
-</wp-relations-autocomplete>
+@if (active) {
+ <wp-relations-autocomplete
+ [placeholder]="text.set_or_remove_parent"
+ [workPackage]="workPackage"
+ (cancel)="close()"
+ (change)="updateParent($event)"
+ data-test-selector="wp-relations-autocomplete"
+ filterCandidatesFor="parent">
+ </wp-relations-autocomplete>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.html b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.html
index bd4fffd4c4d..669f93c2e44 100644
--- a/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.html
+++ b/frontend/src/app/features/work-packages/components/wp-breadcrumb/wp-breadcrumb.html
@@ -1,28 +1,31 @@
-<div class="op-wp-breadcrumb -show"
- data-test-selector="op-wp-breadcrumb"
- *ngIf="workPackage">
- <ul class="op-breadcrumb"
+@if (workPackage) {
+ <div class="op-wp-breadcrumb -show"
+ data-test-selector="op-wp-breadcrumb"
+ >
+ <ul class="op-breadcrumb"
data-test-selector="op-breadcrumb">
- <ng-container *ngIf="!inputActive && hierarchyCount > 0">
- <li>
- <span>{{ hierarchyLabel }}: </span>
- </li>
- <ng-container *ngFor="let ancestor of workPackage.getAncestors(); let first = first ; let last = last">
- <li
- *ngIf="!last"
- class="op-wp-breadcrumb--ellipsed"
- [ngClass]="{ 'icon4 icon-small icon-arrow-right5': !first }">
- <a [attr.title]="ancestor.name"
- [textContent]="ancestor.name"
- uiSref="work-packages.show"
- [uiParams]="{workPackageId: ancestor.id}"
- class="nocut"></a>
+ @if (!inputActive && hierarchyCount > 0) {
+ <li>
+ <span>{{ hierarchyLabel }}: </span>
</li>
- </ng-container>
- </ng-container>
- <li
+ @for (ancestor of workPackage.getAncestors(); track ancestor; let first = $first; let last = $last) {
+ @if (!last) {
+ <li
+ class="op-wp-breadcrumb--ellipsed"
+ [ngClass]="{ 'icon4 icon-small icon-arrow-right5': !first }">
+ <a [attr.title]="ancestor.name"
+ [textContent]="ancestor.name"
+ uiSref="work-packages.show"
+ [uiParams]="{workPackageId: ancestor.id}"
+ class="nocut"></a>
+ </li>
+ }
+ }
+ }
+ <li
[ngClass]="{ 'op-wp-breadcrumb--active-parent-select': inputActive, 'icon4 icon-small icon-arrow-right5': !inputActive && hierarchyCount > 1 }">
- <wp-breadcrumb-parent (onSwitch)="updateActiveInput($event)" [workPackage]="workPackage"></wp-breadcrumb-parent>
- </li>
- </ul>
-</div>
+ <wp-breadcrumb-parent (onSwitch)="updateActiveInput($event)" [workPackage]="workPackage"></wp-breadcrumb-parent>
+ </li>
+ </ul>
+ </div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-filter-button/wp-filter-button.html b/frontend/src/app/features/work-packages/components/wp-buttons/wp-filter-button/wp-filter-button.html
index 5b0928eeb72..4e531bd2d73 100644
--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-filter-button/wp-filter-button.html
+++ b/frontend/src/app/features/work-packages/components/wp-buttons/wp-filter-button/wp-filter-button.html
@@ -8,11 +8,13 @@
(click)="performAction($event)"
[ngClass]="{ '-active': isActive }"
data-test-selector="wp-filter-button"
->
+ >
<op-icon icon-classes="{{ iconClass }} button--icon"></op-icon>
<span class="button--text">
{{ buttonText }}
- <span class="badge" *ngIf="initialized" [textContent]="filterCount"></span>
+ @if (initialized) {
+ <span class="badge" [textContent]="filterCount"></span>
+ }
</span>
<span class="spot-icon spot-icon_dropdown"></span>
</button>
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-reminder-button/wp-reminder-button.html b/frontend/src/app/features/work-packages/components/wp-buttons/wp-reminder-button/wp-reminder-button.html
index 8b3a86ad89a..d52cf5d4fed 100644
--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-reminder-button/wp-reminder-button.html
+++ b/frontend/src/app/features/work-packages/components/wp-buttons/wp-reminder-button/wp-reminder-button.html
@@ -1,21 +1,21 @@
-<button
- *ngIf="(hasReminder$ | async); else noReminder"
- class="button toolbar-icon"
- data-test-selector="op-wp-reminder-button"
- [attr.title]="buttonTitle"
- (click)="openModal()"
->
- <svg op-alarm-set-icon class="button--icon" size="small"></svg>
-</button>
-
-<ng-template #noReminder>
+@if ((hasReminder$ | async)) {
+ <button
+ class="button toolbar-icon"
+ data-test-selector="op-wp-reminder-button"
+ [attr.title]="buttonTitle"
+ (click)="openModal()"
+ >
+ <svg op-alarm-set-icon class="button--icon" size="small"></svg>
+ </button>
+} @else {
<button
class="button toolbar-icon"
data-test-selector="op-wp-reminder-button"
[attr.title]="buttonTitle"
wpReminderContextMenu
[wpReminderContextMenu-workPackage]="workPackage"
- >
+ >
<svg op-alarm-icon class="button--icon" size="small"></svg>
</button>
-</ng-template>
+}
+
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.html b/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.html
index d16e82fe04e..17d62d45c7d 100644
--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.html
+++ b/frontend/src/app/features/work-packages/components/wp-buttons/wp-share-button/wp-share-button.html
@@ -3,22 +3,25 @@
data-test-selector="op-wp-share-button"
[title]="text.share"
(click)="openModal()"
->
+ >
<svg
share-android-icon
class="button--icon"
size="small"
></svg>
- <span class="button--text" *ngIf="(shareCount$ | async) as shareCount">
- <span class="badge"
- [textContent]="shareCount"></span>
- </span>
+ @if ((shareCount$ | async); as shareCount) {
+ <span class="button--text">
+ <span class="badge"
+ [textContent]="shareCount"></span>
+ </span>
+ }
- <svg
- *ngIf="showEnterpriseIcon"
- op-enterprise-addons-icon
- class="button--icon upsell-colored"
- size="small"
- ></svg>
+ @if (showEnterpriseIcon) {
+ <svg
+ op-enterprise-addons-icon
+ class="button--icon upsell-colored"
+ size="small"
+ ></svg>
+ }
</button>
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-status-button/wp-status-button.html b/frontend/src/app/features/work-packages/components/wp-buttons/wp-status-button/wp-status-button.html
index 68fa126d21f..84ec2793f49 100644
--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-status-button/wp-status-button.html
+++ b/frontend/src/app/features/work-packages/components/wp-buttons/wp-status-button/wp-status-button.html
@@ -1,30 +1,32 @@
-<div
- class="op-wp-status-button"
- [ngClass]="{'op-wp-status-button_small' : small}"
- data-test-selector="op-wp-status-button"
- [attr.title]="buttonTitle"
- *ngIf="status"
->
- <button
- class="op-wp-status-button--button button"
- [ngClass]="statusHighlightClass"
- [disabled]="!allowed"
- [attr.aria-label]="text.explanation"
- [title]="status.name"
- wpStatusDropdown
- [wpStatusDropdown-workPackage]="workPackage"
- >
- <span
- *ngIf="isReadonly"
- class="op-wp-status-button--text button--text"
+@if (status) {
+ <div
+ class="op-wp-status-button"
+ [ngClass]="{'op-wp-status-button_small' : small}"
+ data-test-selector="op-wp-status-button"
+ [attr.title]="buttonTitle"
>
- <op-icon icon-classes="button--icon icon-locked"></op-icon>
- </span>
- <span
- class="op-wp-status-button--text button--text"
- aria-hidden="true"
- [textContent]="status.name"
- ></span>
- <op-icon icon-classes="button--icon icon-small icon-pulldown"></op-icon>
- </button>
-</div>
+ <button
+ class="op-wp-status-button--button button"
+ [ngClass]="statusHighlightClass"
+ [disabled]="!allowed"
+ [attr.aria-label]="text.explanation"
+ [title]="status.name"
+ wpStatusDropdown
+ [wpStatusDropdown-workPackage]="workPackage"
+ >
+ @if (isReadonly) {
+ <span
+ class="op-wp-status-button--text button--text"
+ >
+ <op-icon icon-classes="button--icon icon-locked"></op-icon>
+ </span>
+ }
+ <span
+ class="op-wp-status-button--text button--text"
+ aria-hidden="true"
+ [textContent]="status.name"
+ ></span>
+ <op-icon icon-classes="button--icon icon-small icon-pulldown"></op-icon>
+ </button>
+ </div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.html b/frontend/src/app/features/work-packages/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.html
index 0d8bacdcc57..637b280e4cb 100644
--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.html
+++ b/frontend/src/app/features/work-packages/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.html
@@ -1,33 +1,39 @@
<ul id="work-packages-timeline-mode-selection"
- class="toolbar-button-group work-packages-timeline-toggle-button">
+ class="toolbar-button-group work-packages-timeline-toggle-button">
- <li *ngIf="isActive">
- <button id="work-packages-timeline-zoom-auto-button"
- class="button timeline-toolbar--button toolbar-icon"
- [ngClass]="getAutoZoomToggleClass()"
- [attr.title]="text.zoomAuto"
- (click)="enableAutoZoom()">
- <op-icon icon-classes="icon-zoom-auto button--icon"></op-icon>
- </button>
- </li>
+ @if (isActive) {
+ <li>
+ <button id="work-packages-timeline-zoom-auto-button"
+ class="button timeline-toolbar--button toolbar-icon"
+ [ngClass]="getAutoZoomToggleClass()"
+ [attr.title]="text.zoomAuto"
+ (click)="enableAutoZoom()">
+ <op-icon icon-classes="icon-zoom-auto button--icon"></op-icon>
+ </button>
+ </li>
+ }
- <li *ngIf="isActive">
- <button id="work-packages-timeline-zoom-out-button"
- class="button timeline-toolbar--button toolbar-icon"
- [attr.title]="text.zoomOut"
- [disabled]="isMaxLevel"
- (click)="updateZoomWithDelta(1)">
- <op-icon icon-classes="icon-zoom-out button--icon"></op-icon>
- </button>
- </li>
+ @if (isActive) {
+ <li>
+ <button id="work-packages-timeline-zoom-out-button"
+ class="button timeline-toolbar--button toolbar-icon"
+ [attr.title]="text.zoomOut"
+ [disabled]="isMaxLevel"
+ (click)="updateZoomWithDelta(1)">
+ <op-icon icon-classes="icon-zoom-out button--icon"></op-icon>
+ </button>
+ </li>
+ }
- <li *ngIf="isActive">
- <button id="work-packages-timeline-zoom-in-button"
- class="button timeline-toolbar--button toolbar-icon"
- [attr.title]="text.zoomIn"
- [disabled]="isMinLevel"
- (click)="updateZoomWithDelta(-1)">
- <op-icon icon-classes="icon-zoom-in button--icon"></op-icon>
- </button>
- </li>
+ @if (isActive) {
+ <li>
+ <button id="work-packages-timeline-zoom-in-button"
+ class="button timeline-toolbar--button toolbar-icon"
+ [attr.title]="text.zoomIn"
+ [disabled]="isMinLevel"
+ (click)="updateZoomWithDelta(-1)">
+ <op-icon icon-classes="icon-zoom-in button--icon"></op-icon>
+ </button>
+ </li>
+ }
</ul>
diff --git a/frontend/src/app/features/work-packages/components/wp-card-view/wp-card-view.component.html b/frontend/src/app/features/work-packages/components/wp-card-view/wp-card-view.component.html
index d2c8a8d28be..8b57aa1971d 100644
--- a/frontend/src/app/features/work-packages/components/wp-card-view/wp-card-view.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-card-view/wp-card-view.component.html
@@ -1,37 +1,42 @@
<div #container
- data-test-selector="op-wp-card-view"
- [ngClass]="classes()">
- <div *ngIf="inReference"
- class="wp-inline-create--reference-container">
- <ndc-dynamic [ndcDynamicComponent]="referenceClass"
- [ndcDynamicInjector]="injector"
- [ndcDynamicOutputs]="referenceOutputs">
- </ndc-dynamic>
- </div>
+ data-test-selector="op-wp-card-view"
+ [ngClass]="classes()">
+ @if (inReference) {
+ <div
+ class="wp-inline-create--reference-container">
+ <ndc-dynamic [ndcDynamicComponent]="referenceClass"
+ [ndcDynamicInjector]="injector"
+ [ndcDynamicOutputs]="referenceOutputs">
+ </ndc-dynamic>
+ </div>
+ }
- <ng-container *ngFor="let wp of workPackages; trackBy:trackByHref">
+ @for (wp of workPackages; track trackByHref($index, wp)) {
<wp-single-card [workPackage]="wp"
- [attr.data-is-new]="isNewResource(wp) || undefined"
- [attr.data-work-package-id]="wp.id"
- [attr.data-class-identifier]="cardView.classIdentifier(wp)"
- [showInfoButton]="showInfoButton"
- [showStatusButton]="showStatusButton"
- [showRemoveButton]="cardsRemovable"
- [highlightingMode]="highlightingMode"
- [draggable]="this.canDragOutOf(wp)"
- [orientation]="orientation"
- [shrinkOnMobile]="shrinkOnMobile"
- (onRemove)="removeCard(wp)"
- (stateLinkClicked)="stateLinkClicked.emit($event)">
+ [attr.data-is-new]="isNewResource(wp) || undefined"
+ [attr.data-work-package-id]="wp.id"
+ [attr.data-class-identifier]="cardView.classIdentifier(wp)"
+ [showInfoButton]="showInfoButton"
+ [showStatusButton]="showStatusButton"
+ [showRemoveButton]="cardsRemovable"
+ [highlightingMode]="highlightingMode"
+ [draggable]="this.canDragOutOf(wp)"
+ [orientation]="orientation"
+ [shrinkOnMobile]="shrinkOnMobile"
+ (onRemove)="removeCard(wp)"
+ (stateLinkClicked)="stateLinkClicked.emit($event)">
</wp-single-card>
-
- <hr *ngIf="shrinkOnMobile"
+ @if (shrinkOnMobile) {
+ <hr
class="form--separator hidden-for-desktop">
- </ng-container>
+ }
+ }
</div>
-<div *ngIf="showEmptyResultsBox && isResultEmpty">
- <op-no-results [title]="text.noResults.title" [description]="text.noResults.description"></op-no-results>
-</div>
+@if (showEmptyResultsBox && isResultEmpty) {
+ <div>
+ <op-no-results [title]="text.noResults.title" [description]="text.noResults.description"></op-no-results>
+ </div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.html b/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.html
index f8a8d2f903c..cff00e2f77d 100644
--- a/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-card-view/wp-single-card/wp-single-card.component.html
@@ -9,156 +9,166 @@
(click)="cardClicked.emit({ workPackageId: workPackage.id, event: $event })"
(dblclick)="cardDblClicked.emit({ workPackageId: workPackage.id, event: $event })"
(contextmenu)="cardContextMenu.emit({ workPackageId: workPackage.id, event: $event })"
->
+ >
<div class="op-wp-single-card--highlighting"
- [ngClass]="cardHighlightingClass(workPackage)">
+ [ngClass]="cardHighlightingClass(workPackage)">
</div>
<div class="op-wp-single-card--card-actions">
<div class="op-wp-single-card--inline-buttons hidden-for-mobile"
- data-test-selector="op-wp-single-card--inline-buttons">
- <button
- type="button"
- class="spot-link op-wp-single-card--details-button op-wp-single-card--card-action"
- data-test-selector="op-wp-single-card--details-button"
- *ngIf="!isNewResource(workPackage) && showInfoButton"
- [title]="text.detailsView"
- (click)="emitStateLinkClicked($event, workPackage, true)">
- <op-icon icon-classes="icon3 icon-info2"></op-icon>
- </button>
+ data-test-selector="op-wp-single-card--inline-buttons">
+ @if (!isNewResource(workPackage) && showInfoButton) {
+ <button
+ type="button"
+ class="spot-link op-wp-single-card--details-button op-wp-single-card--card-action"
+ data-test-selector="op-wp-single-card--details-button"
+ [title]="text.detailsView"
+ (click)="emitStateLinkClicked($event, workPackage, true)">
+ <op-icon icon-classes="icon3 icon-info2"></op-icon>
+ </button>
+ }
- <button
- class="spot-link op-wp-single-card--inline-cancel-button op-wp-single-card--card-action"
- data-test-selector="op-wp-single-card--inline-cancel-button"
- *ngIf="isNewResource(workPackage) || showRemoveButton"
- [class.-show]="isNewResource(workPackage)"
- [title]="text.removeCard"
- (click)="onRemoved(workPackage)">
- <op-icon icon-classes="icon-context icon-close"></op-icon>
- </button>
+ @if (isNewResource(workPackage) || showRemoveButton) {
+ <button
+ class="spot-link op-wp-single-card--inline-cancel-button op-wp-single-card--card-action"
+ data-test-selector="op-wp-single-card--inline-cancel-button"
+ [class.-show]="isNewResource(workPackage)"
+ [title]="text.removeCard"
+ (click)="onRemoved(workPackage)">
+ <op-icon icon-classes="icon-context icon-close"></op-icon>
+ </button>
+ }
- <op-icon
- *ngIf="disabledInfo && disabledInfo.text.length > 0"
- [attr.data-tooltip]="disabledInfo.text"
- class="-multiline op-wp-single-card--card-action op-wp-single-card--card-action_closed"
- [ngClass]="'tooltip--' + disabledInfo.orientation"
- icon-classes="icon-context icon-not-supported">
- </op-icon>
+ @if (disabledInfo && disabledInfo.text.length > 0) {
+ <op-icon
+ [attr.data-tooltip]="disabledInfo.text"
+ class="-multiline op-wp-single-card--card-action op-wp-single-card--card-action_closed"
+ [ngClass]="'tooltip--' + disabledInfo.orientation"
+ icon-classes="icon-context icon-not-supported">
+ </op-icon>
+ }
</div>
</div>
- <edit-form [resource]="workPackage"
- [inEditMode]="isNewResource(workPackage)"
- *ngIf="isNewResource(workPackage)">
- <div class="op-wp-single-card-content -new">
- <op-editable-attribute-field [resource]="workPackage"
- [wrapperClasses]="'work-packages--type-selector'"
- [fieldName]="'type'"
- class="op-wp-single-card-content--type">
- </op-editable-attribute-field>
- <op-editable-attribute-field [resource]="workPackage"
- fieldName="subject"
- class="op-wp-single-card-content--subject -bold">
- </op-editable-attribute-field>
- </div>
- </edit-form>
-
- <div *ngIf="!isNewResource(workPackage)"
- class="op-wp-single-card--content">
-
- <span
- class="op-wp-single-card--content-project-name"
- [ngClass]="{'op-wp-single-card--content-project-name_hideable': showInfoButton || showRemoveButton}"
- >
- - {{wpProjectName(workPackage)}}
- </span>
- <a class="op-wp-single-card--content-id"
- [href]="fullWorkPackageLink(workPackage)"
- [ngClass]="uiStateLinkClass"
- (click)="emitStateLinkClicked($event, workPackage)"
- >
- #{{workPackage.id}}
- </a>
-
- <span class="op-wp-single-card--content-subject-line">
- <span
- *ngIf="showAsInlineCard && showStartDate"
- class="op-wp-single-card--content-inline-date"
+ @if (isNewResource(workPackage)) {
+ <edit-form [resource]="workPackage"
+ [inEditMode]="isNewResource(workPackage)"
>
- <display-field
- [resource]="workPackage"
- [displayFieldOptions]="{ writable: false, dateFormat: 'MMM DD, YYYY', placeholder: '' }"
- fieldName="startDate"
- containerType="single-view">
- </display-field>
- -
- </span>
-
- <span
- *ngIf="!showAsInlineCard && highlightingMode !== 'type'"
- [textContent]="wpTypeAttribute(workPackage)"
- class="op-wp-single-card--content-type"
- data-test-selector="op-wp-single-card--content-type"
- [ngClass]="typeHighlightingClass(workPackage)"
- ></span>
-
- <span
- class="op-wp-single-card--content-subject"
- data-test-selector="op-wp-single-card--content-subject"
- [textContent]="wpSubject(workPackage)"
- ></span>
+ <div class="op-wp-single-card-content -new">
+ <op-editable-attribute-field [resource]="workPackage"
+ [wrapperClasses]="'work-packages--type-selector'"
+ [fieldName]="'type'"
+ class="op-wp-single-card-content--type">
+ </op-editable-attribute-field>
+ <op-editable-attribute-field [resource]="workPackage"
+ fieldName="subject"
+ class="op-wp-single-card-content--subject -bold">
+ </op-editable-attribute-field>
+ </div>
+ </edit-form>
+ }
+ @if (!isNewResource(workPackage)) {
+ <div
+ class="op-wp-single-card--content">
<span
- *ngIf="showAsInlineCard && showEndDate"
- class="op-wp-single-card--content-inline-date"
- >
- -
- <display-field
- [resource]="workPackage"
- [displayFieldOptions]="{ writable: false, dateFormat: 'MMM DD, YYYY', placeholder: '' }"
- fieldName="dueDate"
- containerType="single-view">
- </display-field>
+ class="op-wp-single-card--content-project-name"
+ [ngClass]="{'op-wp-single-card--content-project-name_hideable': showInfoButton || showRemoveButton}"
+ >
+ - {{wpProjectName(workPackage)}}
</span>
- </span>
-
- <img *ngIf="this.cardCoverImageShown(workPackage) && !showAsInlineCard"
- [src]="this.bcfSnapshotPath(workPackage)"
- class="op-wp-single-card--content-cover-image">
- <div class="op-wp-single-card--content-status-baseline">
- <wp-status-button *ngIf="showStatusButton"
- [workPackage]="workPackage"
- [small]="true"
- class="op-wp-single-card--content-status"
- >
- </wp-status-button>
- <span
- *ngIf="baselineIcon(workPackage) !== null"
- class="spot-icon spot-icon_1 spot-icon_flex op-wp-single-card--content-baseline"
- [ngClass]="baselineMode==='added' ? 'spot-icon_flex spot-icon_arrow-in op-table-baseline--icon-added' : (baselineMode==='removed' ? 'spot-icon_arrow-out op-table-baseline--icon-removed' : 'spot-icon_delta-triangle op-table-baseline--icon-changed')"
- title="{{ baselineMode==='added' ? text.baseLineIconAdded : (baselineMode==='removed' ? text.baseLineIconRemoved : text.baseLineIconChanged) }}"
- >
+ <a class="op-wp-single-card--content-id"
+ [href]="fullWorkPackageLink(workPackage)"
+ [ngClass]="uiStateLinkClass"
+ (click)="emitStateLinkClicked($event, workPackage)"
+ >
+ #{{workPackage.id}}
+ </a>
+ <span class="op-wp-single-card--content-subject-line">
+ @if (showAsInlineCard && showStartDate) {
+ <span
+ class="op-wp-single-card--content-inline-date"
+ >
+ <display-field
+ [resource]="workPackage"
+ [displayFieldOptions]="{ writable: false, dateFormat: 'MMM DD, YYYY', placeholder: '' }"
+ fieldName="startDate"
+ containerType="single-view">
+ </display-field>
+ -
+ </span>
+ }
+ @if (!showAsInlineCard && highlightingMode !== 'type') {
+ <span
+ [textContent]="wpTypeAttribute(workPackage)"
+ class="op-wp-single-card--content-type"
+ data-test-selector="op-wp-single-card--content-type"
+ [ngClass]="typeHighlightingClass(workPackage)"
+ ></span>
+ }
+ <span
+ class="op-wp-single-card--content-subject"
+ data-test-selector="op-wp-single-card--content-subject"
+ [textContent]="wpSubject(workPackage)"
+ ></span>
+ @if (showAsInlineCard && showEndDate) {
+ <span
+ class="op-wp-single-card--content-inline-date"
+ >
+ -
+ <display-field
+ [resource]="workPackage"
+ [displayFieldOptions]="{ writable: false, dateFormat: 'MMM DD, YYYY', placeholder: '' }"
+ fieldName="dueDate"
+ containerType="single-view">
+ </display-field>
+ </span>
+ }
</span>
-
+ @if (this.cardCoverImageShown(workPackage) && !showAsInlineCard) {
+ <img
+ [src]="this.bcfSnapshotPath(workPackage)"
+ class="op-wp-single-card--content-cover-image">
+ }
+ <div class="op-wp-single-card--content-status-baseline">
+ @if (showStatusButton) {
+ <wp-status-button
+ [workPackage]="workPackage"
+ [small]="true"
+ class="op-wp-single-card--content-status"
+ >
+ </wp-status-button>
+ }
+ @if (baselineIcon(workPackage) !== null) {
+ <span
+ class="spot-icon spot-icon_1 spot-icon_flex op-wp-single-card--content-baseline"
+ [ngClass]="baselineMode==='added' ? 'spot-icon_flex spot-icon_arrow-in op-table-baseline--icon-added' : (baselineMode==='removed' ? 'spot-icon_arrow-out op-table-baseline--icon-removed' : 'spot-icon_delta-triangle op-table-baseline--icon-changed')"
+ title="{{ baselineMode==='added' ? text.baseLineIconAdded : (baselineMode==='removed' ? text.baseLineIconRemoved : text.baseLineIconChanged) }}"
+ >
+ </span>
+ }
+ </div>
+ @if (workPackage.assignee) {
+ <op-principal
+ [principal]="workPackage.assignee"
+ [hideName]="true"
+ [link]="false"
+ size="mini"
+ class="op-wp-single-card--content-assignee"
+ data-test-selector="op-wp-single-card--content-assignee"
+ ></op-principal>
+ }
+ @if (!showAsInlineCard && (workPackage.startDate || workPackage.dueDate)) {
+ <display-field
+ [resource]="workPackage"
+ [displayFieldOptions]="{ writable: false, dateFormat: 'MMM DD, YYYY', placeholder: '' }"
+ [displayClass]="combinedDateDisplayField"
+ fieldName="dueDate"
+ class="op-wp-single-card--content-dates"
+ containerType="single-view">
+ </display-field>
+ }
</div>
- <op-principal
- *ngIf="workPackage.assignee"
- [principal]="workPackage.assignee"
- [hideName]="true"
- [link]="false"
- size="mini"
- class="op-wp-single-card--content-assignee"
- data-test-selector="op-wp-single-card--content-assignee"
- ></op-principal>
- <display-field
- *ngIf="!showAsInlineCard && (workPackage.startDate || workPackage.dueDate)"
- [resource]="workPackage"
- [displayFieldOptions]="{ writable: false, dateFormat: 'MMM DD, YYYY', placeholder: '' }"
- [displayClass]="combinedDateDisplayField"
- fieldName="dueDate"
- class="op-wp-single-card--content-dates"
- containerType="single-view">
- </display-field>
- </div>
+ }
</div>
diff --git a/frontend/src/app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.html b/frontend/src/app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.html
index 99f15a7d473..3313fedad2c 100644
--- a/frontend/src/app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.html
+++ b/frontend/src/app/features/work-packages/components/wp-custom-actions/date-action/custom-date-action-admin.html
@@ -1,25 +1,29 @@
<div class="form--field-container">
<span class="form--select-container">
- <select class="form--select"
- [attr.id]="fieldId"
- [(ngModel)]="selectedOperator"
- (change)="toggleValueVisibility()">
- <option *ngFor="let operator of operators"
- [textContent]="operator.label"
- [ngValue]="operator">
- </option>
- </select>
- </span>
- <span class="form--text-field-container -slim" *ngIf="valueVisible">
- <op-basic-single-date-picker
- [id]="fieldId + '_visible'"
- [name]="fieldId + '_input'"
- [value]="fieldValue"
- (valueChange)="updateField($event)"
- classes="form--text-field">
- </op-basic-single-date-picker>
+ <select class="form--select"
+ [attr.id]="fieldId"
+ [(ngModel)]="selectedOperator"
+ (change)="toggleValueVisibility()">
+ @for (operator of operators; track operator) {
+ <option
+ [textContent]="operator.label"
+ [ngValue]="operator">
+ </option>
+ }
+ </select>
</span>
+ @if (valueVisible) {
+ <span class="form--text-field-container -slim">
+ <op-basic-single-date-picker
+ [id]="fieldId + '_visible'"
+ [name]="fieldId + '_input'"
+ [value]="fieldValue"
+ (valueChange)="updateField($event)"
+ classes="form--text-field">
+ </op-basic-single-date-picker>
+ </span>
+ }
<input type="hidden"
- [name]="fieldName"
- [value]="fieldValue"/>
+ [name]="fieldName"
+ [value]="fieldValue"/>
</div>
diff --git a/frontend/src/app/features/work-packages/components/wp-custom-actions/wp-custom-actions.component.html b/frontend/src/app/features/work-packages/components/wp-custom-actions/wp-custom-actions.component.html
index 34ecc7590d0..d9e8b29cb08 100644
--- a/frontend/src/app/features/work-packages/components/wp-custom-actions/wp-custom-actions.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-custom-actions/wp-custom-actions.component.html
@@ -1,10 +1,9 @@
-<ng-container
- *ngIf="available"
->
- <wp-custom-action
- *ngFor="let action of actions; trackBy: trackByHref"
+@if (available) {
+ @for (action of actions; track trackByHref($index, action)) {
+ <wp-custom-action
[workPackage]="workPackage"
[action]="action"
class="custom-action">
- </wp-custom-action>
-</ng-container>
+ </wp-custom-action>
+ }
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.html b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.html
index a901461562a..20b7d411fef 100644
--- a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.html
+++ b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.html
@@ -2,25 +2,30 @@
<wp-watcher-button [workPackage]="workPackage">
</wp-watcher-button>
- <op-work-package-mark-notification-button
- *ngIf="displayNotificationsButton"
- [workPackage]="workPackage"
- data-test-selector="mark-notification-read-button"
- ></op-work-package-mark-notification-button>
+ @if (displayNotificationsButton) {
+ <op-work-package-mark-notification-button
+ [workPackage]="workPackage"
+ data-test-selector="mark-notification-read-button"
+ ></op-work-package-mark-notification-button>
+ }
- <wp-share-button [workPackage]="workPackage"
- *ngIf="displayShareButton$ | async">
- </wp-share-button>
+ @if (displayShareButton$ | async) {
+ <wp-share-button [workPackage]="workPackage"
+ >
+ </wp-share-button>
+ }
- <wp-reminder-button [workPackage]="workPackage"
- *ngIf="displayReminderButton$ | async">
- </wp-reminder-button>
+ @if (displayReminderButton$ | async) {
+ <wp-reminder-button [workPackage]="workPackage"
+ >
+ </wp-reminder-button>
+ }
<button class="button dropdown-relative"
- [attr.accesskey]="7"
- [title]="text.button_more"
- wpSingleContextMenu
- [wpSingleContextMenu-workPackage]="workPackage">
+ [attr.accesskey]="7"
+ [title]="text.button_more"
+ wpSingleContextMenu
+ [wpSingleContextMenu-workPackage]="workPackage">
<svg
kebab-horizontal-icon
class="button--icon"
diff --git a/frontend/src/app/features/work-packages/components/wp-form-group/wp-attribute-group.template.html b/frontend/src/app/features/work-packages/components/wp-form-group/wp-attribute-group.template.html
index a1533d20c64..62288f1694c 100644
--- a/frontend/src/app/features/work-packages/components/wp-form-group/wp-attribute-group.template.html
+++ b/frontend/src/app/features/work-packages/components/wp-form-group/wp-attribute-group.template.html
@@ -1,32 +1,36 @@
-<div
- class="wp-attribute-group--attribute attributes-key-value"
- [ngClass]="{'wp-attribute-group--attribute_span-all': descriptor.spanAll }"
- *ngFor="let descriptor of group.members; trackBy:trackByName"
->
- <ng-template [ngIf]="!shouldHideField(descriptor)">
- <div
- class="wp-attribute-group--attribute-key attributes-key-value--key"
- *ngIf="!descriptor.multiple && descriptor.field"
+@for (descriptor of group.members; track trackByName($index, descriptor)) {
+ <div
+ class="wp-attribute-group--attribute attributes-key-value"
+ [ngClass]="{'wp-attribute-group--attribute_span-all': descriptor.spanAll }"
>
- <wp-replacement-label [fieldName]="descriptor.name">
- {{ descriptor.label }}
- <span
- class="required"
- *ngIf="descriptor.field!.required && descriptor.field!.writable"
- > *</span>
- </wp-replacement-label>
- <attribute-help-text [attribute]="descriptor.name" [attributeScope]="'WorkPackage'"></attribute-help-text>
- </div>
- <div
- *ngIf="!descriptor.multiple && descriptor.field"
- class="wp-attribute-group--attribute-value-container attributes-key-value--value-container"
- >
- <op-editable-attribute-field
- [ngClass]="{'wp-edit-formattable-field': descriptor.field!.isFormattable }"
- [resource]="workPackage"
- [isDropTarget]="descriptor.field!.isFormattable"
- [fieldName]="descriptor.field!.name"
- ></op-editable-attribute-field>
- </div>
- </ng-template>
-</div>
+ @if (!shouldHideField(descriptor)) {
+ @if (!descriptor.multiple && descriptor.field) {
+ <div
+ class="wp-attribute-group--attribute-key attributes-key-value--key"
+ >
+ <wp-replacement-label [fieldName]="descriptor.name">
+ {{ descriptor.label }}
+ @if (descriptor.field!.required && descriptor.field!.writable) {
+ <span
+ class="required"
+ > *</span>
+ }
+ </wp-replacement-label>
+ <attribute-help-text [attribute]="descriptor.name" [attributeScope]="'WorkPackage'"></attribute-help-text>
+ </div>
+ }
+ @if (!descriptor.multiple && descriptor.field) {
+ <div
+ class="wp-attribute-group--attribute-value-container attributes-key-value--value-container"
+ >
+ <op-editable-attribute-field
+ [ngClass]="{'wp-edit-formattable-field': descriptor.field!.isFormattable }"
+ [resource]="workPackage"
+ [isDropTarget]="descriptor.field!.isFormattable"
+ [fieldName]="descriptor.field!.name"
+ ></op-editable-attribute-field>
+ </div>
+ }
+ }
+ </div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-grid/wp-grid.component.ts b/frontend/src/app/features/work-packages/components/wp-grid/wp-grid.component.ts
index 03ebf5ed80f..a25ccc3e1da 100644
--- a/frontend/src/app/features/work-packages/components/wp-grid/wp-grid.component.ts
+++ b/frontend/src/app/features/work-packages/components/wp-grid/wp-grid.component.ts
@@ -45,26 +45,28 @@ import { WorkPackageViewOutputs } from 'core-app/features/work-packages/routing/
selector: 'wp-grid',
template: `
<wp-card-view [dragOutOfHandler]="canDragOutOf"
- [dragInto]="dragInto"
- [cardsRemovable]="false"
- [highlightingMode]="highlightingMode"
- [showStatusButton]="true"
- [orientation]="gridOrientation"
- (onMoved)="switchToManualSorting()"
- (selectionChanged)="selectionChanged.emit($event)"
- (itemClicked)="itemClicked.emit($event)"
- (stateLinkClicked)="stateLinkClicked.emit($event)"
- [showEmptyResultsBox]="true"
- [showInfoButton]="true"
- [shrinkOnMobile]="true">
+ [dragInto]="dragInto"
+ [cardsRemovable]="false"
+ [highlightingMode]="highlightingMode"
+ [showStatusButton]="true"
+ [orientation]="gridOrientation"
+ (onMoved)="switchToManualSorting()"
+ (selectionChanged)="selectionChanged.emit($event)"
+ (itemClicked)="itemClicked.emit($event)"
+ (stateLinkClicked)="stateLinkClicked.emit($event)"
+ [showEmptyResultsBox]="true"
+ [showInfoButton]="true"
+ [shrinkOnMobile]="true">
</wp-card-view>
-
- <div *ngIf="showResizer"
- class="hidden-for-mobile hide-when-print">
- <wp-resizer [elementClass]="resizerClass"
- [localStorageKey]="resizerStorageKey"></wp-resizer>
- </div>
- `,
+
+ @if (showResizer) {
+ <div
+ class="hidden-for-mobile hide-when-print">
+ <wp-resizer [elementClass]="resizerClass"
+ [localStorageKey]="resizerStorageKey"></wp-resizer>
+ </div>
+ }
+ `,
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [
DragAndDropService,
diff --git a/frontend/src/app/features/work-packages/components/wp-inline-create/wp-inline-create.component.html b/frontend/src/app/features/work-packages/components/wp-inline-create/wp-inline-create.component.html
index 77238bef0ff..83f0471a49e 100644
--- a/frontend/src/app/features/work-packages/components/wp-inline-create/wp-inline-create.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-inline-create/wp-inline-create.component.html
@@ -1,49 +1,53 @@
-<ng-container *ngIf="canAdd || canReference">
- <tr
- *ngIf="mode === 'inactive'"
- class="wp-inline-create-button-row hide-when-print"
- >
- <td
- [attr.colspan]="colspan"
- class="wp-inline-create-button-td"
- >
- <button
- *ngIf="canAdd"
- type="button"
- class="spot-link"
- [class.wp-inline-create--split-link]="hasReferenceClass"
- [opAutofocus]="focus"
- (click)="handleAddRowClick()"
- [attr.aria-label]="text.create"
- aria-haspopup="true"
- data-test-selector="op-wp-inline-create"
+@if (canAdd || canReference) {
+ @if (mode === 'inactive') {
+ <tr
+ class="wp-inline-create-button-row hide-when-print"
>
- <span class="spot-icon spot-icon_add"></span>
- <span [textContent]="text.create"></span>
- </button>
- <button
- *ngIf="canReference"
- type="button"
- class="spot-link wp-inline-create--split-link"
- (click)="handleReferenceClick()"
- [attr.aria-label]="text.create"
- aria-haspopup="true"
- data-test-selector="op-wp-inline-create-reference"
+ <td
+ [attr.colspan]="colspan"
+ class="wp-inline-create-button-td"
+ >
+ @if (canAdd) {
+ <button
+ type="button"
+ class="spot-link"
+ [class.wp-inline-create--split-link]="hasReferenceClass"
+ [opAutofocus]="focus"
+ (click)="handleAddRowClick()"
+ [attr.aria-label]="text.create"
+ aria-haspopup="true"
+ data-test-selector="op-wp-inline-create"
+ >
+ <span class="spot-icon spot-icon_add"></span>
+ <span [textContent]="text.create"></span>
+ </button>
+ }
+ @if (canReference) {
+ <button
+ type="button"
+ class="spot-link wp-inline-create--split-link"
+ (click)="handleReferenceClick()"
+ [attr.aria-label]="text.create"
+ aria-haspopup="true"
+ data-test-selector="op-wp-inline-create-reference"
+ >
+ <span class="spot-icon spot-icon_link"></span>
+ <span [textContent]="text.reference"></span>
+ </button>
+ }
+ </td>
+ </tr>
+ }
+ @if (hasReferenceClass && mode === 'reference') {
+ <tr
+ class="wp-inline-create-button-row hide-when-print"
>
- <span class="spot-icon spot-icon_link"></span>
- <span [textContent]="text.reference"></span>
- </button>
- </td>
- </tr>
- <tr
- *ngIf="hasReferenceClass && mode === 'reference'"
- class="wp-inline-create-button-row hide-when-print"
- >
- <td
- [attr.colspan]="colspan"
- class="wp-inline-reference-row-td -no-highlighting"
- >
- <ng-container *ngComponentOutlet="referenceClass; injector: injector"></ng-container>
- </td>
- </tr>
-</ng-container>
+ <td
+ [attr.colspan]="colspan"
+ class="wp-inline-reference-row-td -no-highlighting"
+ >
+ <ng-container *ngComponentOutlet="referenceClass; injector: injector"></ng-container>
+ </td>
+ </tr>
+ }
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-new/wp-new-full-view.html b/frontend/src/app/features/work-packages/components/wp-new/wp-new-full-view.html
index 835ef796a29..2f1ed9228de 100644
--- a/frontend/src/app/features/work-packages/components/wp-new/wp-new-full-view.html
+++ b/frontend/src/app/features/work-packages/components/wp-new/wp-new-full-view.html
@@ -1,36 +1,37 @@
-<div
- class="work-package--new-state work-packages--new work-packages--show-view toolbar-container"
- *ngIf="newWorkPackage">
- <op-breadcrumbs
- [items]="breadcrumbItems()"
- ></op-breadcrumbs>
- <edit-form [resource]="newWorkPackage"
- [skippedFields]="['status', 'type']"
- [inEditMode]="true"
- (onSaved)="onSaved($event)">
- <div class="toolbar">
- <div class="title-container">
- <wp-type-status [workPackage]="newWorkPackage"></wp-type-status>
+@if (newWorkPackage) {
+ <div
+ class="work-package--new-state work-packages--new work-packages--show-view toolbar-container"
+ >
+ <op-breadcrumbs
+ [items]="breadcrumbItems()"
+ ></op-breadcrumbs>
+ <edit-form [resource]="newWorkPackage"
+ [skippedFields]="['status', 'type']"
+ [inEditMode]="true"
+ (onSaved)="onSaved($event)">
+ <div class="toolbar">
+ <div class="title-container">
+ <wp-type-status [workPackage]="newWorkPackage"></wp-type-status>
+ </div>
+ <ul class="toolbar-items hide-when-print">
+ <li class="toolbar-item hidden-for-tablet">
+ <opce-zen-mode-toggle-button></opce-zen-mode-toggle-button>
+ </li>
+ <li class="toolbar-item hidden-for-tablet">
+ <button id="create-wp-menu-button"
+ [attr.title]="text.button_settings"
+ class="button last work-packages-settings-button toolbar-icon"
+ wpCreateSettingsMenu>
+ <i class="button--icon icon-show-more"></i>
+ </button>
+ </li>
+ </ul>
</div>
- <ul class="toolbar-items hide-when-print">
- <li class="toolbar-item hidden-for-tablet">
- <opce-zen-mode-toggle-button></opce-zen-mode-toggle-button>
- </li>
- <li class="toolbar-item hidden-for-tablet">
- <button id="create-wp-menu-button"
- [attr.title]="text.button_settings"
- class="button last work-packages-settings-button toolbar-icon"
- wpCreateSettingsMenu>
- <i class="button--icon icon-show-more"></i>
- </button>
- </li>
- </ul>
- </div>
-
- <wp-single-view [workPackage]="newWorkPackage"
- [showProject]="copying">
- </wp-single-view>
- <wp-edit-actions-bar (onCancel)="cancelAndBackToList()">
- </wp-edit-actions-bar>
- </edit-form>
-</div>
+ <wp-single-view [workPackage]="newWorkPackage"
+ [showProject]="copying">
+ </wp-single-view>
+ <wp-edit-actions-bar (onCancel)="cancelAndBackToList()">
+ </wp-edit-actions-bar>
+ </edit-form>
+ </div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-new/wp-new-split-view.html b/frontend/src/app/features/work-packages/components/wp-new/wp-new-split-view.html
index a41ba87e532..2d014cee8c2 100644
--- a/frontend/src/app/features/work-packages/components/wp-new/wp-new-split-view.html
+++ b/frontend/src/app/features/work-packages/components/wp-new/wp-new-split-view.html
@@ -1,35 +1,34 @@
-<div
- class="work-packages--details work-packages--new"
- *ngIf="newWorkPackage"
->
- <edit-form [resource]="newWorkPackage"
- [skippedFields]="['status', 'type']"
- [inEditMode]="true"
- (onSaved)="onSaved($event)">
- <div class="work-packages--details-content -create-mode">
- <div class="work-packages--new-details-header">
- <wp-type-status [workPackage]="newWorkPackage"></wp-type-status>
- <div class="wp--details--switch-fullscreen-wrapper">
- <a (click)="switchToFullscreen()"
- class="work-packages-show-view-button wp--details--switch-fullscreen ">
- <span class="icon-context icon-to-fullscreen"></span>
- </a>
+@if (newWorkPackage) {
+ <div
+ class="work-packages--details work-packages--new"
+ >
+ <edit-form [resource]="newWorkPackage"
+ [skippedFields]="['status', 'type']"
+ [inEditMode]="true"
+ (onSaved)="onSaved($event)">
+ <div class="work-packages--details-content -create-mode">
+ <div class="work-packages--new-details-header">
+ <wp-type-status [workPackage]="newWorkPackage"></wp-type-status>
+ <div class="wp--details--switch-fullscreen-wrapper">
+ <a (click)="switchToFullscreen()"
+ class="work-packages-show-view-button wp--details--switch-fullscreen ">
+ <span class="icon-context icon-to-fullscreen"></span>
+ </a>
+ </div>
</div>
+ <wp-single-view [workPackage]="newWorkPackage"
+ [showProject]="copying">
+ </wp-single-view>
</div>
- <wp-single-view [workPackage]="newWorkPackage"
- [showProject]="copying">
- </wp-single-view>
- </div>
-
- <div class="work-packages--details-toolbar-container">
- <wp-edit-actions-bar
- (onCancel)="cancelAndBackToList()">
- </wp-edit-actions-bar>
- </div>
-
- <div class="work-packages--details--resizer hidden-for-mobile hide-when-print">
- <wp-resizer [elementClass]="'work-packages-partitioned-page--content-right'"
- [localStorageKey]="'openProject-splitViewFlexBasis'"></wp-resizer>
- </div>
- </edit-form>
-</div>
+ <div class="work-packages--details-toolbar-container">
+ <wp-edit-actions-bar
+ (onCancel)="cancelAndBackToList()">
+ </wp-edit-actions-bar>
+ </div>
+ <div class="work-packages--details--resizer hidden-for-mobile hide-when-print">
+ <wp-resizer [elementClass]="'work-packages-partitioned-page--content-right'"
+ [localStorageKey]="'openProject-splitViewFlexBasis'"></wp-resizer>
+ </div>
+ </edit-form>
+ </div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-relations-count/wp-relations-count.html b/frontend/src/app/features/work-packages/components/wp-relations-count/wp-relations-count.html
index 81c52049283..866afaf25c1 100644
--- a/frontend/src/app/features/work-packages/components/wp-relations-count/wp-relations-count.html
+++ b/frontend/src/app/features/work-packages/components/wp-relations-count/wp-relations-count.html
@@ -1,3 +1,4 @@
-<span class="wp-tabs-count"
- *ngIf="count > 0"
- [textContent]="count"></span>
+@if (count > 0) {
+ <span class="wp-tabs-count"
+ [textContent]="count"></span>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-relations/embedded/wp-relation-query.html b/frontend/src/app/features/work-packages/components/wp-relations/embedded/wp-relation-query.html
index 37c9697c476..b02a5ca09e4 100644
--- a/frontend/src/app/features/work-packages/components/wp-relations/embedded/wp-relation-query.html
+++ b/frontend/src/app/features/work-packages/components/wp-relations/embedded/wp-relation-query.html
@@ -1,16 +1,17 @@
-<ng-container *ngIf="!hidden">
- <div *ngIf="group" class="attributes-group--header">
- <div class="attributes-group--header-container">
- <h3 class="attributes-group--header-text"
- [textContent]="group.name"></h3>
+@if (!hidden) {
+ @if (group) {
+ <div class="attributes-group--header">
+ <div class="attributes-group--header-container">
+ <h3 class="attributes-group--header-text"
+ [textContent]="group.name"></h3>
+ </div>
</div>
- </div>
-
+ }
<wp-embedded-table #embeddedTable
- (onQueryLoaded)="handleQueryLoaded($event)"
- [initialLoadingIndicator]="false"
- [queryProps]="queryProps"
- [tableActions]="tableActions"
+ (onQueryLoaded)="handleQueryLoaded($event)"
+ [initialLoadingIndicator]="false"
+ [queryProps]="queryProps"
+ [tableActions]="tableActions"
[configuration]="{ actionsColumnEnabled: true,
hierarchyToggleEnabled: false,
inlineCreateEnabled: true,
@@ -20,4 +21,4 @@
projectIdentifier: idFromLink(workPackage.project.href),
projectContext: false }" >
</wp-embedded-table>
-</ng-container>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-relations/wp-relation-row/wp-relation-row.template.html b/frontend/src/app/features/work-packages/components/wp-relations/wp-relation-row/wp-relation-row.template.html
index be22af0e56b..58199364ba2 100644
--- a/frontend/src/app/features/work-packages/components/wp-relations/wp-relation-row/wp-relation-row.template.html
+++ b/frontend/src/app/features/work-packages/components/wp-relations/wp-relation-row/wp-relation-row.template.html
@@ -1,133 +1,140 @@
-<div
- *ngIf="workPackage && relatedWorkPackage"
- class="relation-row relation-row-{{ relatedWorkPackage.id }}"
- opFocusWithin=".relation-row--grid-actions button"
->
+@if (workPackage && relatedWorkPackage) {
<div
- class="relation-row--grid"
- >
- <div>
- <button
- type="button"
- class="relation-row--type"
- data-test-selector="op-relation--row-type"
- (click)="activateRelationTypeEdit()"
- *ngIf="!userInputs.showRelationTypesForm"
+ class="relation-row relation-row-{{ relatedWorkPackage.id }}"
+ opFocusWithin=".relation-row--grid-actions button"
+ >
+ <div
+ class="relation-row--grid"
>
- <span
- *ngIf="groupByWorkPackageType"
- [textContent]="normalizedRelationType"
- ></span>
- <span
- *ngIf="!groupByWorkPackageType"
- [ngClass]="highlightingClassForWpType()"
- [textContent]="relatedWorkPackage.type.name"
- ></span>
- <span class="sr-only" [textContent]="text.updateRelation"></span>
- </button>
+ <div>
+ @if (!userInputs.showRelationTypesForm) {
+ <button
+ type="button"
+ class="relation-row--type"
+ data-test-selector="op-relation--row-type"
+ (click)="activateRelationTypeEdit()"
+ >
+ @if (groupByWorkPackageType) {
+ <span
+ [textContent]="normalizedRelationType"
+ ></span>
+ }
+ @if (!groupByWorkPackageType) {
+ <span
+ [ngClass]="highlightingClassForWpType()"
+ [textContent]="relatedWorkPackage.type.name"
+ ></span>
+ }
+ <span class="sr-only" [textContent]="text.updateRelation"></span>
+ </button>
+ }
+ @if (userInputs.showRelationTypesForm) {
+ <div
+ class="inline-edit--container inplace-edit"
+ >
+ <select
+ class="inline-edit--field form--select"
+ [(ngModel)]="selectedRelationType"
+ (change)="saveRelationType()"
+ role="listbox"
+ opAutofocus
+ (keydown.escape)="cancelRelationTypeEditOnEscape($event)"
+ >
+ @for (relationType of availableRelationTypes; track relationType) {
+ <option
+ [textContent]="relationType.label"
+ [ngValue]="relationType"
+ ></option>
+ }
+ </select>
+ </div>
+ }
+ </div>
+ <a
+ class="relation-row--grid-id"
+ data-test-selector="op-relation--row-id"
+ uiSref="work-packages.show.tabs"
+ [uiParams]="{ workPackageId: relatedWorkPackage.id, tabIdentifier: 'relations' }"
+ >#{{relatedWorkPackage.id}}</a>
+ <a
+ class="relation-row--grid-subject"
+ data-test-selector="op-relation--row-subject"
+ uiSref="work-packages.show.tabs"
+ [uiParams]="{ workPackageId: relatedWorkPackage.id, tabIdentifier: 'relations' }"
+ [textContent]="relatedWorkPackage.subject"
+ [attr.aria-label]="normalizedRelationType + ' ' + relatedWorkPackage.subjectWithId(0)"
+ ></a>
+ @if (relatedWorkPackage) {
+ <edit-form [resource]="relatedWorkPackage">
+ <op-editable-attribute-field [resource]="relatedWorkPackage" fieldName="status"></op-editable-attribute-field>
+ </edit-form>
+ }
<div
- class="inline-edit--container inplace-edit"
- *ngIf="userInputs.showRelationTypesForm"
- >
- <select
- class="inline-edit--field form--select"
- [(ngModel)]="selectedRelationType"
- (change)="saveRelationType()"
- role="listbox"
- opAutofocus
- (keydown.escape)="cancelRelationTypeEditOnEscape($event)"
+ class="relation-row--grid-actions"
>
- <option
- *ngFor="let relationType of availableRelationTypes"
- [textContent]="relationType.label"
- [ngValue]="relationType"
- ></option>
- </select>
+ <button
+ type="button"
+ class="spot-link wp-relations--description-btn"
+ [ngClass]="{'-visible': showDescriptionInfo }"
+ [title]="text.description_label"
+ (click)="userInputs.showRelationInfo = !userInputs.showRelationInfo"
+ >
+ <op-icon
+ icon-classes="icon-info1 icon-no-color -padded wp-relations--icon wp-relations--description-icon"
+ [icon-title]="text.toggleDescription"
+ ></op-icon>
+ </button>
+ @if (!!relation.delete) {
+ <button
+ type="button"
+ class="spot-link relation-row--remove-btn"
+ [ngClass]="{'-visible': showDescriptionInfo }"
+ [title]="text.removeButton"
+ (click)="removeRelation()"
+ >
+ <op-icon
+ icon-classes="icon-remove icon-no-color -padded wp-relations--icon"
+ [icon-title]="text.removeButton"
+ ></op-icon>
+ </button>
+ }
</div>
</div>
-
- <a
- class="relation-row--grid-id"
- data-test-selector="op-relation--row-id"
- uiSref="work-packages.show.tabs"
- [uiParams]="{ workPackageId: relatedWorkPackage.id, tabIdentifier: 'relations' }"
- >#{{relatedWorkPackage.id}}</a>
-
- <a
- class="relation-row--grid-subject"
- data-test-selector="op-relation--row-subject"
- uiSref="work-packages.show.tabs"
- [uiParams]="{ workPackageId: relatedWorkPackage.id, tabIdentifier: 'relations' }"
- [textContent]="relatedWorkPackage.subject"
- [attr.aria-label]="normalizedRelationType + ' ' + relatedWorkPackage.subjectWithId(0)"
- ></a>
-
- <edit-form *ngIf="relatedWorkPackage" [resource]="relatedWorkPackage">
- <op-editable-attribute-field [resource]="relatedWorkPackage" fieldName="status"></op-editable-attribute-field>
- </edit-form>
-
- <div
- class="relation-row--grid-actions"
- >
- <button
- type="button"
- class="spot-link wp-relations--description-btn"
- [ngClass]="{'-visible': showDescriptionInfo }"
- [title]="text.description_label"
- (click)="userInputs.showRelationInfo = !userInputs.showRelationInfo"
- >
- <op-icon
- icon-classes="icon-info1 icon-no-color -padded wp-relations--icon wp-relations--description-icon"
- [icon-title]="text.toggleDescription"
- ></op-icon>
- </button>
- <button
- *ngIf="!!relation.delete"
- type="button"
- class="spot-link relation-row--remove-btn"
- [ngClass]="{'-visible': showDescriptionInfo }"
- [title]="text.removeButton"
- (click)="removeRelation()"
- >
- <op-icon
- icon-classes="icon-remove icon-no-color -padded wp-relations--icon"
- [icon-title]="text.removeButton"
- ></op-icon>
- </button>
- </div>
- </div>
-
- <div
- *ngIf="userInputs.showRelationInfo"
- class="grid-block hierarchy-item description-container"
- >
- <button
- *ngIf="!userInputs.showDescriptionEditForm"
- type="button"
- class="wp-relation--description-read-value"
- [class.-placeholder]="!relation.description"
- (click)="startDescriptionEdit()"
- [textContent]="relation.description || text.placeholder.description"
- ></button>
- <div
- class="wp-relation--description-wrapper textarea-wrapper"
- *ngIf="userInputs.showDescriptionEditForm"
- >
- <textarea
- #relationDescriptionTextarea
- autofocus
- class="wp-relation--description-textarea"
- name="description"
- (keyup)="handleDescriptionKey($event)"
- [(ngModel)]="userInputs.newRelationText"
- ></textarea>
- <edit-field-controls
- [fieldController]="fieldController"
- (onSave)="saveDescription()"
- (onCancel)="cancelDescriptionEdit()"
- [saveTitle]="text.save"
- [cancelTitle]="text.cancel"
- ></edit-field-controls>
- </div>
+ @if (userInputs.showRelationInfo) {
+ <div
+ class="grid-block hierarchy-item description-container"
+ >
+ @if (!userInputs.showDescriptionEditForm) {
+ <button
+ type="button"
+ class="wp-relation--description-read-value"
+ [class.-placeholder]="!relation.description"
+ (click)="startDescriptionEdit()"
+ [textContent]="relation.description || text.placeholder.description"
+ ></button>
+ }
+ @if (userInputs.showDescriptionEditForm) {
+ <div
+ class="wp-relation--description-wrapper textarea-wrapper"
+ >
+ <textarea
+ #relationDescriptionTextarea
+ autofocus
+ class="wp-relation--description-textarea"
+ name="description"
+ (keyup)="handleDescriptionKey($event)"
+ [(ngModel)]="userInputs.newRelationText"
+ ></textarea>
+ <edit-field-controls
+ [fieldController]="fieldController"
+ (onSave)="saveDescription()"
+ (onCancel)="cancelDescriptionEdit()"
+ [saveTitle]="text.save"
+ [cancelTitle]="text.cancel"
+ ></edit-field-controls>
+ </div>
+ }
+ </div>
+ }
</div>
-</div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-create/wp-relation-create.template.html b/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-create/wp-relation-create.template.html
index 164cdef9906..bc6b7786ec6 100644
--- a/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-create/wp-relation-create.template.html
+++ b/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-create/wp-relation-create.template.html
@@ -1,58 +1,64 @@
<div class="wp-relations-create">
- <div class="wp-relations-create-button hide-when-print"
- *ngIf="!showRelationsCreateForm">
- <div class="grid-block">
- <div class="grid-content collapse">
- <button
- type="button"
- class="spot-link wp-inline-create--add-link"
- opAutofocus
- (click)="toggleRelationsCreateForm()"
- id="relation--add-relation"
- >
- <span class="spot-icon spot-icon_add"></span>
- <span [textContent]="text.addNewRelation"></span>
- </button>
+ @if (!showRelationsCreateForm) {
+ <div class="wp-relations-create-button hide-when-print"
+ >
+ <div class="grid-block">
+ <div class="grid-content collapse">
+ <button
+ type="button"
+ class="spot-link wp-inline-create--add-link"
+ opAutofocus
+ (click)="toggleRelationsCreateForm()"
+ id="relation--add-relation"
+ >
+ <span class="spot-icon spot-icon_add"></span>
+ <span [textContent]="text.addNewRelation"></span>
+ </button>
+ </div>
</div>
</div>
- </div>
+ }
<div class="loading-indicator--location"
- data-indicator-name="relationAddDynamic">
- <div class="v-align wp-relations-create--form"
- *ngIf="showRelationsCreateForm">
- <div class="grid-content collapse medium-3">
- <label class="sr-only"
- for="relation-type--select"
- [textContent]="text.relationType"></label>
- <select class="form--select relationTypeSelect"
- id="relation-type--select"
- role="listbox"
- [(ngModel)]="selectedRelationType"
- opAutofocus>
- <option *ngFor="let type of relationTypes"
- [textContent]="type.label"
- [value]="type.name"></option>
- </select>
- </div>
- <div class="grid-content medium-8">
- <wp-relations-autocomplete
- [workPackage]="workPackage"
- (change)="onSelected($event)"
- (cancel)="toggleRelationsCreateForm()"
- [hiddenOverflowContainer]="'.work-packages-tab-view--overflow'"
- [selectedRelationType]="selectedRelationType"
- data-test-selector="wp-relations-autocomplete">
- </wp-relations-autocomplete>
- </div>
- <div class="grid-content medium-1 collapse wp-relations-controls-section relation-row">
- <button
- type="button"
- class="spot-link wp-create-relation--cancel"
- (click)="toggleRelationsCreateForm()"
+ data-indicator-name="relationAddDynamic">
+ @if (showRelationsCreateForm) {
+ <div class="v-align wp-relations-create--form"
>
- <op-icon icon-classes="icon-remove icon-no-color -padded" [icon-title]="text.abort"></op-icon>
- </button>
+ <div class="grid-content collapse medium-3">
+ <label class="sr-only"
+ for="relation-type--select"
+ [textContent]="text.relationType"></label>
+ <select class="form--select relationTypeSelect"
+ id="relation-type--select"
+ role="listbox"
+ [(ngModel)]="selectedRelationType"
+ opAutofocus>
+ @for (type of relationTypes; track type) {
+ <option
+ [textContent]="type.label"
+ [value]="type.name"></option>
+ }
+ </select>
+ </div>
+ <div class="grid-content medium-8">
+ <wp-relations-autocomplete
+ [workPackage]="workPackage"
+ (change)="onSelected($event)"
+ (cancel)="toggleRelationsCreateForm()"
+ [hiddenOverflowContainer]="'.work-packages-tab-view--overflow'"
+ [selectedRelationType]="selectedRelationType"
+ data-test-selector="wp-relations-autocomplete">
+ </wp-relations-autocomplete>
+ </div>
+ <div class="grid-content medium-1 collapse wp-relations-controls-section relation-row">
+ <button
+ type="button"
+ class="spot-link wp-create-relation--cancel"
+ (click)="toggleRelationsCreateForm()"
+ >
+ <op-icon icon-classes="icon-remove icon-no-color -padded" [icon-title]="text.abort"></op-icon>
+ </button>
+ </div>
</div>
- </div>
+ }
</div>
</div>
diff --git a/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-group/wp-relations-group.template.html b/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-group/wp-relations-group.template.html
index 530a8e9d0ac..c0f4b21a2d1 100644
--- a/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-group/wp-relations-group.template.html
+++ b/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-group/wp-relations-group.template.html
@@ -5,30 +5,33 @@
[textContent]="header"
></h3>
</div>
+ @if (firstGroup) {
+ <div
+ class="attributes-group--header-toggle"
+ >
+ <button
+ #wpRelationGroupByToggler
+ id="wp-relation-group-by-toggle"
+ type="button"
+ class="button -small -transparent -with-icon icon-group-by icon-small hide-when-print"
+ (click)="toggleButton()"
+ >
+ <span [textContent]="togglerText"></span>
+ </button>
+ </div>
+ }
+</div>
+
+@if (relatedWorkPackages) {
<div
- class="attributes-group--header-toggle"
- *ngIf="firstGroup"
- >
- <button
- #wpRelationGroupByToggler
- id="wp-relation-group-by-toggle"
- type="button"
- class="button -small -transparent -with-icon icon-group-by icon-small hide-when-print"
- (click)="toggleButton()"
+ class="relation-container"
>
- <span [textContent]="togglerText"></span>
- </button>
+ @for (relatedWorkPackage of relatedWorkPackages; track relatedWorkPackage) {
+ <wp-relation-row
+ [workPackage]="workPackage"
+ [groupByWorkPackageType]="groupByWorkPackageType"
+ [relatedWorkPackage]="relatedWorkPackage"
+ ></wp-relation-row>
+ }
</div>
-</div>
-
-<div
- class="relation-container"
- *ngIf="relatedWorkPackages"
->
- <wp-relation-row
- *ngFor="let relatedWorkPackage of relatedWorkPackages"
- [workPackage]="workPackage"
- [groupByWorkPackageType]="groupByWorkPackageType"
- [relatedWorkPackage]="relatedWorkPackage"
- ></wp-relation-row>
-</div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.template.html b/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.template.html
index 5f4234b5979..4b19ccbbdbf 100644
--- a/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.template.html
+++ b/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.template.html
@@ -1,16 +1,17 @@
-<div
- *ngIf="canHaveChildren"
- class="wp-relations-hierarchy-section wp-relations--children">
- <div class="attributes-group--header">
- <div class="attributes-group--header-container">
- <h3 class="attributes-group--header-text"
+@if (canHaveChildren) {
+ <div
+ class="wp-relations-hierarchy-section wp-relations--children">
+ <div class="attributes-group--header">
+ <div class="attributes-group--header-container">
+ <h3 class="attributes-group--header-text"
[textContent]="text.childrenHeadline">
- </h3>
+ </h3>
+ </div>
</div>
+ <wp-children-query
+ [workPackage]="workPackage"
+ [addExistingChildEnabled]="true"
+ [query]="childrenQueryProps">
+ </wp-children-query>
</div>
- <wp-children-query
- [workPackage]="workPackage"
- [addExistingChildEnabled]="true"
- [query]="childrenQueryProps">
- </wp-children-query>
-</div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.html b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.html
index 64685c06ff5..d8ddc9f633f 100644
--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.html
+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.html
@@ -2,11 +2,11 @@
<turbo-frame [src]="turboFrameSrc" id="work-package-activities-tab-content" loading="lazy" #activitiesTabContent>
<op-content-loader viewBox="0 0 100 100">
<svg:rect x="0" y="0" width="70" height="5" rx="1" />
-
+
<svg:rect x="75" y="0" width="25" height="5" rx="1" />
-
+
<svg:rect x="0" y="10" width="100" height="8" rx="1" />
-
+
<svg:rect x="0" y="25" width="100" height="12" rx="1" />
</op-content-loader>
</turbo-frame>
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/files-tab/op-files-tab.component.html b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/files-tab/op-files-tab.component.html
index 3b7a37a7cbf..70f32e966bc 100644
--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/files-tab/op-files-tab.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/files-tab/op-files-tab.component.html
@@ -1,40 +1,41 @@
<div
class="op-tab-content--container op-files-tab"
->
- <section
- class="op-tab-content--tab-section"
- [ngClass]="{ 'op-tab-content--tab-section_no-header': (showAttachmentHeader$ | async) === false }"
- *ngIf="showAttachments"
- data-test-selector="op-tab-content--tab-section"
>
- <div
- *ngIf="showAttachmentHeader$ | async"
- class="op-tab-content--header"
- >
+ @if (showAttachments) {
+ <section
+ class="op-tab-content--tab-section"
+ [ngClass]="{ 'op-tab-content--tab-section_no-header': (showAttachmentHeader$ | async) === false }"
+ data-test-selector="op-tab-content--tab-section"
+ >
+ @if (showAttachmentHeader$ | async) {
+ <div
+ class="op-tab-content--header"
+ >
+ <svg class="op-tab-content--header-icon op-files-tab--icon" paperclip-icon size="small"></svg>
+ <span class="op-tab-content--header-text" [textContent]="text.attachments.label"></span>
+ </div>
+ }
+ <op-attachments
+ [resource]="workPackage"
+ (attachmentRemoved)="attachmentRemoved()"
+ (attachmentAdded)="attachmentAdded()"
+ ></op-attachments>
+ </section>
+ }
- <svg class="op-tab-content--header-icon op-files-tab--icon" paperclip-icon size="small"></svg>
- <span class="op-tab-content--header-text" [textContent]="text.attachments.label"></span>
- </div>
-
- <op-attachments
- [resource]="workPackage"
- (attachmentRemoved)="attachmentRemoved()"
- (attachmentAdded)="attachmentAdded()"
- ></op-attachments>
- </section>
-
- <section
- *ngFor="let storage of projectStorages | async"
- data-test-selector="op-tab-content--tab-section"
- class="op-tab-content--tab-section"
- >
- <op-storage
- [resource]="workPackage"
- [projectStorage]="storage"
- [allowUploading]="allowManageFileLinks$ | async"
- [allowLinking]="allowManageFileLinks$ | async"
- (fileRemoved)="attachmentRemoved()"
- (fileAdded)="attachmentAdded()"
- ></op-storage>
- </section>
+ @for (storage of projectStorages | async; track storage) {
+ <section
+ data-test-selector="op-tab-content--tab-section"
+ class="op-tab-content--tab-section"
+ >
+ <op-storage
+ [resource]="workPackage"
+ [projectStorage]="storage"
+ [allowUploading]="allowManageFileLinks$ | async"
+ [allowLinking]="allowManageFileLinks$ | async"
+ (fileRemoved)="attachmentRemoved()"
+ (fileAdded)="attachmentAdded()"
+ ></op-storage>
+ </section>
+ }
</div>
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.html b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.html
index c71afe1cb47..0045c985d69 100644
--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.html
+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.html
@@ -1,2 +1,4 @@
-<wp-single-view [workPackage]="workPackage"
- *ngIf="workPackage"></wp-single-view>
\ No newline at end of file
+@if (workPackage) {
+ <wp-single-view [workPackage]="workPackage"
+ ></wp-single-view>
+}
\ No newline at end of file
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/relations-tab/relations-tab.html b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/relations-tab/relations-tab.html
index 270c2c0761e..11e67c78957 100644
--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/relations-tab/relations-tab.html
+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/relations-tab/relations-tab.html
@@ -1,6 +1,8 @@
-<div class="detail-panel-description detail-panel--relations detail-panel--autocomplete-target"
- *ngIf="workPackage">
- <div class="detail-panel-description-content">
- <wp-relations [workPackage]="workPackage"></wp-relations>
+@if (workPackage) {
+ <div class="detail-panel-description detail-panel--relations detail-panel--autocomplete-target"
+ >
+ <div class="detail-panel-description-content">
+ <wp-relations [workPackage]="workPackage"></wp-relations>
+ </div>
</div>
-</div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/watchers-tab/watchers-tab.html b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/watchers-tab/watchers-tab.html
index 86e6e4d8d39..ac06c654d75 100644
--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/watchers-tab/watchers-tab.html
+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/watchers-tab/watchers-tab.html
@@ -1,21 +1,24 @@
<div id="detail-panel-watchers">
- <div class="op-toast -error"
- *ngIf="error">
- <div class="op-toast--content">
- <p [textContent]="text.loadingError"></p>
+ @if (error) {
+ <div class="op-toast -error"
+ >
+ <div class="op-toast--content">
+ <p [textContent]="text.loadingError"></p>
+ </div>
</div>
- </div>
+ }
<div [hidden]="error">
<div class="work-package--watchers form--selected-value--list"
- [ngClass]="{'-read-only': !allowedToRemove}">
+ [ngClass]="{'-read-only': !allowedToRemove}">
- <op-wp-watcher-entry
- *ngFor="let watcher of watching; trackBy:trackByHref"
- [watcher]="watcher">
- </op-wp-watcher-entry>
+ @for (watcher of watching; track trackByHref($index, watcher)) {
+ <op-wp-watcher-entry
+ [watcher]="watcher">
+ </op-wp-watcher-entry>
+ }
</div>
<div class="work-package--watchers-lookup hide-when-print"
- [hidden]="!allowedToAdd">
+ [hidden]="!allowedToAdd">
<form name="watcherForm" novalidate>
<op-user-autocompleter
(change)="addWatcher($event)"
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view/wp-single-view.component.html b/frontend/src/app/features/work-packages/components/wp-single-view/wp-single-view.component.html
index 995056129dc..1a613b31cf8 100644
--- a/frontend/src/app/features/work-packages/components/wp-single-view/wp-single-view.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-single-view/wp-single-view.component.html
@@ -1,149 +1,160 @@
-<div *ngIf="workPackage"
- class="work-package--single-view"
- [ngClass]="{'work-package--single-view_with-columns': showTwoColumnLayout()}"
- data-selector="wp-single-view">
- <div class="wp-new--subject-wrapper"
- *ngIf="isNewResource">
- <op-editable-attribute-field [resource]="workPackage"
- [wrapperClasses]="'-no-label'"
- [fieldName]="'subject'"></op-editable-attribute-field>
- </div>
-
- <div class="wp-info-wrapper">
- <wp-status-button *ngIf="!isNewResource"
- [workPackage]="workPackage">
- </wp-status-button>
- <attribute-help-text [attribute]="'status'"
- [attributeScope]="'WorkPackage'"
- *ngIf="!isNewResource"></attribute-help-text>
-
- <div class="work-packages--info-row"
- *ngIf="!isNewResource">
- <span [textContent]="idLabel"></span>:
- <span [textContent]="text.infoRow.createdBy"></span>
- <!-- The space has to be in an extra span
- because otherwise the browser would add a second space after it -->
- <span>&nbsp;</span>
- <op-user-link class="user-link"
- [user]="workPackage.author"></op-user-link>
- <span>.&nbsp;</span>
- <span [textContent]="text.infoRow.lastUpdatedOn"></span>
- <span>&nbsp;</span>
- <op-date-time [dateTimeValue]="workPackage.updatedAt"></op-date-time>
- <span>.</span>
+@if (workPackage) {
+ <div
+ class="work-package--single-view"
+ [ngClass]="{'work-package--single-view_with-columns': showTwoColumnLayout()}"
+ data-selector="wp-single-view">
+ @if (isNewResource) {
+ <div class="wp-new--subject-wrapper"
+ >
+ <op-editable-attribute-field [resource]="workPackage"
+ [wrapperClasses]="'-no-label'"
+ [fieldName]="'subject'"></op-editable-attribute-field>
+ </div>
+ }
+ <div class="wp-info-wrapper">
+ @if (!isNewResource) {
+ <wp-status-button
+ [workPackage]="workPackage">
+ </wp-status-button>
+ }
+ @if (!isNewResource) {
+ <attribute-help-text [attribute]="'status'"
+ [attributeScope]="'WorkPackage'"
+ ></attribute-help-text>
+ }
+ @if (!isNewResource) {
+ <div class="work-packages--info-row"
+ >
+ <span [textContent]="idLabel"></span>:
+ <span [textContent]="text.infoRow.createdBy"></span>
+ <!-- The space has to be in an extra span
+ because otherwise the browser would add a second space after it -->
+ <span>&nbsp;</span>
+ <op-user-link class="user-link"
+ [user]="workPackage.author"></op-user-link>
+ <span>.&nbsp;</span>
+ <span [textContent]="text.infoRow.lastUpdatedOn"></span>
+ <span>&nbsp;</span>
+ <op-date-time [dateTimeValue]="workPackage.updatedAt"></op-date-time>
+ <span>.</span>
+ </div>
+ }
+ <wp-custom-actions [workPackage]="workPackage" class="custom-actions"></wp-custom-actions>
</div>
-
- <wp-custom-actions [workPackage]="workPackage" class="custom-actions"></wp-custom-actions>
- </div>
-
- <div class="attributes-group -project-context __overflowing_element_container __overflowing_project_context"
- *ngIf="projectContext && projectContext.field"
- data-overflowing-identifier=".__overflowing_project_context">
- <div>
- <p class="wp-project-context--warning" [textContent]="text.project.required"></p>
- <div class="attributes-key-value"
- [ngClass]="{'-span-all-columns': descriptor.spanAll }"
- *ngFor="let descriptor of projectContext.field; trackBy:trackByName">
- <div class="attributes-key-value--key">
- <wp-replacement-label [fieldName]="descriptor.name">
- {{ descriptor.label }}
- <span class="required"
- *ngIf="descriptor.field.required && descriptor.field.writable">*</span>
- </wp-replacement-label>
- <attribute-help-text [attribute]="descriptor.name"
- [attributeScope]="'WorkPackage'"></attribute-help-text>
+ @if (projectContext && projectContext.field) {
+ <div class="attributes-group -project-context __overflowing_element_container __overflowing_project_context"
+ data-overflowing-identifier=".__overflowing_project_context">
+ <div>
+ <p class="wp-project-context--warning" [textContent]="text.project.required"></p>
+ @for (descriptor of projectContext.field; track trackByName($index, descriptor)) {
+ <div class="attributes-key-value"
+ [ngClass]="{'-span-all-columns': descriptor.spanAll }"
+ >
+ <div class="attributes-key-value--key">
+ <wp-replacement-label [fieldName]="descriptor.name">
+ {{ descriptor.label }}
+ @if (descriptor.field.required && descriptor.field.writable) {
+ <span class="required"
+ >*</span>
+ }
+ </wp-replacement-label>
+ <attribute-help-text [attribute]="descriptor.name"
+ [attributeScope]="'WorkPackage'"></attribute-help-text>
+ </div>
+ <div class="attributes-key-value--value-container">
+ <op-editable-attribute-field [resource]="workPackage"
+ [fieldName]="descriptor.name"></op-editable-attribute-field>
+ </div>
+ </div>
+ }
</div>
- <div class="attributes-key-value--value-container">
- <op-editable-attribute-field [resource]="workPackage"
- [fieldName]="descriptor.name"></op-editable-attribute-field>
+ </div>
+ }
+ @if (showSwitchToProjectBanner()) {
+ <div
+ class="attributes-group -project-context hide-when-print"
+ >
+ <div>
+ <span [innerHTML]="switchToProjectText"></span>
</div>
</div>
+ }
+ @for (component of prependedAttributeGroupComponents(); track component) {
+ <ndc-dynamic [ndcDynamicComponent]="component"
+ [ndcDynamicInputs]="{ workPackage: workPackage }">
+ </ndc-dynamic>
+ }
+ <div class="attributes-group description-group">
+ <div class="single-attribute work-packages--details--description">
+ <op-editable-attribute-field [fieldName]="'description'"
+ [resource]="workPackage"
+ [isDropTarget]="true"
+ [wrapperClasses]="'-no-label'">
+ </op-editable-attribute-field>
+ </div>
</div>
- </div>
-
- <div
- class="attributes-group -project-context hide-when-print"
- *ngIf="showSwitchToProjectBanner()"
- >
- <div>
- <span [innerHTML]="switchToProjectText"></span>
- </div>
- </div>
-
- <ng-container *ngFor="let component of prependedAttributeGroupComponents()">
- <ndc-dynamic [ndcDynamicComponent]="component"
- [ndcDynamicInputs]="{ workPackage: workPackage }">
- </ndc-dynamic>
- </ng-container>
-
- <div class="attributes-group description-group">
- <div class="single-attribute work-packages--details--description">
- <op-editable-attribute-field [fieldName]="'description'"
- [resource]="workPackage"
- [isDropTarget]="true"
- [wrapperClasses]="'-no-label'">
- </op-editable-attribute-field>
- </div>
- </div>
-
- <div
- *ngFor="let group of groupedFields; trackBy:trackByName"
- [hidden]="shouldHideGroup(group)"
- [attr.data-group-name]="group.name"
- [ngClass]="'__overflowing_' + group.id"
- [attr.data-overflowing-identifier]="'.__overflowing_' + group.id"
- class="attributes-group __overflowing_element_container"
- >
- <ng-container opWorkPackageIsolatedQuerySpace *ngIf="group.isolated">
- <ndc-dynamic [ndcDynamicComponent]="attributeGroupComponent(group)"
+ @for (group of groupedFields; track trackByName($index, group)) {
+ <div
+ [hidden]="shouldHideGroup(group)"
+ [attr.data-group-name]="group.name"
+ [ngClass]="'__overflowing_' + group.id"
+ [attr.data-overflowing-identifier]="'.__overflowing_' + group.id"
+ class="attributes-group __overflowing_element_container"
+ >
+ @if (group.isolated) {
+ <ng-container opWorkPackageIsolatedQuerySpace>
+ <ndc-dynamic [ndcDynamicComponent]="attributeGroupComponent(group)"
[ndcDynamicInputs]="{ workPackage: workPackage,
group: group,
query: group.query }">
- </ndc-dynamic>
- </ng-container>
-
- <ng-container *ngIf="!group.isolated">
- <div class="attributes-group--header">
- <div class="attributes-group--header-container">
- <h3 class="attributes-group--header-text"
+ </ndc-dynamic>
+ </ng-container>
+ }
+ @if (!group.isolated) {
+ <div class="attributes-group--header">
+ <div class="attributes-group--header-container">
+ <h3 class="attributes-group--header-text"
[textContent]="group.name"></h3>
- </div>
+ </div>
+ </div>
+ <ndc-dynamic [ndcDynamicComponent]="attributeGroupComponent(group)"
+ [ndcDynamicInjector]="injector"
+ [ndcDynamicInputs]="{ workPackage: workPackage, group: group }">
+ </ndc-dynamic>
+ }
</div>
-
- <ndc-dynamic [ndcDynamicComponent]="attributeGroupComponent(group)"
- [ndcDynamicInjector]="injector"
- [ndcDynamicInputs]="{ workPackage: workPackage, group: group }">
- </ndc-dynamic>
- </ng-container>
+ }
</div>
-</div>
+}
-<div
- *ngIf="isNewResource"
- class="work-packages--storages"
->
+@if (isNewResource) {
<div
- *ngIf="workPackage.$links.attachments"
- >
- <div class="op-tab-content--header">
- <span class="op-tab-content--header-text" [textContent]="text.attachments.label"></span>
- </div>
-
- <ndc-dynamic [ndcDynamicComponent]="attachmentListComponent()"
- [ndcDynamicInputs]="{ resource: workPackage }">
- </ndc-dynamic>
-
- <ndc-dynamic [ndcDynamicComponent]="attachmentUploadComponent()"
- [ndcDynamicInputs]="{ resource: workPackage }"
- *ngIf="workPackage.canAddAttachments">
- </ndc-dynamic>
+ class="work-packages--storages"
+ >
+ @if (workPackage.$links.attachments) {
+ <div
+ >
+ <div class="op-tab-content--header">
+ <span class="op-tab-content--header-text" [textContent]="text.attachments.label"></span>
+ </div>
+ <ndc-dynamic [ndcDynamicComponent]="attachmentListComponent()"
+ [ndcDynamicInputs]="{ resource: workPackage }">
+ </ndc-dynamic>
+ @if (workPackage.canAddAttachments) {
+ <ndc-dynamic [ndcDynamicComponent]="attachmentUploadComponent()"
+ [ndcDynamicInputs]="{ resource: workPackage }"
+ >
+ </ndc-dynamic>
+ }
+ </div>
+ }
+ @for (storage of projectStorages | async; track storage) {
+ <op-storage
+ [resource]="workPackage"
+ [projectStorage]="storage"
+ [allowLinking]="true"
+ [allowUploading]="true"
+ ></op-storage>
+ }
</div>
-
- <op-storage
- *ngFor="let storage of projectStorages | async"
- [resource]="workPackage"
- [projectStorage]="storage"
- [allowLinking]="true"
- [allowUploading]="true"
- ></op-storage>
-</div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-subject/wp-subject.html b/frontend/src/app/features/work-packages/components/wp-subject/wp-subject.html
index 3577dbe336e..cc131408872 100644
--- a/frontend/src/app/features/work-packages/components/wp-subject/wp-subject.html
+++ b/frontend/src/app/features/work-packages/components/wp-subject/wp-subject.html
@@ -1,17 +1,19 @@
-<div *ngIf="workPackage"
- class="work-packages--subject-type-row __overflowing_element_container"
- [ngClass]="'__overflowing_' + uniqueElementIdentifier"
- [attr.data-overflowing-identifier]="'.__overflowing_' + uniqueElementIdentifier">
- <div class="work-packages--type-selector work-packages--subject-element">
- <op-editable-attribute-field [resource]="workPackage"
- [wrapperClasses]="'work-packages--type-selector work-packages--subject-element -no-label'"
- [fieldName]="'type'">
- </op-editable-attribute-field>
+@if (workPackage) {
+ <div
+ class="work-packages--subject-type-row __overflowing_element_container"
+ [ngClass]="'__overflowing_' + uniqueElementIdentifier"
+ [attr.data-overflowing-identifier]="'.__overflowing_' + uniqueElementIdentifier">
+ <div class="work-packages--type-selector work-packages--subject-element">
+ <op-editable-attribute-field [resource]="workPackage"
+ [wrapperClasses]="'work-packages--type-selector work-packages--subject-element -no-label'"
+ [fieldName]="'type'">
+ </op-editable-attribute-field>
+ </div>
+ <div class="work-packages--details--subject work-packages--subject-element">
+ <op-editable-attribute-field [resource]="workPackage"
+ [wrapperClasses]="'work-packages--details--subject work-packages--subject-element -no-label'"
+ [fieldName]="'subject'">
+ </op-editable-attribute-field>
+ </div>
</div>
- <div class="work-packages--details--subject work-packages--subject-element">
- <op-editable-attribute-field [resource]="workPackage"
- [wrapperClasses]="'work-packages--details--subject work-packages--subject-element -no-label'"
- [fieldName]="'subject'">
- </op-editable-attribute-field>
- </div>
-</div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/display-settings-tab.component.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/display-settings-tab.component.html
index 38c909af173..6ec55eaaaed 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/display-settings-tab.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/display-settings-tab.component.html
@@ -5,9 +5,9 @@
<div class="form--field-container">
<label class="option-label">
<input type="radio"
- [(ngModel)]="displayMode"
- value="default"
- name="display_mode_switch">
+ [(ngModel)]="displayMode"
+ value="default"
+ name="display_mode_switch">
<svg op-no-hierarchy-icon size="small" [attr.icon-title]="text.display_mode.default"></svg>
<span [textContent]="text.display_mode.default"></span>
<span class="form--inline-instructions" [textContent]="text.default"></span>
@@ -18,14 +18,16 @@
<div class="form--field-container">
<label class="option-label">
<input type="radio"
- [(ngModel)]="displayMode"
- value="hierarchy"
- name="display_mode_switch">
+ [(ngModel)]="displayMode"
+ value="hierarchy"
+ name="display_mode_switch">
<svg op-hierarchy-icon size="small"[attr.icon-title]="text.display_mode.hierarchy"></svg>
<span [textContent]="text.display_mode.hierarchy"></span>
- <span *ngIf="displayMode === 'hierarchy'"
- class="form--inline-instructions"
- [textContent]="text.display_mode.hierarchy_hint"></span>
+ @if (displayMode === 'hierarchy') {
+ <span
+ class="form--inline-instructions"
+ [textContent]="text.display_mode.hierarchy_hint"></span>
+ }
</label>
</div>
</div>
@@ -33,19 +35,21 @@
<div class="form--field-container">
<label class="option-label">
<input type="radio"
- [(ngModel)]="displayMode"
- value="grouped"
- name="display_mode_switch">
+ [(ngModel)]="displayMode"
+ value="grouped"
+ name="display_mode_switch">
<svg op-group-icon size="small" [attr.icon-title]="text.label_group_by"></svg>
<span [textContent]="text.label_group_by"></span>
<select (change)="updateGroup($event.target.value)"
- id="selected_grouping"
- name="selected_grouping"
- class="form--select form--inline-select option-label--select">
- <option *ngFor="let group of availableGroups"
- [textContent]="group.name"
- [selected]="currentGroup && currentGroup!.href === group.href"
- [value]="group.href"></option>
+ id="selected_grouping"
+ name="selected_grouping"
+ class="form--select form--inline-select option-label--select">
+ @for (group of availableGroups; track group) {
+ <option
+ [textContent]="group.name"
+ [selected]="currentGroup && currentGroup!.href === group.href"
+ [value]="group.href"></option>
+ }
</select>
</label>
</div>
@@ -58,9 +62,9 @@
<div class="form--field-container">
<label class="option-label">
<input type="checkbox"
- (change)="displaySums = !displaySums"
- [checked]="displaySums"
- name="display_sums_switch">
+ (change)="displaySums = !displaySums"
+ [checked]="displaySums"
+ name="display_sums_switch">
{{ text.display_sums }}
<span class="form--inline-instructions" [textContent]="text.display_sums_hint"></span>
</label>
diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/filters-tab.component.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/filters-tab.component.html
index 792da3056ed..5242438d03b 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/filters-tab.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/filters-tab.component.html
@@ -1,3 +1,5 @@
-<op-query-filters *ngIf="!!filters"
- (filtersChanged)="filters = $event"
- [filters]="filters"></op-query-filters>
+@if (!!filters) {
+ <op-query-filters
+ (filtersChanged)="filters = $event"
+ [filters]="filters"></op-query-filters>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/sort-by-tab.component.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/sort-by-tab.component.html
index 46f28facc6e..b6579eadd66 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/sort-by-tab.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/sort-by-tab.component.html
@@ -1,39 +1,40 @@
<form name="modalSortingForm">
<div id="modal-sorting"
- class="modal-content-container loading-indicator--location"
- data-indicator-name="sorting-modal">
+ class="modal-content-container loading-indicator--location"
+ data-indicator-name="sorting-modal">
<p [textContent]="text.sorting_mode.description"></p>
<div class="form--field -full-width">
<div class="form--field-container">
<label class="option-label">
<input type="radio"
- [(ngModel)]="sortingMode"
- (change)="updateSortingMode($event.target.value)"
- name="sorting_mode_switch"
- value="manual">
+ [(ngModel)]="sortingMode"
+ (change)="updateSortingMode($event.target.value)"
+ name="sorting_mode_switch"
+ value="manual">
{{ text.sorting_mode.manually }}
</label>
</div>
</div><div class="form--field -full-width">
- <div class="form--field-container">
- <label class="option-label">
- <input type="radio"
- [(ngModel)]="sortingMode"
- (change)="updateSortingMode($event.target.value)"
- name="sorting_mode_switch"
- value="automatic">
- {{ text.sorting_mode.automatic }}
- </label>
- </div>
- <div class="form--field-instructions">
- {{ text.sorting_mode.warning }}
- </div>
+ <div class="form--field-container">
+ <label class="option-label">
+ <input type="radio"
+ [(ngModel)]="sortingMode"
+ (change)="updateSortingMode($event.target.value)"
+ name="sorting_mode_switch"
+ value="automatic">
+ {{ text.sorting_mode.automatic }}
+ </label>
+ </div>
+ <div class="form--field-instructions">
+ {{ text.sorting_mode.warning }}
</div>
+ </div>
- <ng-container *ngIf="sortingMode === 'automatic'">
+ @if (sortingMode === 'automatic') {
+ @for (sort of sortationObjects; track sort; let index = $index) {
<div class="form--row modal-sorting-row-{{index}}"
- *ngFor="let sort of sortationObjects; let index = index">
+ >
<div class="form--field -full-width">
<label
for="modal-sorting-attribute-{{index}}"
@@ -47,46 +48,49 @@
name="modal-sorting-attribute-{{index}}"
(change)="updateSelection(sort, $event.target.value)"
class="form--select">
- <option *ngIf="!!sort.column.href"
- [textContent]="sort.column.name"
- [value]="sort.column.href"
- selected></option>
-
+ @if (!!sort.column.href) {
+ <option
+ [textContent]="sort.column.name"
+ [value]="sort.column.href"
+ selected></option>
+ }
<!--
TODO:
The option element below used this code:
- [selected]="sort.column.href === null"
-
+ [selected]="sort.column.href === null"
However, the Angular template compiler wrongly complains about the comparison.
https://github.com/angular/angular/issues/18754
-
Since the explicit null comparison is safer than `!sort.column.href` the code
should be reverted to the old version once the bug is fixed.
-->
<option [textContent]="emptyColumn.name"
- [value]="emptyColumn.href"
- [selected]="!sort.column.href"></option>
-
- <option *ngFor="let column of availableColumns"
- [textContent]="column.name"
- [value]="column.href"></option>
+ [value]="emptyColumn.href"
+ [selected]="!sort.column.href"></option>
+ @for (column of availableColumns; track column) {
+ <option
+ [textContent]="column.name"
+ [value]="column.href"></option>
+ }
</select>
</div>
</div>
</div>
<div class="form--field -full-width">
<div class="form--field-container">
- <label class="option-label" *ngFor="let availableDirection of availableDirections">
- <input type="radio"
- [(ngModel)]="sort.direction"
- [value]="availableDirection.href"
- [textContent]="availableDirection.name"
- name="modal-sorting-attribute-{{index}}--sort-direction">
- {{ availableDirection.name }}
- </label>
+ @for (availableDirection of availableDirections; track availableDirection) {
+ <label class="option-label">
+ <input type="radio"
+ [(ngModel)]="sort.direction"
+ [value]="availableDirection.href"
+ [textContent]="availableDirection.name"
+ name="modal-sorting-attribute-{{index}}--sort-direction">
+ {{ availableDirection.name }}
+ </label>
+ }
</div>
</div>
</div>
- </ng-container>
- </div>
+ }
+ }
+</div>
</form>
diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/timelines-tab.component.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/timelines-tab.component.html
index f2ee269acdf..135a7ac79e3 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/timelines-tab.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/timelines-tab.component.html
@@ -2,73 +2,76 @@
<form class="form">
<div class="form--field">
<label class="form--label"
- [textContent]="text.display_timelines"
- for="display_timelines_switch"></label>
+ [textContent]="text.display_timelines"
+ for="display_timelines_switch"></label>
<div class="form--field-container">
<div class="form--check-box-container">
<input type="checkbox"
- (change)="timelineVisible = !timelineVisible"
- [checked]="timelineVisible"
- [disabled]="timelineToggleDisabled()"
- id="display_timelines_switch"
- name="display_timelines_switch">
+ (change)="timelineVisible = !timelineVisible"
+ [checked]="timelineVisible"
+ [disabled]="timelineToggleDisabled()"
+ id="display_timelines_switch"
+ name="display_timelines_switch">
</div>
</div>
<p class="form--field-instructions" [textContent]="text.display_timelines_hint"></p>
</div>
- <ng-container *ngIf="timelineVisible">
+ @if (timelineVisible) {
<fieldset class="form--fieldset">
<legend class="form--fieldset-legend"
- [textContent]="text.zoom.level">
+ [textContent]="text.zoom.level">
</legend>
<p [textContent]="text.zoom.description"></p>
-
<div class="form--field">
<div class="form--field-container">
<div class="form--text-select-container -slim">
-
<select
- id="modal-timelines-zoomlevel"
- (change)="zoomLevel = $event.target.value"
- class="form--select">
- <option *ngFor="let level of availableZoomLevels"
- [textContent]="text.zoom[level]"
- [value]="level"
- [selected]="zoomLevel === level"></option>
+ id="modal-timelines-zoomlevel"
+ (change)="zoomLevel = $event.target.value"
+ class="form--select">
+ @for (level of availableZoomLevels; track level) {
+ <option
+ [textContent]="text.zoom[level]"
+ [value]="level"
+ [selected]="zoomLevel === level"></option>
+ }
</select>
</div>
</div>
</div>
</fieldset>
-
<fieldset class="form--fieldset">
<legend class="form--fieldset-legend"
- [textContent]="text.labels.title">
+ [textContent]="text.labels.title">
</legend>
<p [textContent]="text.labels.description"></p>
- <div class="form--row" *ngFor="let key of availableLabels">
- <div class="form--field">
- <label
- for="modal-timelines-label-{{key}}"
- class="form--label">
- {{ text.labels[key] }}
- </label>
- <div class="form--field-container">
- <div class="form--select-container">
- <select
- id="modal-timelines-label-{{key}}"
- (change)="updateLabels(key, $event.target.value)"
- class="form--select">
- <option *ngFor="let column of availableAttributes"
- [textContent]="column.name"
- [value]="column.id"
- [selected]="labels[key] === column.id"></option>
- </select>
+ @for (key of availableLabels; track key) {
+ <div class="form--row">
+ <div class="form--field">
+ <label
+ for="modal-timelines-label-{{key}}"
+ class="form--label">
+ {{ text.labels[key] }}
+ </label>
+ <div class="form--field-container">
+ <div class="form--select-container">
+ <select
+ id="modal-timelines-label-{{key}}"
+ (change)="updateLabels(key, $event.target.value)"
+ class="form--select">
+ @for (column of availableAttributes; track column) {
+ <option
+ [textContent]="column.name"
+ [value]="column.id"
+ [selected]="labels[key] === column.id"></option>
+ }
+ </select>
+ </div>
</div>
</div>
</div>
- </div>
+ }
</fieldset>
- </ng-container>
+ }
</form>
</div>
diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.html
index b2bb2104a51..b372d1c7086 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.html
@@ -3,14 +3,16 @@
<span [textContent]="text.filter_work_packages_by_relation_type"></span>
&ngsp;
<select class="form--select form--inline-select"
- id=""
- [(ngModel)]="selectedRelationFilter"
- (ngModelChange)="onRelationFilterSelected()"
- [compareWith]="compareRelationFilters">
- <option *ngFor="let filter of availableRelationFilters"
- [textContent]="text[filter.id]"
- [ngValue]="filter">
- </option>
+ id=""
+ [(ngModel)]="selectedRelationFilter"
+ (ngModelChange)="onRelationFilterSelected()"
+ [compareWith]="compareRelationFilters">
+ @for (filter of availableRelationFilters; track filter) {
+ <option
+ [textContent]="text[filter.id]"
+ [ngValue]="filter">
+ </option>
+ }
</select>
</h5>
</div>
diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration.modal.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration.modal.html
index 5cc801e15eb..24488379b54 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration.modal.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration.modal.html
@@ -1,41 +1,41 @@
<div
class="spot-modal spot-modal_wide wp-table--configuration-modal loading-indicator--location"
data-indicator-name="modal"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{text.title}}</div>
<div class="spot-divider"></div>
<div class="spot-modal--body spot-container">
- <ng-container *ngIf="!!prependModalComponent">
+ @if (!!prependModalComponent) {
<ng-container *ngComponentOutlet="prependModalComponent; injector: injector"></ng-container>
- </ng-container>
+ }
- <op-scrollable-tabs
- *ngIf="tabPortalHost"
- [tabs]="availableTabs"
- [currentTabId]="tabPortalHost.currentTab?.id"
- (tabSelected)="switchTo($event)"
- >
-
- </op-scrollable-tabs>
+ @if (tabPortalHost) {
+ <op-scrollable-tabs
+ [tabs]="availableTabs"
+ [currentTabId]="tabPortalHost.currentTab?.id"
+ (tabSelected)="switchTo($event)"
+ >
+ </op-scrollable-tabs>
+ }
<div class="tab-content" #tabContentOutlet></div>
</div>
<div class="spot-action-bar">
<div class="spot-action-bar--right">
<button
- class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
- [textContent]="text.cancelButton"
- (click)="closeMe($event)"
- >
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
+ [textContent]="text.cancelButton"
+ (click)="closeMe($event)"
+ >
</button>
<button
class="button button_no-margin -primary spot-action-bar--action"
data-test-selector="spot-modal-wp-table-configuration-save-button"
[textContent]="text.applyButton"
(click)="saveChanges()"
- >
+ >
</button>
</div>
</div>
diff --git a/frontend/src/app/features/work-packages/components/wp-table/embedded/wp-embedded-table.html b/frontend/src/app/features/work-packages/components/wp-table/embedded/wp-embedded-table.html
index 5b50e97c523..f8bd6533ff5 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/embedded/wp-embedded-table.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/embedded/wp-embedded-table.html
@@ -1,43 +1,47 @@
-<div *ngIf="configuration"
- class="work-packages-embedded-view--container loading-indicator--location"
+@if (configuration) {
+ <div
+ class="work-packages-embedded-view--container loading-indicator--location"
[ngClass]="{ '-hierarchy-disabled': !configuration.hierarchyToggleEnabled,
'-compact-tables': configuration.compactTableStyle,
'-external-height': externalHeight }"
- [attr.data-indicator-name]="uniqueEmbeddedTableName">
-
- <ng-container *ngIf="renderTable">
- <!-- Filter container (if requested) -->
- <op-filter-container *ngIf="configuration.withFilters"
- [showFilterButton]="configuration.showFilterButton"
- [filterButtonText]="configuration.filterButtonText">
-
- </op-filter-container>
-
- <!-- TABLE + TIMELINE horizontal split -->
- <wp-table *ngIf="!configuration.isCardView"
- [projectIdentifier]="projectIdentifier"
- [configuration]="configuration"
- (itemClicked)="handleWorkPackageClicked($event)"
- (stateLinkClicked)="openStateLink($event)"
- class="work-packages-split-view--tabletimeline-content"></wp-table>
-
- <!-- GRID representation of the WP -->
- <div class="work-packages-embedded-view--grid-view" >
- <wp-grid *ngIf="configuration.isCardView"
- (itemClicked)="handleWorkPackageClicked($event)"
- (stateLinkClicked)="openStateLink($event)"
- [configuration]="configuration">
- </wp-grid>
- </div>
-
- <!-- Footer -->
- <div class="work-packages-split-view--tabletimeline-footer hide-when-print">
- <wp-table-pagination [hideForSinglePageResults]="true">
- </wp-table-pagination>
- </div>
- </ng-container>
-
- <div class="op-toast -error" *ngIf="error">
- <span [textContent]="error.message || error"></span>
+ [attr.data-indicator-name]="uniqueEmbeddedTableName">
+ @if (renderTable) {
+ <!-- Filter container (if requested) -->
+ @if (configuration.withFilters) {
+ <op-filter-container
+ [showFilterButton]="configuration.showFilterButton"
+ [filterButtonText]="configuration.filterButtonText">
+ </op-filter-container>
+ }
+ <!-- TABLE + TIMELINE horizontal split -->
+ @if (!configuration.isCardView) {
+ <wp-table
+ [projectIdentifier]="projectIdentifier"
+ [configuration]="configuration"
+ (itemClicked)="handleWorkPackageClicked($event)"
+ (stateLinkClicked)="openStateLink($event)"
+ class="work-packages-split-view--tabletimeline-content"></wp-table>
+ }
+ <!-- GRID representation of the WP -->
+ <div class="work-packages-embedded-view--grid-view" >
+ @if (configuration.isCardView) {
+ <wp-grid
+ (itemClicked)="handleWorkPackageClicked($event)"
+ (stateLinkClicked)="openStateLink($event)"
+ [configuration]="configuration">
+ </wp-grid>
+ }
+ </div>
+ <!-- Footer -->
+ <div class="work-packages-split-view--tabletimeline-footer hide-when-print">
+ <wp-table-pagination [hideForSinglePageResults]="true">
+ </wp-table-pagination>
+ </div>
+ }
+ @if (error) {
+ <div class="op-toast -error">
+ <span [textContent]="error.message || error"></span>
+ </div>
+ }
</div>
-</div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.html b/frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.html
index 3be2f295f23..550f65da1ba 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.html
@@ -1,68 +1,81 @@
-<div class="generic-table--sort-header-outer" [ngSwitch]="columnType">
-
- <span class="generic-table--sort-header" *ngSwitchCase="'hierarchy'">
- <span
- class="hierarchy-header--icon"
- *ngIf="displayHierarchyIcon"
- (click)="toggleHierarchy($event)"
- [attr.title]="text.toggleHierarchy"
- tabindex="-1"
- aria-hidden="true">
- <op-icon icon-classes="icon {{ hierarchyIcon }}"></op-icon>
- </span>
-
- <!--suppress XmlDuplicatedId -->
- <a href="#"
- *ngIf="sortable"
- [ngClass]="[directionClass && 'sort', directionClass]"
- lang-attribute
- lang="{{locale}}"
- id="{{ headerColumn.id }}"
- rel="nofollow">{{headerColumn.name}}</a>
- <a *ngIf="!sortable">{{headerColumn.name}}</a>
-
- <op-icon icon-classes="dropdown-indicator icon-small icon-pulldown"
- icon-title="{{ text.openMenu }}"
- *ngIf="displayDropdownIcon"></op-icon>
- </span>
-
- <span class="generic-table--sort-header" *ngSwitchCase="'relation'">
- <a [attr.title]="headerColumn.name">
- <op-icon icon-classes="icon-context icon-relations relations-header--icon"></op-icon>
- {{columnName}}
- </a>
- <op-icon icon-classes="dropdown-indicator icon-small icon-pulldown"
- icon-title="{{ text.openMenu }}"
- *ngIf="displayDropdownIcon"></op-icon>
- </span>
-
- <span class="draggable-table--sort-header"
- *ngSwitchCase="'sort'">
- </span>
-
- <span class="generic-table--sort-header" *ngSwitchDefault>
-
- <!--suppress XmlDuplicatedId -->
- <a href="#"
- *ngIf="sortable"
- [ngClass]="[directionClass && 'sort', directionClass]"
- lang-attribute
- lang="{{locale}}"
- id="{{ headerColumn.id }}"
- rel="nofollow">{{headerColumn.name}}</a>
-
- <a *ngIf="!sortable">{{headerColumn.name}}</a>
-
- <span
- *ngIf="baselineIncompatible"
- [attr.title]="text.baselineIncompatible"
- class="spot-icon spot-icon_1_25 spot-icon_warning"
- >
- </span>
-
- <op-icon icon-classes="dropdown-indicator icon-small icon-pulldown"
- icon-title="{{ text.openMenu }}"
- *ngIf="displayDropdownIcon"></op-icon>
- </span>
-
+<div class="generic-table--sort-header-outer">
+ @switch (columnType) {
+ @case ('hierarchy') {
+ <span class="generic-table--sort-header">
+ @if (displayHierarchyIcon) {
+ <span
+ class="hierarchy-header--icon"
+ (click)="toggleHierarchy($event)"
+ [attr.title]="text.toggleHierarchy"
+ tabindex="-1"
+ aria-hidden="true">
+ <op-icon icon-classes="icon {{ hierarchyIcon }}"></op-icon>
+ </span>
+ }
+ <!--suppress XmlDuplicatedId -->
+ @if (sortable) {
+ <a href="#"
+ [ngClass]="[directionClass && 'sort', directionClass]"
+ lang-attribute
+ lang="{{locale}}"
+ id="{{ headerColumn.id }}"
+ rel="nofollow">{{headerColumn.name}}</a>
+ }
+ @if (!sortable) {
+ <a>{{headerColumn.name}}</a>
+ }
+ @if (displayDropdownIcon) {
+ <op-icon icon-classes="dropdown-indicator icon-small icon-pulldown"
+ icon-title="{{ text.openMenu }}"
+ ></op-icon>
+ }
+ </span>
+ }
+ @case ('relation') {
+ <span class="generic-table--sort-header">
+ <a [attr.title]="headerColumn.name">
+ <op-icon icon-classes="icon-context icon-relations relations-header--icon"></op-icon>
+ {{columnName}}
+ </a>
+ @if (displayDropdownIcon) {
+ <op-icon icon-classes="dropdown-indicator icon-small icon-pulldown"
+ icon-title="{{ text.openMenu }}"
+ ></op-icon>
+ }
+ </span>
+ }
+ @case ('sort') {
+ <span class="draggable-table--sort-header"
+ >
+ </span>
+ }
+ @default {
+ <span class="generic-table--sort-header">
+ <!--suppress XmlDuplicatedId -->
+ @if (sortable) {
+ <a href="#"
+ [ngClass]="[directionClass && 'sort', directionClass]"
+ lang-attribute
+ lang="{{locale}}"
+ id="{{ headerColumn.id }}"
+ rel="nofollow">{{headerColumn.name}}</a>
+ }
+ @if (!sortable) {
+ <a>{{headerColumn.name}}</a>
+ }
+ @if (baselineIncompatible) {
+ <span
+ [attr.title]="text.baselineIncompatible"
+ class="spot-icon spot-icon_1_25 spot-icon_warning"
+ >
+ </span>
+ }
+ @if (displayDropdownIcon) {
+ <op-icon icon-classes="dropdown-indicator icon-small icon-pulldown"
+ icon-title="{{ text.openMenu }}"
+ ></op-icon>
+ }
+ </span>
+ }
+ }
</div>
diff --git a/frontend/src/app/features/work-packages/components/wp-table/wp-table.component.html b/frontend/src/app/features/work-packages/components/wp-table/wp-table.component.html
index 5b647ddf12b..f166b8a9aac 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/wp-table.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/wp-table.component.html
@@ -1,101 +1,125 @@
-<div class="work-packages-split-view--tabletimeline-content" *ngIf="query">
- <div class="work-packages-tabletimeline--table-side work-package-table--container __hidden_overflow_container">
- <table
- class="keyboard-accessible-list generic-table work-package-table"
- data-controller="table-highlighting"
- [class.op-table-baseline]="baselineEnabled"
- >
- <colgroup>
- <col data-highlight="false" *ngIf="configuration.dragAndDropEnabled">
- <col data-highlight="false" *ngIf="baselineEnabled">
- <!-- Generate col elements dynamically(!) for each requested column plus one for the action menu's column. -->
- <col *ngFor="let column of [].constructor(columns.length)">
- <col *ngIf="configuration.columnMenuEnabled">
- <col data-highlight="false" *ngIf="!configuration.columnMenuEnabled">
- </colgroup>
- <caption class="sr-only">
- <span>{{text.tableSummary}}</span>
- <span id="wp-table-sort-summary"></span>
- <span>{{text.tableSummaryHints}}</span>
- </caption>
- <thead class="-sticky">
- <tr>
- <th *ngIf="configuration.dragAndDropEnabled" class="wp-table--manual-sort-th -short hide-when-print">
- <div class="generic-table--empty-header">
- <op-icon *ngIf="manualSortEnabled" icon-classes="icon-sort-by"></op-icon>
- </div>
- </th>
- <th *ngIf="baselineEnabled" class="wp-table--baseline-th -short hide-when-print">
- <div class="generic-table--empty-header op-table-baseline--column-header">
- <span class="spot-icon spot-icon_baseline"></span>
- </div>
- </th>
- <th *ngFor="let column of columns; trackBy:trackByHref"
- [ngClass]="{'-max': column.id === 'subject', '-min-200': ['estimatedTime', 'remainingTime'].includes(column.id) }"
- class="wp-table--table-header">
- <sortHeader [headerColumn]="column"
- [locale]="column.custom_field && column.custom_field.name_locale || locale"
- [table]="workPackageTable"
-
- opColumnsContextMenu
- [opColumnsContextMenu-column]="column"
- [opColumnsContextMenu-table]="workPackageTable">
- </sortHeader>
- </th>
- <th class="wp-table--configuration-modal--trigger wp-table--context-menu-th -short hide-when-print"
- *ngIf="configuration.columnMenuEnabled || configuration.actionsColumnEnabled">
- <div class="generic-table--sort-header-outer" *ngIf="configuration.columnMenuEnabled">
- <wp-table-config-menu>
- </wp-table-config-menu>
- </div>
- </th>
- </tr>
- </thead>
- <tbody class="work-package--empty-tbody" *ngIf="!isEmbedded && query && results.count === 0">
- <tr id="empty-row-notification">
- <td [attr.colspan]="numTableColumns">
- <span>
- <op-icon icon-classes="icon-info1 icon-context"></op-icon>
- <span>
- <strong>{{text.noResults.title}}</strong>
- {{text.noResults.description}}
- </span>
- </span>
- </td>
- </tr>
- </tbody>
-
- <tbody class="results-tbody work-package--results-tbody">
- </tbody>
-
- <tbody>
- <tr class="wp-table--sums-row wp-table--row"
- wpTableSumsRow
- [wpTableSumsRow-table]="workPackageTable">
- </tr>
- </tbody>
-
- <tbody *ngIf="tableElement && configuration.inlineCreateEnabled"
- wpInlineCreate
- [colspan]="numTableColumns"
- [table]="workPackageTable"
- [projectIdentifier]="projectIdentifier"
- (showing)="inlineCreateVisible = $event"
- >
- </tbody>
- </table>
- </div>
-
- <div *ngIf="!configuration.isEmbedded"
- class="work-packages--tabletimeline--timeline--resizer hidden-for-mobile hide-when-print">
- <wp-resizer [elementClass]="'work-packages-tabletimeline--timeline-side'"
- [resizeEvent]="'wp-resize.timeline'"
- [variableName]="'--gantt-split-width'"
- [localStorageKey]="'openProject-timelineFlexBasis'"></wp-resizer>
- </div>
-
- <div class="work-packages-tabletimeline--timeline-side"
- [ngClass]="{ '-single-margin': (sumVisible || inlineCreateVisible) && !(sumVisible && inlineCreateVisible), '-double-margin': sumVisible && inlineCreateVisible }">
- <wp-timeline-container></wp-timeline-container>
- </div>
-</div>
+@if (query) {
+ <div class="work-packages-split-view--tabletimeline-content">
+ <div class="work-packages-tabletimeline--table-side work-package-table--container __hidden_overflow_container">
+ <table
+ class="keyboard-accessible-list generic-table work-package-table"
+ data-controller="table-highlighting"
+ [class.op-table-baseline]="baselineEnabled"
+ >
+ <colgroup>
+ @if (configuration.dragAndDropEnabled) {
+ <col data-highlight="false">
+ }
+ @if (baselineEnabled) {
+ <col data-highlight="false">
+ }
+ <!-- Generate col elements dynamically(!) for each requested column plus one for the action menu's column. -->
+ @for (column of [].constructor(columns.length); track column) {
+ <col>
+ }
+ @if (configuration.columnMenuEnabled) {
+ <col>
+ }
+ @if (!configuration.columnMenuEnabled) {
+ <col data-highlight="false">
+ }
+ </colgroup>
+ <caption class="sr-only">
+ <span>{{text.tableSummary}}</span>
+ <span id="wp-table-sort-summary"></span>
+ <span>{{text.tableSummaryHints}}</span>
+ </caption>
+ <thead class="-sticky">
+ <tr>
+ @if (configuration.dragAndDropEnabled) {
+ <th class="wp-table--manual-sort-th -short hide-when-print">
+ <div class="generic-table--empty-header">
+ @if (manualSortEnabled) {
+ <op-icon icon-classes="icon-sort-by"></op-icon>
+ }
+ </div>
+ </th>
+ }
+ @if (baselineEnabled) {
+ <th class="wp-table--baseline-th -short hide-when-print">
+ <div class="generic-table--empty-header op-table-baseline--column-header">
+ <span class="spot-icon spot-icon_baseline"></span>
+ </div>
+ </th>
+ }
+ @for (column of columns; track trackByHref($index, column)) {
+ <th
+ [ngClass]="{'-max': column.id === 'subject', '-min-200': ['estimatedTime', 'remainingTime'].includes(column.id) }"
+ class="wp-table--table-header">
+ <sortHeader [headerColumn]="column"
+ [locale]="column.custom_field && column.custom_field.name_locale || locale"
+ [table]="workPackageTable"
+ opColumnsContextMenu
+ [opColumnsContextMenu-column]="column"
+ [opColumnsContextMenu-table]="workPackageTable">
+ </sortHeader>
+ </th>
+ }
+ @if (configuration.columnMenuEnabled || configuration.actionsColumnEnabled) {
+ <th class="wp-table--configuration-modal--trigger wp-table--context-menu-th -short hide-when-print"
+ >
+ @if (configuration.columnMenuEnabled) {
+ <div class="generic-table--sort-header-outer">
+ <wp-table-config-menu>
+ </wp-table-config-menu>
+ </div>
+ }
+ </th>
+ }
+ </tr>
+ </thead>
+ @if (!isEmbedded && query && results.count === 0) {
+ <tbody class="work-package--empty-tbody">
+ <tr id="empty-row-notification">
+ <td [attr.colspan]="numTableColumns">
+ <span>
+ <op-icon icon-classes="icon-info1 icon-context"></op-icon>
+ <span>
+ <strong>{{text.noResults.title}}</strong>
+ {{text.noResults.description}}
+ </span>
+ </span>
+ </td>
+ </tr>
+ </tbody>
+ }
+ <tbody class="results-tbody work-package--results-tbody">
+ </tbody>
+ <tbody>
+ <tr class="wp-table--sums-row wp-table--row"
+ wpTableSumsRow
+ [wpTableSumsRow-table]="workPackageTable">
+ </tr>
+ </tbody>
+ @if (tableElement && configuration.inlineCreateEnabled) {
+ <tbody
+ wpInlineCreate
+ [colspan]="numTableColumns"
+ [table]="workPackageTable"
+ [projectIdentifier]="projectIdentifier"
+ (showing)="inlineCreateVisible = $event"
+ >
+ </tbody>
+ }
+ </table>
+ </div>
+ @if (!configuration.isEmbedded) {
+ <div
+ class="work-packages--tabletimeline--timeline--resizer hidden-for-mobile hide-when-print">
+ <wp-resizer [elementClass]="'work-packages-tabletimeline--timeline-side'"
+ [resizeEvent]="'wp-resize.timeline'"
+ [variableName]="'--gantt-split-width'"
+ [localStorageKey]="'openProject-timelineFlexBasis'"></wp-resizer>
+ </div>
+ }
+ <div class="work-packages-tabletimeline--timeline-side"
+ [ngClass]="{ '-single-margin': (sumVisible || inlineCreateVisible) && !(sumVisible && inlineCreateVisible), '-double-margin': sumVisible && inlineCreateVisible }">
+ <wp-timeline-container></wp-timeline-container>
+ </div>
+ </div>
+ }
diff --git a/frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tab-wrapper/wp-tab-wrapper.html b/frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tab-wrapper/wp-tab-wrapper.html
index 272692fd71a..c6a5e9005d3 100644
--- a/frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tab-wrapper/wp-tab-wrapper.html
+++ b/frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tab-wrapper/wp-tab-wrapper.html
@@ -1,7 +1,8 @@
-<ng-container *ngIf="(ndcDynamicInputs$ | async) as ndcDynamicInputs">
- <ndc-dynamic
- *ngIf="ndcDynamicInputs.workPackage && ndcDynamicInputs.tab"
- [ndcDynamicComponent]="ndcDynamicInputs.tab.component"
- [ndcDynamicInputs]="{ workPackage: ndcDynamicInputs.workPackage }">
- </ndc-dynamic>
-</ng-container>
+@if ((ndcDynamicInputs$ | async); as ndcDynamicInputs) {
+ @if (ndcDynamicInputs.workPackage && ndcDynamicInputs.tab) {
+ <ndc-dynamic
+ [ndcDynamicComponent]="ndcDynamicInputs.tab.component"
+ [ndcDynamicInputs]="{ workPackage: ndcDynamicInputs.workPackage }">
+ </ndc-dynamic>
+ }
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.html b/frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.html
index 6a0f82d5b4c..3fa6db7fdc2 100644
--- a/frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-tabs/components/wp-tabs/wp-tabs.component.html
@@ -1,27 +1,29 @@
<op-scrollable-tabs
[tabs]="tabs"
class="op-work-package-tabs"
->
- <ng-container slot="actions" *ngIf="view === 'split'">
- <li class="tab-icon">
- <button
- type="button"
- class="spot-link work-packages--details-fullscreen-icon"
- [title]="text.details.goToFullScreen"
- (click)="switchToFullscreen()"
- >
- <op-icon icon-classes="icon-context icon-no-color icon-to-fullscreen"></op-icon>
- </button>
- </li>
- <li class="tab-icon">
- <button
- type="button"
- class="spot-link work-packages--details-close-icon"
- [title]="text.details.close"
- (click)="close()"
- >
- <op-icon icon-classes="icon-context icon-no-color icon-close"></op-icon>
- </button>
- </li>
- </ng-container>
+ >
+ @if (view === 'split') {
+ <ng-container slot="actions">
+ <li class="tab-icon">
+ <button
+ type="button"
+ class="spot-link work-packages--details-fullscreen-icon"
+ [title]="text.details.goToFullScreen"
+ (click)="switchToFullscreen()"
+ >
+ <op-icon icon-classes="icon-context icon-no-color icon-to-fullscreen"></op-icon>
+ </button>
+ </li>
+ <li class="tab-icon">
+ <button
+ type="button"
+ class="spot-link work-packages--details-close-icon"
+ [title]="text.details.close"
+ (click)="close()"
+ >
+ <op-icon icon-classes="icon-context icon-no-color icon-close"></op-icon>
+ </button>
+ </li>
+ </ng-container>
+ }
</op-scrollable-tabs>
diff --git a/frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.html b/frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.html
index 3fea0e5bb40..595d8d9484e 100644
--- a/frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-timer-button/wp-timer-button.component.html
@@ -1,26 +1,27 @@
-<ng-container *ngIf="{ timer: (timer$ | async), active: activeForWorkPackage(timer$ | async) } as context">
- <ng-container *ngIf="context.timer && context.active">
+@if ({ timer: (timer$ | async), active: activeForWorkPackage(timer$ | async) }; as context) {
+ @if (context.timer && context.active) {
<button
class="button button_flex op-wp-timer-button"
type="button"
data-test-selector="timer-active"
[title]="text.stop_timer"
(click)="stop()"
- >
+ >
<span class="spot-icon spot-icon_time-tracking-stop"></span>
<span class="button--text">
- {{ elapsed$ | async }}
- </span>
+ {{ elapsed$ | async }}
+ </span>
</button>
- </ng-container>
- <button
- class="button"
- type="button"
- data-test-selector="timer-inactive"
- *ngIf="!context.timer || !context.active"
- [title]="text.start_timer"
- (click)="start()"
- >
- <span class="spot-icon spot-icon_time-tracking-start"></span>
- </button>
-</ng-container>
+ }
+ @if (!context.timer || !context.active) {
+ <button
+ class="button"
+ type="button"
+ data-test-selector="timer-inactive"
+ [title]="text.start_timer"
+ (click)="start()"
+ >
+ <span class="spot-icon spot-icon_time-tracking-start"></span>
+ </button>
+ }
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-type-status/wp-type-status.html b/frontend/src/app/features/work-packages/components/wp-type-status/wp-type-status.html
index 7ed7b33ffe1..d43198655e5 100644
--- a/frontend/src/app/features/work-packages/components/wp-type-status/wp-type-status.html
+++ b/frontend/src/app/features/work-packages/components/wp-type-status/wp-type-status.html
@@ -1,16 +1,18 @@
-<div *ngIf="workPackage"
- class="wp-new-top-row">
- <div class="work-packages--status-selector wp-new-top-row--element">
- <op-editable-attribute-field [resource]="workPackage"
- [displayFieldOptions]="{ colorize: false }"
- [wrapperClasses]="'wp-new-top-row--status -no-label'"
- [fieldName]="'status'">
- </op-editable-attribute-field>
+@if (workPackage) {
+ <div
+ class="wp-new-top-row">
+ <div class="work-packages--status-selector wp-new-top-row--element">
+ <op-editable-attribute-field [resource]="workPackage"
+ [displayFieldOptions]="{ colorize: false }"
+ [wrapperClasses]="'wp-new-top-row--status -no-label'"
+ [fieldName]="'status'">
+ </op-editable-attribute-field>
+ </div>
+ <div class="work-packages--type-selector wp-new-top-row--element">
+ <op-editable-attribute-field [resource]="workPackage"
+ [wrapperClasses]="'wp-new-top-row--type -no-label'"
+ [fieldName]="'type'">
+ </op-editable-attribute-field>
+ </div>
</div>
- <div class="work-packages--type-selector wp-new-top-row--element">
- <op-editable-attribute-field [resource]="workPackage"
- [wrapperClasses]="'wp-new-top-row--type -no-label'"
- [fieldName]="'type'">
- </op-editable-attribute-field>
- </div>
-</div>
+}
diff --git a/frontend/src/app/features/work-packages/components/wp-watcher-button/wp-watcher-button.html b/frontend/src/app/features/work-packages/components/wp-watcher-button/wp-watcher-button.html
index 4118083ba03..74fdadad183 100644
--- a/frontend/src/app/features/work-packages/components/wp-watcher-button/wp-watcher-button.html
+++ b/frontend/src/app/features/work-packages/components/wp-watcher-button/wp-watcher-button.html
@@ -1,21 +1,24 @@
-<button *ngIf="displayWatchButton"
- (click)="toggleWatch()"
- [attr.title]="buttonTitle"
- [disabled]="disabled"
- [ngClass]="buttonClass"
- class="button toolbar-icon"
- [id]="buttonId">
-
- <svg
- *ngIf="watched"
- eye-icon
- class="button--icon"
- size="small"
- ></svg>
- <svg
- *ngIf="!watched"
- eye-closed-icon
- class="button--icon"
- size="small"
- ></svg>
-</button>
+@if (displayWatchButton) {
+ <button
+ (click)="toggleWatch()"
+ [attr.title]="buttonTitle"
+ [disabled]="disabled"
+ [ngClass]="buttonClass"
+ class="button toolbar-icon"
+ [id]="buttonId">
+ @if (watched) {
+ <svg
+ eye-icon
+ class="button--icon"
+ size="small"
+ ></svg>
+ }
+ @if (!watched) {
+ <svg
+ eye-closed-icon
+ class="button--icon"
+ size="small"
+ ></svg>
+ }
+ </button>
+}
diff --git a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html
index 755d75027e7..cb24b181d0e 100644
--- a/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html
+++ b/frontend/src/app/features/work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html
@@ -1,60 +1,67 @@
<div class="work-packages-partitioned-query-space--container"
- [ngClass]="currentPartition">
+ [ngClass]="currentPartition">
<op-breadcrumbs
[items]="breadcrumbItems()"
[lastItemSection]="currentMenuSectionHeader()"
></op-breadcrumbs>
<div class="toolbar-container -editable">
<div class="toolbar">
- <op-back-button *ngIf="backButtonCallback"
- class="op-back-button"
- linkClass="op-back-button_mobile-limited-width"
- [customBackMethod]="backButtonCallback">
- </op-back-button>
+ @if (backButtonCallback) {
+ <op-back-button
+ class="op-back-button"
+ linkClass="op-back-button_mobile-limited-width"
+ [customBackMethod]="backButtonCallback">
+ </op-back-button>
+ }
<h2 class="toolbar-title--container">
<editable-toolbar-title [title]="selectedTitle"
- [inFlight]="toolbarDisabled"
- [showSaveCondition]="showToolbarSaveButton"
- (onSave)="changeChangesFromTitle($event)"
- (onEmptySubmit)="updateTitleName('')"
- [editable]="titleEditingEnabled">
+ [inFlight]="toolbarDisabled"
+ [showSaveCondition]="showToolbarSaveButton"
+ (onSave)="changeChangesFromTitle($event)"
+ (onEmptySubmit)="updateTitleName('')"
+ [editable]="titleEditingEnabled">
</editable-toolbar-title>
</h2>
- <ul class="toolbar-items hide-when-print"
- *ngIf="showToolbar">
- <ng-container *ngFor="let definition of toolbarButtonComponents">
- <li class="toolbar-item"
- *ngIf="!definition.show || definition.show()"
- [ngClass]="definition.containerClasses">
- <ndc-dynamic [ndcDynamicComponent]="definition.component"
- [ndcDynamicInputs]="definition.inputs"
- [ndcDynamicInjector]="injector"
- [ndcDynamicOutputs]="definition.outputs">
- </ndc-dynamic>
- </li>
- </ng-container>
- </ul>
+ @if (showToolbar) {
+ <ul class="toolbar-items hide-when-print"
+ >
+ @for (definition of toolbarButtonComponents; track definition) {
+ @if (!definition.show || definition.show()) {
+ <li class="toolbar-item"
+ [ngClass]="definition.containerClasses">
+ <ndc-dynamic [ndcDynamicComponent]="definition.component"
+ [ndcDynamicInputs]="definition.inputs"
+ [ndcDynamicInjector]="injector"
+ [ndcDynamicOutputs]="definition.outputs">
+ </ndc-dynamic>
+ </li>
+ }
+ }
+ </ul>
+ }
</div>
</div>
<div class="work-packages-partitioned-query-space--filter-area">
- <ndc-dynamic *ngIf="filterContainerDefinition"
- [ndcDynamicComponent]="filterContainerDefinition.component"
- [ndcDynamicInputs]="filterContainerDefinition.inputs"
- [ndcDynamicOutputs]="filterContainerDefinition.outputs"
- [ndcDynamicInjector]="injector">
- </ndc-dynamic>
+ @if (filterContainerDefinition) {
+ <ndc-dynamic
+ [ndcDynamicComponent]="filterContainerDefinition.component"
+ [ndcDynamicInputs]="filterContainerDefinition.inputs"
+ [ndcDynamicOutputs]="filterContainerDefinition.outputs"
+ [ndcDynamicInjector]="injector">
+ </ndc-dynamic>
+ }
</div>
<div class="work-packages-partitioned-page--content-container">
<!-- Left content view -->
<div class="work-packages-partitioned-page--content-left loading-indicator--location"
- data-indicator-name="table"
- ui-view="content-left">
+ data-indicator-name="table"
+ ui-view="content-left">
</div>
<!-- Right content view -->
<div class="work-packages-partitioned-page--content-right"
- ui-view="content-right"></div>
+ ui-view="content-right"></div>
</div>
</div>
diff --git a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html
index 44b99bf685e..90c387a114f 100644
--- a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html
+++ b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html
@@ -1,92 +1,99 @@
-<div edit-form
- [resource]="workPackage"
- *ngIf="workPackage"
- class="work-packages--show-view">
- <div class="toolbar-container">
- <div id="toolbar" class="wp-show--header-container">
- <wp-breadcrumb
- class="wp-show--header-container--breadcrumb"
- [workPackage]="workPackage"
- ></wp-breadcrumb>
-
- <op-back-button
- class="wp-show--header-container--back-button"
- linkClass="work-packages-back-button"
- >
- </op-back-button>
-
- <div class="subject-header wp-show--header-container--subject">
- <wp-subject></wp-subject>
- </div>
-
- <ul id="toolbar-items" class="toolbar-items hide-when-print wp-show--header-container--toolbar-items">
- <li class="toolbar-item hidden-for-tablet">
- <wp-create-button
- [allowed]="['work_package.addChild', 'work_package.copy']"
- [stateName$]="stateName$">
- </wp-create-button>
- </li>
- <li class="toolbar-item"
- *ngIf="displayShareButton$ | async">
- <wp-share-button [workPackage]="workPackage">
- </wp-share-button>
- </li>
- <li class="toolbar-item hidden-for-tablet" *ngIf="displayTimerButton">
- <op-wp-timer-button
- [workPackage]="workPackage"
+@if (workPackage) {
+ <div edit-form
+ [resource]="workPackage"
+ class="work-packages--show-view">
+ <div class="toolbar-container">
+ <div id="toolbar" class="wp-show--header-container">
+ <wp-breadcrumb
+ class="wp-show--header-container--breadcrumb"
+ [workPackage]="workPackage"
+ ></wp-breadcrumb>
+ <op-back-button
+ class="wp-show--header-container--back-button"
+ linkClass="work-packages-back-button"
>
- </op-wp-timer-button>
- </li>
- <li class="toolbar-item" *ngIf="displayWatchButton">
- <wp-watcher-button [workPackage]="workPackage">
- </wp-watcher-button>
- </li>
- <li class="toolbar-item" *ngIf="displayReminderButton$ | async">
- <wp-reminder-button [workPackage]="workPackage">
- </wp-reminder-button>
- </li>
- <li class="toolbar-item" *ngIf="(displayNotificationsButton$ | async)">
- <op-work-package-mark-notification-button
- [workPackage]="workPackage"
- data-test-selector="mark-notification-read-button"
- ></op-work-package-mark-notification-button>
- </li>
- <li class="toolbar-item hidden-for-tablet">
- <opce-zen-mode-toggle-button>
- </opce-zen-mode-toggle-button>
- </li>
- <li class="toolbar-item action_menu_main" id="action-show-more-dropdown-menu">
- <button class="button dropdown-relative toolbar-icon"
- [attr.title]="text.fullView.buttonMore"
- wpSingleContextMenu
- [wpSingleContextMenu-workPackage]="workPackage">
- <op-icon icon-classes="button--icon icon-show-more"></op-icon>
- </button>
- </li>
- </ul>
- </div>
- </div>
- <div class="work-packages-full-view--split-container">
- <div class="work-packages-full-view--split-left">
- <div class="work-packages--panel-inner">
- <wp-single-view [workPackage]="workPackage"></wp-single-view>
+ </op-back-button>
+ <div class="subject-header wp-show--header-container--subject">
+ <wp-subject></wp-subject>
+ </div>
+ <ul id="toolbar-items" class="toolbar-items hide-when-print wp-show--header-container--toolbar-items">
+ <li class="toolbar-item hidden-for-tablet">
+ <wp-create-button
+ [allowed]="['work_package.addChild', 'work_package.copy']"
+ [stateName$]="stateName$">
+ </wp-create-button>
+ </li>
+ @if (displayShareButton$ | async) {
+ <li class="toolbar-item"
+ >
+ <wp-share-button [workPackage]="workPackage">
+ </wp-share-button>
+ </li>
+ }
+ @if (displayTimerButton) {
+ <li class="toolbar-item hidden-for-tablet">
+ <op-wp-timer-button
+ [workPackage]="workPackage"
+ >
+ </op-wp-timer-button>
+ </li>
+ }
+ @if (displayWatchButton) {
+ <li class="toolbar-item">
+ <wp-watcher-button [workPackage]="workPackage">
+ </wp-watcher-button>
+ </li>
+ }
+ @if (displayReminderButton$ | async) {
+ <li class="toolbar-item">
+ <wp-reminder-button [workPackage]="workPackage">
+ </wp-reminder-button>
+ </li>
+ }
+ @if ((displayNotificationsButton$ | async)) {
+ <li class="toolbar-item">
+ <op-work-package-mark-notification-button
+ [workPackage]="workPackage"
+ data-test-selector="mark-notification-read-button"
+ ></op-work-package-mark-notification-button>
+ </li>
+ }
+ <li class="toolbar-item hidden-for-tablet">
+ <opce-zen-mode-toggle-button>
+ </opce-zen-mode-toggle-button>
+ </li>
+ <li class="toolbar-item action_menu_main" id="action-show-more-dropdown-menu">
+ <button class="button dropdown-relative toolbar-icon"
+ [attr.title]="text.fullView.buttonMore"
+ wpSingleContextMenu
+ [wpSingleContextMenu-workPackage]="workPackage">
+ <op-icon icon-classes="button--icon icon-show-more"></op-icon>
+ </button>
+ </li>
+ </ul>
</div>
</div>
- <div class="work-packages-full-view--split-right work-packages-tab-view--overflow">
- <div class="work-packages--panel-inner">
- <span class="sr-only" tabindex="-1" [textContent]="focusAnchorLabel"></span>
- <op-wp-tabs [workPackage]="workPackage" [view]="'full'"></op-wp-tabs>
- <div class="tabcontent"
- data-notification-selector='notification-scroll-container'
- ui-view>
+ <div class="work-packages-full-view--split-container">
+ <div class="work-packages-full-view--split-left">
+ <div class="work-packages--panel-inner">
+ <wp-single-view [workPackage]="workPackage"></wp-single-view>
</div>
</div>
-
- <div class="work-packages-full-view--resizer hidden-for-mobile hide-when-print">
- <wp-resizer [elementClass]="'work-packages-full-view--split-right'"
- [variableName]="'--full-view-split-right-width'"
- [localStorageKey]="'openProject-fullViewFlexBasis'"></wp-resizer>
+ <div class="work-packages-full-view--split-right work-packages-tab-view--overflow">
+ <div class="work-packages--panel-inner">
+ <span class="sr-only" tabindex="-1" [textContent]="focusAnchorLabel"></span>
+ <op-wp-tabs [workPackage]="workPackage" [view]="'full'"></op-wp-tabs>
+ <div class="tabcontent"
+ data-notification-selector='notification-scroll-container'
+ ui-view>
+ </div>
+ </div>
+ <div class="work-packages-full-view--resizer hidden-for-mobile hide-when-print">
+ <wp-resizer [elementClass]="'work-packages-full-view--split-right'"
+ [variableName]="'--full-view-split-right-width'"
+ [localStorageKey]="'openProject-fullViewFlexBasis'"></wp-resizer>
+ </div>
</div>
</div>
</div>
-</div>
+}
diff --git a/frontend/src/app/features/work-packages/routing/wp-list-view/wp-list-view.component.html b/frontend/src/app/features/work-packages/routing/wp-list-view/wp-list-view.component.html
index 12bb25353f7..dd4682ec74a 100644
--- a/frontend/src/app/features/work-packages/routing/wp-list-view/wp-list-view.component.html
+++ b/frontend/src/app/features/work-packages/routing/wp-list-view/wp-list-view.component.html
@@ -1,32 +1,41 @@
-<div class="op-wp-list-view--result-overlay"
- *ngIf="(showResultOverlay$ | async) && showTableView"></div>
-<op-baseline-legends
- *ngIf="baselineEnabled"
-></op-baseline-legends>
+@if ((showResultOverlay$ | async) && showTableView) {
+ <div class="op-wp-list-view--result-overlay"
+ ></div>
+}
+@if (baselineEnabled) {
+ <op-baseline-legends
+ ></op-baseline-legends>
+}
<!-- TABLE + TIMELINE horizontal split -->
-<wp-table *ngIf="tableInformationLoaded && showTableView"
- [projectIdentifier]="CurrentProject.identifier"
- [configuration]="wpTableConfiguration"
- (itemClicked)="handleWorkPackageClicked($event)"
- (stateLinkClicked)="openStateLink($event)"
- class="work-packages-split-view--tabletimeline-content">
-</wp-table>
+@if (tableInformationLoaded && showTableView) {
+ <wp-table
+ [projectIdentifier]="CurrentProject.identifier"
+ [configuration]="wpTableConfiguration"
+ (itemClicked)="handleWorkPackageClicked($event)"
+ (stateLinkClicked)="openStateLink($event)"
+ class="work-packages-split-view--tabletimeline-content">
+ </wp-table>
+}
<!-- GRID representation of the WP -->
-<div *ngIf="!showTableView"
- class="op-wp-list-view--card-view-container"
- [ngClass]="{ '-with-resizer': showResizerInCardView() }" >
-<wp-grid [configuration]="wpTableConfiguration"
- [showResizer]="showResizerInCardView()"
- (itemClicked)="handleWorkPackageCardClicked($event)"
- (stateLinkClicked)="openStateLink($event)"
- resizerClass="work-packages-partitioned-page--content-right"
- resizerStorageKey="openProject-splitViewFlexBasis">
-</wp-grid>
-</div>
+@if (!showTableView) {
+ <div
+ class="op-wp-list-view--card-view-container"
+ [ngClass]="{ '-with-resizer': showResizerInCardView() }" >
+ <wp-grid [configuration]="wpTableConfiguration"
+ [showResizer]="showResizerInCardView()"
+ (itemClicked)="handleWorkPackageCardClicked($event)"
+ (stateLinkClicked)="openStateLink($event)"
+ resizerClass="work-packages-partitioned-page--content-right"
+ resizerStorageKey="openProject-splitViewFlexBasis">
+ </wp-grid>
+ </div>
+}
<!-- Footer -->
-<div class="work-packages-split-view--tabletimeline-footer hide-when-print"
- *ngIf="tableInformationLoaded">
- <wp-table-pagination></wp-table-pagination>
-</div>
\ No newline at end of file
+@if (tableInformationLoaded) {
+ <div class="work-packages-split-view--tabletimeline-footer hide-when-print"
+ >
+ <wp-table-pagination></wp-table-pagination>
+ </div>
+}
\ No newline at end of file
diff --git a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html
index 8aed966961b..9ad17da4541 100644
--- a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html
+++ b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html
@@ -1,73 +1,74 @@
-<div
- class="work-packages--details loading-indicator--location"
- data-indicator-name="wpDetails"
- *ngIf="workPackage"
->
- <op-wp-tabs
- *ngIf="showTabs"
- [workPackage]="workPackage"
- [view]="'split'"
- ></op-wp-tabs>
- <div class="work-packages--details-content work-packages-tab-view--overflow"
- [class.work-packages--details-content_no-tabs]="!showTabs"
- *ngIf="workPackage">
- <span
- class="sr-only"
- tabindex="-1"
- [textContent]="focusAnchorLabel"
- ></span>
-
- <edit-form
- [resource]="workPackage"
- class="work-packages--details-form"
+@if (workPackage) {
+ <div
+ class="work-packages--details loading-indicator--location"
+ data-indicator-name="wpDetails"
>
- <div class="work-packages--details-header">
- <div class="work-packages--details-header-left">
- <wp-breadcrumb
- [workPackage]="workPackage"
- class="work-packages--breadcrumb"
- ></wp-breadcrumb>
-
-
- <op-back-button
- *ngIf="showBackButton()"
- linkClass="work-packages-back-button"
- [customBackMethod]="backToList.bind(this)"
- ></op-back-button>
-
- <wp-subject [workPackage]="workPackage" class="subject-header"></wp-subject>
- </div>
+ @if (showTabs) {
+ <op-wp-tabs
+ [workPackage]="workPackage"
+ [view]="'split'"
+ ></op-wp-tabs>
+ }
+ @if (workPackage) {
+ <div class="work-packages--details-content work-packages-tab-view--overflow"
+ [class.work-packages--details-content_no-tabs]="!showTabs"
+ >
+ <span
+ class="sr-only"
+ tabindex="-1"
+ [textContent]="focusAnchorLabel"
+ ></span>
+ <edit-form
+ [resource]="workPackage"
+ class="work-packages--details-form"
+ >
+ <div class="work-packages--details-header">
+ <div class="work-packages--details-header-left">
+ <wp-breadcrumb
+ [workPackage]="workPackage"
+ class="work-packages--breadcrumb"
+ ></wp-breadcrumb>
+ @if (showBackButton()) {
+ <op-back-button
+ linkClass="work-packages-back-button"
+ [customBackMethod]="backToList.bind(this)"
+ ></op-back-button>
+ }
+ <wp-subject [workPackage]="workPackage" class="subject-header"></wp-subject>
+ </div>
+ </div>
+ @if (showTabs) {
+ <div
+ class="work-package-details-tab"
+ data-notification-selector='notification-scroll-container'
+ ui-view
+ >
+ </div>
+ }
+ @if (!showTabs && activeTab) {
+ <div
+ class="work-package-details-tab"
+ data-notification-selector='notification-scroll-container'
+ >
+ <ndc-dynamic [ndcDynamicComponent]="activeTabComponent"
+ [ndcDynamicInputs]="{ workPackage: workPackage }">
+ </ndc-dynamic>
+ </div>
+ }
+ </edit-form>
</div>
-
- <div
- *ngIf="showTabs"
- class="work-package-details-tab"
- data-notification-selector='notification-scroll-container'
- ui-view
- >
+ }
+ @if (workPackage) {
+ <div class="work-packages--details-toolbar-container">
+ <wp-details-toolbar
+ [workPackage]="workPackage"
+ [displayNotificationsButton]="(displayNotificationsButton$ | async)"
+ ></wp-details-toolbar>
</div>
- <div
- *ngIf="!showTabs && activeTab"
- class="work-package-details-tab"
- data-notification-selector='notification-scroll-container'
- >
- <ndc-dynamic [ndcDynamicComponent]="activeTabComponent"
- [ndcDynamicInputs]="{ workPackage: workPackage }">
- </ndc-dynamic>
- </div>
-
- </edit-form>
- </div>
-
- <div class="work-packages--details-toolbar-container" *ngIf="workPackage">
- <wp-details-toolbar
- [workPackage]="workPackage"
- [displayNotificationsButton]="(displayNotificationsButton$ | async)"
- ></wp-details-toolbar>
- </div>
-
- <div class="work-packages--details--resizer hidden-for-mobile hide-when-print">
- <wp-resizer [elementClass]="resizerClass"
- [localStorageKey]="'openProject-splitViewFlexBasis'"></wp-resizer>
+ }
+ <div class="work-packages--details--resizer hidden-for-mobile hide-when-print">
+ <wp-resizer [elementClass]="resizerClass"
+ [localStorageKey]="'openProject-splitViewFlexBasis'"></wp-resizer>
+ </div>
</div>
-</div>
+}
diff --git a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list.component.html b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list.component.html
index b10e39ae3c4..3487985c519 100644
--- a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list.component.html
+++ b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list.component.html
@@ -1,16 +1,18 @@
-<ul
- *ngIf="attachments.length > 0"
- class="spot-list spot-list_compact op-file-list"
->
- <li
- *ngFor="let attachment of attachments; let i = index;"
- op-attachment-list-item
- class="spot-list--item op-file-list--item"
- data-test-selector="op-attachment-list-item"
- [attachment]="attachment"
- [showTimestamp]="showTimestamp"
- [showDelete]="showDelete"
- [index]="i"
- (removeAttachment)="removeAttachment(attachment)"
- ></li>
-</ul>
+@if (attachments.length > 0) {
+ <ul
+ class="spot-list spot-list_compact op-file-list"
+ >
+ @for (attachment of attachments; track attachment; let i = $index) {
+ <li
+ op-attachment-list-item
+ class="spot-list--item op-file-list--item"
+ data-test-selector="op-attachment-list-item"
+ [attachment]="attachment"
+ [showTimestamp]="showTimestamp"
+ [showDelete]="showDelete"
+ [index]="i"
+ (removeAttachment)="removeAttachment(attachment)"
+ ></li>
+ }
+ </ul>
+}
diff --git a/frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.component.html b/frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.component.html
index 3223efa49fb..a41c71ab753 100644
--- a/frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.component.html
+++ b/frontend/src/app/shared/components/attribute-help-texts/attribute-help-text.component.html
@@ -1,4 +1,4 @@
-<ng-container *ngIf="exists">
+@if (exists) {
<div
class="spot-link help-text--entry"
[attr.id]="buttonId"
@@ -10,8 +10,10 @@
(keydown.space)="handleClick($event)"
role="button"
tabindex="0"
- >
- <span *ngIf="additionalLabel" [textContent]="additionalLabel"></span>
+ >
+ @if (additionalLabel) {
+ <span [textContent]="additionalLabel"></span>
+ }
<svg question-icon size="xsmall"></svg>
</div>
<tool-tip
@@ -22,5 +24,5 @@
data-direction="sw"
data-type="label"
[textContent]="text.open_dialog"
- />
-</ng-container>
+ />
+}
diff --git a/frontend/src/app/shared/components/autocompleter/draggable-autocomplete/draggable-autocomplete.component.html b/frontend/src/app/shared/components/autocompleter/draggable-autocomplete/draggable-autocomplete.component.html
index 26de29259a3..57d9919e91e 100644
--- a/frontend/src/app/shared/components/autocompleter/draggable-autocomplete/draggable-autocomplete.component.html
+++ b/frontend/src/app/shared/components/autocompleter/draggable-autocomplete/draggable-autocomplete.component.html
@@ -2,8 +2,8 @@
<div class="FormControl-spacingWrapper mb-3">
<div class="FormControl width-full op-draggable-autocomplete-container" [id]="formControlId">
<label class="FormControl-label"
- [textContent]="inputLabel"
- [attr.for]="id">
+ [textContent]="inputLabel"
+ [attr.for]="id">
</label>
<ng-select
@@ -21,49 +21,60 @@
(open)="opened()"
(change)="select($event)"
></ng-select>
- <span
- *ngIf="inputCaption"
- class="FormControl-caption" [textContent]="inputCaption"></span>
+ @if (inputCaption) {
+ <span class="FormControl-caption" [textContent]="inputCaption"></span>
+ }
</div>
</div>
<div class="FormControl-spacingWrapper">
<div class="FormControl width-full">
<label class="FormControl-label"
- [textContent]="dragAreaLabel">
+ [textContent]="dragAreaLabel">
</label>
<div
class="op-draggable-autocomplete--selected"
dragula="columns"
[(dragulaModel)]="selectedOptions"
- >
- <div class="op-draggable-autocomplete--item" *ngFor="let item of selectedOptions">
- <span
- class="op-draggable-autocomplete--item-text"
- [textContent]="item.name"
- ></span>
- <a
- *ngIf="isRemovable(item)"
- (click)="remove(item)"
- class="op-draggable-autocomplete--remove-item icon-remove"
- ></a>
- </div>
+ >
+ @for (item of selectedOptions; track item) {
+ <div class="op-draggable-autocomplete--item">
+ <span
+ class="op-draggable-autocomplete--item-text"
+ [textContent]="item.name"
+ ></span>
+ @if (isRemovable(item)) {
+ <a
+ (click)="remove(item)"
+ class="op-draggable-autocomplete--remove-item icon-remove"
+ ></a>
+ }
+ </div>
+ }
- <span *ngIf="!isArrayOfValues">
- <input type="hidden" [name]="name" [value]="hiddenValue" />
- </span>
- <span *ngIf="isArrayOfValues">
- <input *ngFor="let value of hiddenValues" type="hidden" [name]="name" [value]="value" />
- </span>
- </div>
- <div *ngIf="hasError" class="FormControl-inlineValidation" id="validation-1b0e1d91-109a-429f-bf04-0231cc9234ec">
- <span class=" FormControl-inlineValidation--visual" data-target="primer-text-field.validationErrorIcon">
- <svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" class="octicon octicon-alert-fill">
- <path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path></svg>
+ @if (!isArrayOfValues) {
+ <span>
+ <input type="hidden" [name]="name" [value]="hiddenValue" />
+ </span>
+ }
+ @if (isArrayOfValues) {
+ <span>
+ @for (value of hiddenValues; track value) {
+ <input type="hidden" [name]="name" [value]="value" />
+ }
</span>
- <span [textContent]="errorMessage"></span>
+ }
+ </div>
+ @if (hasError) {
+ <div class="FormControl-inlineValidation" id="validation-1b0e1d91-109a-429f-bf04-0231cc9234ec">
+ <span class=" FormControl-inlineValidation--visual" data-target="primer-text-field.validationErrorIcon">
+ <svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" class="octicon octicon-alert-fill">
+ <path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path></svg>
+ </span>
+ <span [textContent]="errorMessage"></span>
+ </div>
+ }
</div>
</div>
</div>
-</div>
diff --git a/frontend/src/app/shared/components/autocompleter/meeting-autocompleter/meeting-autocompleter-template.component.html b/frontend/src/app/shared/components/autocompleter/meeting-autocompleter/meeting-autocompleter-template.component.html
index 7c84b699d80..f855a1b7cce 100644
--- a/frontend/src/app/shared/components/autocompleter/meeting-autocompleter/meeting-autocompleter-template.component.html
+++ b/frontend/src/app/shared/components/autocompleter/meeting-autocompleter/meeting-autocompleter-template.component.html
@@ -1,23 +1,25 @@
<ng-template #labelTemplate let-item>
- {{ item.name }} - {{ item.start_date }} {{ item.start_time }} - {{ item.project }}
+ {{ item.name }} - {{ item.start_date }} {{ item.start_time }} - {{ item.project }}
</ng-template>
<ng-template #optionTemplate let-item let-search="search">
- <div class="op-meeting-autocompleter">
- <div class="op-meeting-autocompleter--name" [opSearchHighlight]="search">
- {{ item.name }}
- </div>
- <div class="op-meeting-autocompleter--date">
- {{ item.start_date }}
- </div>
- <div class="op-meeting-autocompleter--project-label">Project:</div>
+ <div class="op-meeting-autocompleter">
+ <div class="op-meeting-autocompleter--name" [opSearchHighlight]="search">
+ {{ item.name }}
+ </div>
+ <div class="op-meeting-autocompleter--date">
+ {{ item.start_date }}
+ </div>
+ <div class="op-meeting-autocompleter--project-label">Project:</div>
- <div class="op-meeting-autocompleter--frequency" *ngIf="item.frequency">
- {{ item.frequency }}
- </div>
- <div class="op-meeting-autocompleter--time">
- {{ item.start_time }}
- </div>
- <div class="op-meeting-autocompleter--project">{{ item.project }}</div>
+ @if (item.frequency) {
+ <div class="op-meeting-autocompleter--frequency">
+ {{ item.frequency }}
+ </div>
+ }
+ <div class="op-meeting-autocompleter--time">
+ {{ item.start_time }}
</div>
+ <div class="op-meeting-autocompleter--project">{{ item.project }}</div>
+ </div>
</ng-template>
diff --git a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.html b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.html
index 36fdeabe83a..8c6773bf924 100644
--- a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.html
+++ b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.html
@@ -1,19 +1,21 @@
<div class="inline-label">
- <input
- #syncedInput
- *ngIf="inputName && !(multiple && multipleAsSeparateInputs)"
- type="hidden"
- [attr.name]="inputName"
- [value]="mappedInputValue"
- [attr.data-action]="hiddenFieldAction">
- <ng-container *ngIf="multiple && multipleAsSeparateInputs">
+ @if (inputName && !(multiple && multipleAsSeparateInputs)) {
<input
- *ngFor="let value of mappedInputValue"
+ #syncedInput
type="hidden"
- [attr.name]="inputName+'[]'"
- [attr.data-action]="hiddenFieldAction"
- [value]="value">
- </ng-container>
+ [attr.name]="inputName"
+ [value]="mappedInputValue"
+ [attr.data-action]="hiddenFieldAction">
+ }
+ @if (multiple && multipleAsSeparateInputs) {
+ @for (value of mappedInputValue; track value) {
+ <input
+ type="hidden"
+ [attr.name]="inputName+'[]'"
+ [attr.data-action]="hiddenFieldAction"
+ [value]="value">
+ }
+ }
<ng-select
#ngSelectInstance
[(ngModel)]="model"
@@ -80,14 +82,14 @@
(scrollToEnd)="scrolledToEnd($event)"
(add)="added($event)"
(remove)="removed($event)"
- >
+ >
<ng-template
ng-header-tmp
let-item="item"
let-index="index"
let-search="searchTerm"
*ngIf="headerTemplate || projectedHeaderTemplate"
- >
+ >
<ng-container
[ngTemplateOutlet]="headerTemplate || projectedHeaderTemplate"
[ngTemplateOutletContext]="{$implicit:item, search:search, index:index }"
@@ -101,7 +103,7 @@
let-search="searchTerm"
let-clear="clear"
*ngIf="labelRequired"
- >
+ >
<ng-container
[ngTemplateOutlet]="projectedLabelTemplate || labelTemplate || defaultLabel"
[ngTemplateOutletContext]="{$implicit:item, search:search, index:index, clear:clear }"
@@ -113,7 +115,7 @@
let-item="item"
let-index="index"
let-search="searchTerm"
- >
+ >
<ng-container
[ngTemplateOutlet]="projectedOptionTemplate || optionTemplate || defaultOption"
[ngTemplateOutletContext]="{$implicit:item, search:search, index:index }"
@@ -126,7 +128,7 @@
let-index="index"
let-search="searchTerm"
*ngIf="footerTemplate || projectedFooterTemplate"
- >
+ >
<ng-container
[ngTemplateOutlet]="footerTemplate || projectedFooterTemplate"
[ngTemplateOutletContext]="{$implicit:item, search:search, index:index }"
@@ -135,109 +137,110 @@
</ng-select>
</div>
-<ng-template let-item let-search="search" #defaultOption [ngSwitch]="true">
- <ng-container *ngSwitchCase="!resource && !!item.depth">
+<ng-template let-item let-search="search" #defaultOption>
+ @switch (true) {
+ @case (!resource && !!item.depth) {
<span [ngOptionHighlight]="search"
- [textContent]="item.name"
- [ngStyle]="{'padding-left.px': item.depth * 16}"
- class="ng-option-label ellipsis">
+ [textContent]="item.name"
+ [ngStyle]="{'padding-left.px': item.depth * 16}"
+ class="ng-option-label ellipsis">
</span>
- </ng-container>
-
- <ng-container *ngSwitchCase="resource === 'work_packages' || resource === 'parent-child'">
- <div class="op-autocompleter--option-wrapper" title="{{ item.subject }}">
- <op-principal
- class="op-autocompleter--option-principal"
- *ngIf="item.author && item.author.href"
- [principal]="item.author"
- [hideName]="true"
- ></op-principal>
- <span
- class="op-autocompleter--wp-subject"
- data-test-selector="op-autocompleter-item-subject"
- >
- <span
- *ngIf="item.type"
- [ngClass]="highlighting('type', item.type.id)"
- textContent="{{ item.type.name }} "
- ></span>
+ }
+ @case (resource === 'work_packages' || resource === 'parent-child') {
+ <div class="op-autocompleter--option-wrapper" title="{{ item.subject }}">
+ @if (item.author && item.author.href) {
+ <op-principal
+ class="op-autocompleter--option-principal"
+ [principal]="item.author"
+ [hideName]="true"
+ ></op-principal>
+ }
<span
- [ngOptionHighlight]="search"
- [textContent]="item.subject">
+ class="op-autocompleter--wp-subject"
+ data-test-selector="op-autocompleter-item-subject"
+ >
+ @if (item.type) {
+ <span
+ [ngClass]="highlighting('type', item.type.id)"
+ textContent="{{ item.type.name }} "
+ ></span>
+ }
+ <span
+ [ngOptionHighlight]="search"
+ [textContent]="item.subject">
+ </span>
</span>
- </span>
-
- <div class="op-autocompleter--wp-content">
- <span
- [ngOptionHighlight]="search"
- [textContent]="item.project?.name"
- class="op-autocompleter--wp-project"
- ></span>
-
- <span
- class="op-autocompleter--wp-id"
- [ngOptionHighlight]="search"
- >#{{ item.id }}</span>
-
- <span
- [textContent]="item.status?.name"
- [ngClass]="highlighting('status',item.status?.id)"
- class="op-autocompleter--wp-status"
- ></span>
+ <div class="op-autocompleter--wp-content">
+ <span
+ [ngOptionHighlight]="search"
+ [textContent]="item.project?.name"
+ class="op-autocompleter--wp-project"
+ ></span>
+ <span
+ class="op-autocompleter--wp-id"
+ [ngOptionHighlight]="search"
+ >#{{ item.id }}</span>
+ <span
+ [textContent]="item.status?.name"
+ [ngClass]="highlighting('status',item.status?.id)"
+ class="op-autocompleter--wp-status"
+ ></span>
+ </div>
</div>
- </div>
- </ng-container>
-
- <ng-container *ngSwitchCase="resource ==='users' || resource ==='assignee' || resource === 'principals'">
- <op-principal
- *ngIf="item && item.href"
- [principal]="item"
- [hideName]="true"
- class="op-autocompleter--option-principal-avatar"
- size="mini"
- ></op-principal>
- <span
- [attr.data-hover-card-trigger-target]="getHoverCardTriggerTarget(item)"
- [attr.data-hover-card-url]="getHoverCardUrl(item)"
+ }
+ @case (resource ==='users' || resource ==='assignee' || resource === 'principals') {
+ @if (item && item.href) {
+ <op-principal
+ [principal]="item"
+ [hideName]="true"
+ class="op-autocompleter--option-principal-avatar"
+ size="mini"
+ ></op-principal>
+ }
+ <span
+ [attr.data-hover-card-trigger-target]="getHoverCardTriggerTarget(item)"
+ [attr.data-hover-card-url]="getHoverCardUrl(item)"
[ngOptionHighlight]="search">{{ item.name }}</span>
- <span
- class="op-autocompleter__option-principal-email"
- *ngIf="item.email"
- [ngOptionHighlight]="search">{{ item.email }}</span>
- </ng-container>
-
- <ng-container
- *ngSwitchCase="resource ==='subproject' || resource ==='version' || resource ==='status' || resource ==='default' || (!resource && !item.depth)">
- <span
- [ngClass]=" additionalClassProperty ? item[additionalClassProperty] : ''"
- [attr.data-hover-card-trigger-target]="getHoverCardTriggerTarget(item)"
- [attr.data-hover-card-url]="getHoverCardUrl(item)"
- [ngOptionHighlight]="search">{{ item.name }}
- </span>
- <span
- class="op-autocompleter__option-principal-email"
- *ngIf="item.email"
- [ngOptionHighlight]="search">{{ item.email }}</span>
- </ng-container>
+ @if (item.email) {
+ <span
+ class="op-autocompleter__option-principal-email"
+ [ngOptionHighlight]="search">{{ item.email }}</span>
+ }
+ }
+ @case (resource ==='subproject' || resource ==='version' || resource ==='status' || resource ==='default' || (!resource && !item.depth)) {
+ <span
+ [ngClass]=" additionalClassProperty ? item[additionalClassProperty] : ''"
+ [attr.data-hover-card-trigger-target]="getHoverCardTriggerTarget(item)"
+ [attr.data-hover-card-url]="getHoverCardUrl(item)"
+ [ngOptionHighlight]="search">{{ item.name }}
+ </span>
+ @if (item.email) {
+ <span
+ class="op-autocompleter__option-principal-email"
+ [ngOptionHighlight]="search">{{ item.email }}</span>
+ }
+ }
+ }
</ng-template>
<ng-template let-item let-search="search" let-clear="clear" #defaultLabel>
- <ng-container *ngIf="resource === 'work_packages'">
+ @if (resource === 'work_packages') {
<span class="ng-value-icon left" (click)="clear(item)">×</span>
- <span
- *ngIf="item.id"
- class="ng-value-label"
- [ngOptionHighlight]="search"
- >
- {{ item.type?.name }} #{{ item.id }} {{ item.subject || item.name }}
- </span>
- </ng-container>
+ @if (item.id) {
+ <span
+ class="ng-value-label"
+ [ngOptionHighlight]="search"
+ >
+ {{ item.type?.name }} #{{ item.id }} {{ item.subject || item.name }}
+ </span>
+ }
+ }
- <ng-container *ngIf="resource !== 'work_packages'">
+ @if (resource !== 'work_packages') {
<span class="ng-value-icon left" (click)="clear(item)">×</span>
<span
[ngOptionHighlight]="search"
[ngClass]=" additionalClassProperty ? item[additionalClassProperty] : ''"
- class="ng-value-label">{{ item.name }}</span>
- </ng-container>
+ class="ng-value-label">{{ item.name }}</span>
+ }
</ng-template>
diff --git a/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter-template.component.html b/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter-template.component.html
index 802783df760..8d304b5d8ac 100644
--- a/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter-template.component.html
+++ b/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter-template.component.html
@@ -2,7 +2,7 @@
#labelTemplate
let-item
let-clear="clear"
->
+ >
<span class="ng-value-icon left" (click)="clear(item)">×</span>
<span class="ng-value-label">{{ item.name }}</span>
</ng-template>
@@ -11,17 +11,18 @@
#optionTemplate
let-item
let-search="search"
->
+ >
<div
[title]="item.name"
class="ng-option-label ellipsis"
[ngStyle]="{ 'padding-left.px': item.numberOfAncestors * 16 }"
[opSearchHighlight]="search"
>{{ item.name }}</div>
- <div
- [title]="item.disabledReason"
- *ngIf="item.disabled && item.disabledReason"
- class="ng-option-label ellipsis"
- [ngStyle]="{ 'padding-left.px': item.numberOfAncestors * 16 }"
- >{{ item.disabledReason }}</div>
+ @if (item.disabled && item.disabledReason) {
+ <div
+ [title]="item.disabledReason"
+ class="ng-option-label ellipsis"
+ [ngStyle]="{ 'padding-left.px': item.numberOfAncestors * 16 }"
+ >{{ item.disabledReason }}</div>
+ }
</ng-template>
diff --git a/frontend/src/app/shared/components/autocompleter/project-phase-autocompleter/project-phase-autocompleter.component.html b/frontend/src/app/shared/components/autocompleter/project-phase-autocompleter/project-phase-autocompleter.component.html
index 7712fd3682b..e8de35e7f01 100644
--- a/frontend/src/app/shared/components/autocompleter/project-phase-autocompleter/project-phase-autocompleter.component.html
+++ b/frontend/src/app/shared/components/autocompleter/project-phase-autocompleter/project-phase-autocompleter.component.html
@@ -1,44 +1,48 @@
<!-- This is mostly the same template as the one for the create-autocompleter but with the icons prepended -->
<ng-select #ngSelectComponent
- [(ngModel)]="model"
- [items]="availableValues"
- [ngClass]="classes"
- [groupBy]="groupByFn"
- [addTag]="createAllowed"
- [virtualScroll]="true"
- [required]="required"
- [clearable]="!required"
- [disabled]="disabled"
- [typeahead]="typeahead"
- [clearOnBackspace]="false"
- [clearSearchOnAdd]="false"
- [appendTo]="appendTo"
- [hideSelected]="hideSelected"
- [compareWith]="compareByHref"
- [id]="id"
- (change)="changeModel($event)"
- (open)="opened()"
- (close)="closed()"
- (keydown)="keyPressed($event)"
- bindLabel="name">
+ [(ngModel)]="model"
+ [items]="availableValues"
+ [ngClass]="classes"
+ [groupBy]="groupByFn"
+ [addTag]="createAllowed"
+ [virtualScroll]="true"
+ [required]="required"
+ [clearable]="!required"
+ [disabled]="disabled"
+ [typeahead]="typeahead"
+ [clearOnBackspace]="false"
+ [clearSearchOnAdd]="false"
+ [appendTo]="appendTo"
+ [hideSelected]="hideSelected"
+ [compareWith]="compareByHref"
+ [id]="id"
+ (change)="changeModel($event)"
+ (open)="opened()"
+ (close)="closed()"
+ (keydown)="keyPressed($event)"
+ bindLabel="name">
<ng-template ng-label-tmp let-item="item">
- <span *ngIf="isPhase(item)"
- [innerHtml]="phaseIcon"
- [classList]="iconClasses(item)">
- </span>
+ @if (isPhase(item)) {
+ <span
+ [innerHtml]="phaseIcon"
+ [classList]="iconClasses(item)">
+ </span>
+ }
<span [textContent]="item.name"></span>
</ng-template>
<ng-template ng-option-tmp let-item="item" let-search="searchTerm">
- <span *ngIf="isPhase(item)"
- [innerHtml]="phaseIcon"
- [classList]="iconClasses(item)">
- </span>
+ @if (isPhase(item)) {
+ <span
+ [innerHtml]="phaseIcon"
+ [classList]="iconClasses(item)">
+ </span>
+ }
<span [ngOptionHighlight]="search"
- [textContent]="item.name"
- [ngStyle]="{'padding-left.px': item.depth * 16}"
- class="ng-option-label ellipsis">
+ [textContent]="item.name"
+ [ngStyle]="{'padding-left.px': item.depth * 16}"
+ class="ng-option-label ellipsis">
</span>
</ng-template>
</ng-select>
diff --git a/frontend/src/app/shared/components/autocompleter/user-autocompleter/user-autocompleter-template.component.html b/frontend/src/app/shared/components/autocompleter/user-autocompleter/user-autocompleter-template.component.html
index 1820675eb25..58dca9d3cd0 100644
--- a/frontend/src/app/shared/components/autocompleter/user-autocompleter/user-autocompleter-template.component.html
+++ b/frontend/src/app/shared/components/autocompleter/user-autocompleter/user-autocompleter-template.component.html
@@ -2,29 +2,33 @@
#optionTemplate
let-item
let-search="search"
->
- <op-principal
- *ngIf="item && item.href"
- [principal]="item"
- [hideName]="true"
- [hoverCard]="hoverCards"
- size="mini"
- ></op-principal>
+ >
+ @if (item && item.href) {
+ <op-principal
+ [principal]="item"
+ [hideName]="true"
+ [hoverCard]="hoverCards"
+ size="mini"
+ ></op-principal>
+ }
<span [opSearchHighlight]="search"
- [attr.data-hover-card-url]="getHoverCardUrl(item)"
- data-hover-card-trigger-target="trigger"
- class="op-user-autocompleter--name">
- {{ item.name }}
- </span>
- <span
- class="op-autocompleter__option-principal-email"
- *ngIf="item.email"
- [opSearchHighlight]="search"
- >{{ item.email }}</span>
-</ng-template>
-<ng-template #footerTemplate *ngIf="inviteUserToProject">
- <op-invite-user-button
- [projectId]="inviteUserToProject"
- class="op-select-footer"
- ></op-invite-user-button>
+ [attr.data-hover-card-url]="getHoverCardUrl(item)"
+ data-hover-card-trigger-target="trigger"
+ class="op-user-autocompleter--name">
+ {{ item.name }}
+ </span>
+ @if (item.email) {
+ <span
+ class="op-autocompleter__option-principal-email"
+ [opSearchHighlight]="search"
+ >{{ item.email }}</span>
+ }
</ng-template>
+@if (inviteUserToProject) {
+ <ng-template #footerTemplate>
+ <op-invite-user-button
+ [projectId]="inviteUserToProject"
+ class="op-select-footer"
+ ></op-invite-user-button>
+ </ng-template>
+}
diff --git a/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.html b/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.html
index 5d074deb51e..bec83c04996 100644
--- a/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.html
+++ b/frontend/src/app/shared/components/breadcrumbs/op-breadcrumbs.component.html
@@ -2,48 +2,50 @@
<!-- Desktop Version -->
<nav [attr.aria-label]="text.breadcrumb" class="hidden-for-mobile">
<ol class="op-breadcrumbs--items">
- <li
- class="op-breadcrumbs--item"
- data-test-selector="op-breadcrumbs--item"
- *ngFor="let item of items; let last = last"
- >
- <ng-container *ngIf="!last">
- <ng-container *ngIf="isLink(item); else plainText">
- <a [href]="item.href" target="_top">{{ item.text }}</a>
- </ng-container>
- <ng-template #plainText>
- <a class="op-breadcrumbs--text"
- href="#"
- target="_top">
- {{ item }}
- </a>
- </ng-template>
- </ng-container>
- <ng-container *ngIf="last">
- <a href="#"
- aria-current="page"
- class="op-breadcrumbs--current"
- target="_self"
+ @for (item of items; track item; let last = $last) {
+ <li
+ class="op-breadcrumbs--item"
+ data-test-selector="op-breadcrumbs--item"
>
- <ng-container *ngIf="lastItemSection">
- <span class="op-breadcrumbs--section">{{ lastItemSection }}: </span>
- </ng-container>
- <b>{{ getText(item) }}</b>
- </a>
- </ng-container>
- </li>
+ @if (!last) {
+ @if (isLink(item)) {
+ <a [href]="item.href" target="_top">{{ item.text }}</a>
+ } @else {
+ <a class="op-breadcrumbs--text"
+ href="#"
+ target="_top">
+ {{ item }}
+ </a>
+ }
+ }
+ @if (last) {
+ <a href="#"
+ aria-current="page"
+ class="op-breadcrumbs--current"
+ target="_self"
+ >
+ @if (lastItemSection) {
+ <span class="op-breadcrumbs--section">{{ lastItemSection }}: </span>
+ }
+ <b>{{ getText(item) }}</b>
+ </a>
+ }
+ </li>
+ }
</ol>
</nav>
<!-- Mobile Version -->
<nav [attr.aria-label]="text.breadcrumb" class="hidden-for-desktop">
- <div class="op-breadcrumbs--mobile" *ngIf="items.length > 1">
- <ng-container *ngIf="getHref(items[items.length - 2]) as href">
- <a class="op-breadcrumbs--back" [href]="href" target="_top">
- <svg arrow-left-icon size="small"></svg>
- {{ getText(items[items.length - 2]) }}
- </a>
- </ng-container>
- </div>
+ @if (items.length > 1) {
+ <div class="op-breadcrumbs--mobile">
+ @if (getHref(items[items.length - 2]); as href) {
+ <a class="op-breadcrumbs--back" [href]="href" target="_top">
+ <svg arrow-left-icon size="small"></svg>
+ {{ getText(items[items.length - 2]) }}
+ </a>
+ }
+ </div>
+ }
</nav>
</div>
diff --git a/frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.html b/frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.html
index 05fe101b3ce..b441558a71c 100644
--- a/frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.html
+++ b/frontend/src/app/shared/components/datepicker/basic-range-date-picker/basic-range-date-picker.component.html
@@ -1,24 +1,25 @@
-<input
- *ngIf="!mobile"
- #input
- type="text"
- autocomplete="off"
- class="spot-input op-basic-range-datepicker--input"
- data-test-selector="op-basic-range-date-picker"
- [ngClass]="inputClassNames"
- [attr.data-value]="value"
- [attr.data-action]="dataAction"
- [id]="id"
- [name]="name"
- [attr.name]="name"
- [required]="required"
- [disabled]="disabled"
- [ngModel]="stringValue"
- (ngModelChange)="changeValueFromInputDebounced($event)"
- (focus)="showDatePicker()"
- (click)="sentCalendarToTopLayer()"
-/>
-<ng-container *ngIf="mobile">
+@if (!mobile) {
+ <input
+ #input
+ type="text"
+ autocomplete="off"
+ class="spot-input op-basic-range-datepicker--input"
+ data-test-selector="op-basic-range-date-picker"
+ [ngClass]="inputClassNames"
+ [attr.data-value]="value"
+ [attr.data-action]="dataAction"
+ [id]="id"
+ [name]="name"
+ [attr.name]="name"
+ [required]="required"
+ [disabled]="disabled"
+ [ngModel]="stringValue"
+ (ngModelChange)="changeValueFromInputDebounced($event)"
+ (focus)="showDatePicker()"
+ (click)="sentCalendarToTopLayer()"
+ />
+}
+@if (mobile) {
<input
type="date"
class="spot-input"
@@ -30,7 +31,7 @@
[disabled]="disabled"
[ngModel]="value[0] || ''"
(ngModelChange)="changeValueFromInputDebounced([$event, value[1] || ''])"
- />
+ />
<span class="op-basic-range-datepicker--spacer" [textContent]="text.spacer"></span>
<input
type="date"
@@ -43,7 +44,7 @@
[disabled]="disabled"
[ngModel]="value[1] || ''"
(ngModelChange)="changeValueFromInputDebounced([value[0] || '', $event])"
- />
+ />
<input
type="hidden"
data-test-selector="op-basic-range-date-picker--value"
@@ -53,5 +54,5 @@
[attr.name]="name"
[attr.data-action]="dataAction"
[ngModel]="stringValue"
- />
-</ng-container>
+ />
+}
diff --git a/frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.html b/frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.html
index 3e7fe691030..1b407402ed1 100644
--- a/frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.html
+++ b/frontend/src/app/shared/components/datepicker/basic-single-date-picker/basic-single-date-picker.component.html
@@ -1,26 +1,27 @@
-<input
- *ngIf="!mobile"
- #input
- type="text"
- autocomplete="off"
- class="spot-input"
- data-filter--filters-form-target="singleDay"
- [ngClass]="inputClassNames"
- [ngModel]="value"
- [attr.data-value]="value"
- [attr.data-action]="dataAction"
- [id]="id"
- [name]="name"
- [attr.name]="name"
- [required]="required"
- [disabled]="disabled"
- (input)="changeValueFromInput($event.target.value)"
- (focus)="showDatePicker()"
- (click)="sentCalendarToTopLayer()"
- [attr.data-remote-field-key]="remoteFieldKey"
-/>
+@if (!mobile) {
+ <input
+ #input
+ type="text"
+ autocomplete="off"
+ class="spot-input"
+ data-filter--filters-form-target="singleDay"
+ [ngClass]="inputClassNames"
+ [ngModel]="value"
+ [attr.data-value]="value"
+ [attr.data-action]="dataAction"
+ [id]="id"
+ [name]="name"
+ [attr.name]="name"
+ [required]="required"
+ [disabled]="disabled"
+ (input)="changeValueFromInput($event.target.value)"
+ (focus)="showDatePicker()"
+ (click)="sentCalendarToTopLayer()"
+ [attr.data-remote-field-key]="remoteFieldKey"
+ />
+}
-<ng-container *ngIf="mobile">
+@if (mobile) {
<input
type="date"
class="spot-input"
@@ -35,5 +36,5 @@
[disabled]="disabled"
[ngModel]="value"
(ngModelChange)="changeValueFromInput($event)"
- />
-</ng-container>
+ />
+}
diff --git a/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.html b/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.html
index c586528f5d6..783213835c4 100644
--- a/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.html
+++ b/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.html
@@ -2,23 +2,25 @@
[opened]="opened"
(closed)="opened = false"
data-test-selector="opce-modal-single-date-picker"
->
+ >
<ng-content
slot="trigger"
select="[slot=trigger]"
></ng-content>
- <ng-template [ngIf]="useDefaultTrigger" slot="trigger">
- <input
- type="text"
- class="spot-input"
- [attr.data-value]="value"
- [id]="id"
- [ngModel]="value"
- (ngModelChange)="changeValueFromInputDebounced($event)"
- (click)="onInputClick($event)"
- (focus)="opened = true"
- />
- </ng-template>
+ @if (useDefaultTrigger) {
+ <ng-template slot="trigger">
+ <input
+ type="text"
+ class="spot-input"
+ [attr.data-value]="value"
+ [id]="id"
+ [ngModel]="value"
+ (ngModelChange)="changeValueFromInputDebounced($event)"
+ (click)="onInputClick($event)"
+ (focus)="opened = true"
+ />
+ </ng-template>
+ }
<ng-container slot="body">
<form
@@ -29,32 +31,33 @@
cdkTrapFocus
[cdkTrapFocusAutoCapture]="true"
(submit)="save($event)"
- >
- <spot-selector-field
- *ngIf="showIgnoreNonWorkingDays"
- [reverseLabel]="true"
- [label]="text.ignoreNonWorkingDays.title"
>
- <spot-switch
- slot="input"
- name="ignoreNonWorkingDays"
- [(ngModel)]="ignoreNonWorkingDays"
- (ngModelChange)="changeNonWorkingDays()"
- data-test-selector="op-datepicker-modal--include-non-working-days"
- ></spot-switch>
- </spot-selector-field>
+ @if (showIgnoreNonWorkingDays) {
+ <spot-selector-field
+ [reverseLabel]="true"
+ [label]="text.ignoreNonWorkingDays.title"
+ >
+ <spot-switch
+ slot="input"
+ name="ignoreNonWorkingDays"
+ [(ngModel)]="ignoreNonWorkingDays"
+ (ngModelChange)="changeNonWorkingDays()"
+ data-test-selector="op-datepicker-modal--include-non-working-days"
+ ></spot-switch>
+ </spot-selector-field>
+ }
<ng-content select="[slot=extra-fields]"></ng-content>
- <spot-form-field
- [label]="text.date"
- [required]="required"
- >
- <spot-text-field
- slot="input"
- name="date"
- [ngModel]="workingValue"
+ <spot-form-field
+ [label]="text.date"
[required]="required"
+ >
+ <spot-text-field
+ slot="input"
+ name="date"
+ [ngModel]="workingValue"
+ [required]="required"
(ngModelChange)="writeWorkingValue($event)"
[showClearButton]="true"
></spot-text-field>
@@ -96,4 +99,4 @@
[ngClass]="{ 'remote-field--input': !!remoteFieldKey }"
[attr.data-remote-field-key]="remoteFieldKey"
hidden
->
+ >
diff --git a/frontend/src/app/shared/components/datepicker/wp-date-picker-modal/wp-date-picker.modal.html b/frontend/src/app/shared/components/datepicker/wp-date-picker-modal/wp-date-picker.modal.html
index 30bf16de231..37ce0d9284f 100644
--- a/frontend/src/app/shared/components/datepicker/wp-date-picker-modal/wp-date-picker.modal.html
+++ b/frontend/src/app/shared/components/datepicker/wp-date-picker-modal/wp-date-picker.modal.html
@@ -2,24 +2,23 @@
class="spot-modal spot-modal_auto-size loading-indicator--location"
data-indicator-name="modal"
tabindex="0"
->
- <turbo-frame *ngIf="turboFrameSrc"
- [src]="turboFrameSrc"
- opModalWithTurboContent
- [change]="locals.change"
- [resource]="locals.resource"
- (successfulCreate)="handleSuccessfulCreate($event)"
- (successfulUpdate)="handleSuccessfulUpdate()"
- (cancel)="handleCancel()"
- id="wp-datepicker-dialog--content">
- <op-content-loader viewBox="0 0 100 100">
- <svg:rect x="5" y="5" width="70" height="5" rx="1"/>
-
- <svg:rect x="80" y="5" width="15" height="5" rx="1"/>
-
- <svg:rect x="5" y="15" width="90" height="8" rx="1"/>
-
- <svg:rect x="5" y="30" width="90" height="12" rx="1"/>
- </op-content-loader>
- </turbo-frame>
+ >
+ @if (turboFrameSrc) {
+ <turbo-frame
+ [src]="turboFrameSrc"
+ opModalWithTurboContent
+ [change]="locals.change"
+ [resource]="locals.resource"
+ (successfulCreate)="handleSuccessfulCreate($event)"
+ (successfulUpdate)="handleSuccessfulUpdate()"
+ (cancel)="handleCancel()"
+ id="wp-datepicker-dialog--content">
+ <op-content-loader viewBox="0 0 100 100">
+ <svg:rect x="5" y="5" width="70" height="5" rx="1"/>
+ <svg:rect x="80" y="5" width="15" height="5" rx="1"/>
+ <svg:rect x="5" y="15" width="90" height="8" rx="1"/>
+ <svg:rect x="5" y="30" width="90" height="12" rx="1"/>
+ </op-content-loader>
+ </turbo-frame>
+ }
</div>
diff --git a/frontend/src/app/shared/components/dynamic-forms/components/dynamic-field-group-wrapper/dynamic-field-group-wrapper.component.html b/frontend/src/app/shared/components/dynamic-forms/components/dynamic-field-group-wrapper/dynamic-field-group-wrapper.component.html
index 541b70b6d07..6d995749dcb 100644
--- a/frontend/src/app/shared/components/dynamic-forms/components/dynamic-field-group-wrapper/dynamic-field-group-wrapper.component.html
+++ b/frontend/src/app/shared/components/dynamic-forms/components/dynamic-field-group-wrapper/dynamic-field-group-wrapper.component.html
@@ -1,31 +1,31 @@
-<fieldset
- class="op-fieldset op-fieldset_collapsible"
- [ngClass]="{'op-fieldset_collapsed': to.collapsibleFieldGroupsCollapsed}"
- *ngIf="to?.collapsibleFieldGroups"
->
- <legend class="op-fieldset--legend">
- <button
- title="Show/hide"
- type="button"
- class="op-fieldset--toggle"
- (click)="to.collapsibleFieldGroupsCollapsed = !to.collapsibleFieldGroupsCollapsed"
+@if (to?.collapsibleFieldGroups) {
+ <fieldset
+ class="op-fieldset op-fieldset_collapsible"
+ [ngClass]="{'op-fieldset_collapsed': to.collapsibleFieldGroupsCollapsed}"
>
- {{ to.label }}
- </button>
- </legend>
+ <legend class="op-fieldset--legend">
+ <button
+ title="Show/hide"
+ type="button"
+ class="op-fieldset--toggle"
+ (click)="to.collapsibleFieldGroupsCollapsed = !to.collapsibleFieldGroupsCollapsed"
+ >
+ {{ to.label }}
+ </button>
+ </legend>
+ <div class="op-fieldset--fields">
+ <ng-container #fieldComponent></ng-container>
+ </div>
+ </fieldset>
+}
- <div class="op-fieldset--fields">
- <ng-container #fieldComponent></ng-container>
- </div>
-</fieldset>
-
-<fieldset
- class="op-fieldset"
- *ngIf="!to?.collapsibleFieldGroups"
->
- <legend class="op-fieldset--legend">{{ to.label }}</legend>
-
- <div class="op-fieldset--fields">
- <ng-container #fieldComponent></ng-container>
- </div>
-</fieldset>
\ No newline at end of file
+@if (!to?.collapsibleFieldGroups) {
+ <fieldset
+ class="op-fieldset"
+ >
+ <legend class="op-fieldset--legend">{{ to.label }}</legend>
+ <div class="op-fieldset--fields">
+ <ng-container #fieldComponent></ng-container>
+ </div>
+ </fieldset>
+}
\ No newline at end of file
diff --git a/frontend/src/app/shared/components/dynamic-forms/components/dynamic-field-wrapper/dynamic-field-wrapper.component.html b/frontend/src/app/shared/components/dynamic-forms/components/dynamic-field-wrapper/dynamic-field-wrapper.component.html
index 075d51572dc..c1a1b47937b 100644
--- a/frontend/src/app/shared/components/dynamic-forms/components/dynamic-field-wrapper/dynamic-field-wrapper.component.html
+++ b/frontend/src/app/shared/components/dynamic-forms/components/dynamic-field-wrapper/dynamic-field-wrapper.component.html
@@ -1,51 +1,50 @@
-<spot-form-field
- *ngIf="field.type !== 'booleanInput'"
- [control]="field?.formControl"
- [label]="to?.label"
- [hidden]="field?.hide"
- [noWrapLabel]="to?.noWrapLabel"
- [required]="to?.required"
- [helpTextAttribute]="to?.property"
- [helpTextAttributeScope]="to?.helpTextAttributeScope || dynamicFormComponent?.helpTextAttributeScope"
- [showValidationErrorOn]="to?.showValidationErrorOn || dynamicFormComponent?.showValidationErrorsOn"
- [attr.data-qa-field-name]="to?.property"
->
- <ng-container #fieldComponent slot="input"></ng-container>
+@if (field.type !== 'booleanInput') {
+ <spot-form-field
+ [control]="field?.formControl"
+ [label]="to?.label"
+ [hidden]="field?.hide"
+ [noWrapLabel]="to?.noWrapLabel"
+ [required]="to?.required"
+ [helpTextAttribute]="to?.property"
+ [helpTextAttributeScope]="to?.helpTextAttributeScope || dynamicFormComponent?.helpTextAttributeScope"
+ [showValidationErrorOn]="to?.showValidationErrorOn || dynamicFormComponent?.showValidationErrorsOn"
+ [attr.data-qa-field-name]="to?.property"
+ >
+ <ng-container #fieldComponent slot="input"></ng-container>
+ <attribute-help-text
+ slot="help-text"
+ class="spot-form-field--help-text"
+ [attribute]="to?.property"
+ [attributeScope]="to?.helpTextAttributeScope || dynamicFormComponent?.helpTextAttributeScope"
+ ></attribute-help-text>
+ <formly-validation-message
+ class="spot-form-field--error"
+ [field]="field"
+ slot="errors"
+ ></formly-validation-message>
+ </spot-form-field>
+}
- <attribute-help-text
- slot="help-text"
- class="spot-form-field--help-text"
- [attribute]="to?.property"
- [attributeScope]="to?.helpTextAttributeScope || dynamicFormComponent?.helpTextAttributeScope"
- ></attribute-help-text>
-
- <formly-validation-message
- class="spot-form-field--error"
- [field]="field"
- slot="errors"
- ></formly-validation-message>
-</spot-form-field>
-
-<spot-selector-field
- *ngIf="field.type === 'booleanInput'"
- [control]="field?.formControl"
- [label]="to?.label"
- [hidden]="field?.hide"
- [required]="to?.required"
- [showValidationErrorOn]="to?.showValidationErrorOn || dynamicFormComponent?.showValidationErrorsOn"
- [attr.data-qa-field-name]="to?.property"
->
- <ng-container #fieldComponent slot="input"></ng-container>
- <attribute-help-text
- slot="help-text"
- class="spot-form-field--help-text"
- [attribute]="to?.property"
- [attributeScope]="to?.helpTextAttributeScope || dynamicFormComponent?.helpTextAttributeScope"
- ></attribute-help-text>
-
- <formly-validation-message
- class="spot-form-field--error"
- [field]="field"
- slot="errors"
- ></formly-validation-message>
-</spot-selector-field>
+@if (field.type === 'booleanInput') {
+ <spot-selector-field
+ [control]="field?.formControl"
+ [label]="to?.label"
+ [hidden]="field?.hide"
+ [required]="to?.required"
+ [showValidationErrorOn]="to?.showValidationErrorOn || dynamicFormComponent?.showValidationErrorsOn"
+ [attr.data-qa-field-name]="to?.property"
+ >
+ <ng-container #fieldComponent slot="input"></ng-container>
+ <attribute-help-text
+ slot="help-text"
+ class="spot-form-field--help-text"
+ [attribute]="to?.property"
+ [attributeScope]="to?.helpTextAttributeScope || dynamicFormComponent?.helpTextAttributeScope"
+ ></attribute-help-text>
+ <formly-validation-message
+ class="spot-form-field--error"
+ [field]="field"
+ slot="errors"
+ ></formly-validation-message>
+ </spot-selector-field>
+}
diff --git a/frontend/src/app/shared/components/dynamic-forms/components/dynamic-form/dynamic-form.component.html b/frontend/src/app/shared/components/dynamic-forms/components/dynamic-form/dynamic-form.component.html
index 7cadce03672..860f3a07f8c 100644
--- a/frontend/src/app/shared/components/dynamic-forms/components/dynamic-form/dynamic-form.component.html
+++ b/frontend/src/app/shared/components/dynamic-forms/components/dynamic-form/dynamic-form.component.html
@@ -1,42 +1,45 @@
-<form
- *ngIf="form && handleSubmit"
- data-qa="op-form--container"
- class="op-form"
- [formGroup]="form"
- (submit)="submitForm(form)"
->
+@if (form && handleSubmit) {
+ <form
+ data-qa="op-form--container"
+ class="op-form"
+ [formGroup]="form"
+ (submit)="submitForm(form)"
+ >
+ <formly-form
+ [form]="form"
+ [model]="innerModel"
+ [fields]="fields"
+ (modelChange)="onModelChange($event)"
+ class="op-form--fieldset"
+ ></formly-form>
+ @if (handleSubmit) {
+ <div class="op-form--submit"
+ >
+ <button type="submit"
+ class="button -primary"
+ [disabled]="inFlight">
+ {{text.save}}
+ </button>
+ <button type="button"
+ class="button"
+ (click)="handleCancel()">
+ {{text.cancel}}
+ </button>
+ </div>
+ }
+ </form>
+}
+
+<!-- When used as a FormControl, the Dynamic Form doesn't need a wrapping form -->
+<!-- TODO: Issue: sharing the form as an ng-template between this two HTML blocks doesn't work because
+the nested OpFormFieldComponent doesn't find the injected FormGroupDirective. --->
+@if (form && !handleSubmit) {
<formly-form
+ data-qa="op-form--container"
+ class="op-form--fieldset"
[form]="form"
[model]="innerModel"
[fields]="fields"
(modelChange)="onModelChange($event)"
- class="op-form--fieldset"
></formly-form>
-
- <div class="op-form--submit"
- *ngIf="handleSubmit">
- <button type="submit"
- class="button -primary"
- [disabled]="inFlight">
- {{text.save}}
- </button>
- <button type="button"
- class="button"
- (click)="handleCancel()">
- {{text.cancel}}
- </button>
- </div>
-</form>
-
-<!-- When used as a FormControl, the Dynamic Form doesn't need a wrapping form -->
-<!-- TODO: Issue: sharing the form as an ng-template between this two HTML blocks doesn't work because
- the nested OpFormFieldComponent doesn't find the injected FormGroupDirective. --->
-<formly-form
- data-qa="op-form--container"
- class="op-form--fieldset"
- *ngIf="form && !handleSubmit"
- [form]="form"
- [model]="innerModel"
- [fields]="fields"
- (modelChange)="onModelChange($event)"
-></formly-form>
+}
diff --git a/frontend/src/app/shared/components/editable-toolbar-title/editable-toolbar-title.html b/frontend/src/app/shared/components/editable-toolbar-title/editable-toolbar-title.html
index cb4e4866049..b294925d72b 100644
--- a/frontend/src/app/shared/components/editable-toolbar-title/editable-toolbar-title.html
+++ b/frontend/src/app/shared/components/editable-toolbar-title/editable-toolbar-title.html
@@ -1,38 +1,43 @@
-<div *ngIf="editable"
- (focusout)="saveWhenFocusOutside($event)"
- class="editable-toolbar-title--container">
- <button
- *ngIf="showSave"
- type="button"
- class="spot-link editable-toolbar-title--save"
- (click)="save($event, true)"
- [attr.title]="text.query_has_changed_click_to_save">
- <op-icon icon-classes="icon icon-save icon-no-color"></op-icon>
- </button>
- <input #editableTitleInput
- size="1"
- type="text"
- aria-required="true"
- [attr.name]="selectableTitleIdentifier"
- [opAutofocus]="this.initialFocus || undefined"
- (focus)="onFocus($event)"
- (blur)="onBlur()"
- (keydown.escape)="reset($event)"
- (keydown.enter)="save($event)"
- [attr.placeholder]="text.input_placeholder"
- [attr.title]="text.input_title"
- [(ngModel)]="selectedTitle"
- [disabled]="inFlight"
- [ngClass]="{ '-error': isEmpty, '-changed': showSave }"
- class="editable-toolbar-title--input -border-on-hover-only toolbar--editable-toolbar ellipsis"/>
- <!-- This is not an angular component, rather it is a custom element so the specificity of the css stays low.
- The &nbsp;&nbsp; is for making sure that the shim is always a bit larger than the input. Sometimes the ellipsis
- would kick in to early otherwise. -->
- <input-shim
+@if (editable) {
+ <div
+ (focusout)="saveWhenFocusOutside($event)"
+ class="editable-toolbar-title--container">
+ @if (showSave) {
+ <button
+ type="button"
+ class="spot-link editable-toolbar-title--save"
+ (click)="save($event, true)"
+ [attr.title]="text.query_has_changed_click_to_save">
+ <op-icon icon-classes="icon icon-save icon-no-color"></op-icon>
+ </button>
+ }
+ <input #editableTitleInput
+ size="1"
+ type="text"
+ aria-required="true"
+ [attr.name]="selectableTitleIdentifier"
+ [opAutofocus]="this.initialFocus || undefined"
+ (focus)="onFocus($event)"
+ (blur)="onBlur()"
+ (keydown.escape)="reset($event)"
+ (keydown.enter)="save($event)"
+ [attr.placeholder]="text.input_placeholder"
+ [attr.title]="text.input_title"
+ [(ngModel)]="selectedTitle"
+ [disabled]="inFlight"
+ [ngClass]="{ '-error': isEmpty, '-changed': showSave }"
+ class="editable-toolbar-title--input -border-on-hover-only toolbar--editable-toolbar ellipsis"/>
+ <!-- This is not an angular component, rather it is a custom element so the specificity of the css stays low.
+ The &nbsp;&nbsp; is for making sure that the shim is always a bit larger than the input. Sometimes the ellipsis
+ would kick in to early otherwise. -->
+ <input-shim
class="editable-toolbar-title--input editable-toolbar-title--input-shim toolbar--editable-toolbar">{{ selectedTitle || text.input_placeholder }}{{ selectedTitle ? '&nbsp;&nbsp;' : ''}}</input-shim>
-</div>
-<div *ngIf="!editable"
+ </div>
+}
+@if (!editable) {
+ <div
[attr.title]="selectedTitle"
[ngClass]="{ '-disabled': disabled, '-small': smallHeader }"
class="editable-toolbar-title--fixed">{{ selectedTitle }}
-</div>
+ </div>
+}
diff --git a/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.html b/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.html
index f500dbd90f6..4718e2a6136 100644
--- a/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.html
+++ b/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.html
@@ -12,15 +12,16 @@
></op-ckeditor>
</div>
-<fieldset
- class="form--fieldset op-ckeditor--attachments"
- *ngIf="showAttachments && halResource?.attachments"
->
- <legend class="form--fieldset-legend">
- {{ text.attachments }}
- </legend>
- <op-attachments
- [resource]="halResource"
- [destroyImmediately]="false"
- ></op-attachments>
-</fieldset>
+@if (showAttachments && halResource?.attachments) {
+ <fieldset
+ class="form--fieldset op-ckeditor--attachments"
+ >
+ <legend class="form--fieldset-legend">
+ {{ text.attachments }}
+ </legend>
+ <op-attachments
+ [resource]="halResource"
+ [destroyImmediately]="false"
+ ></op-attachments>
+ </fieldset>
+}
diff --git a/frontend/src/app/shared/components/editor/components/ckeditor/op-ckeditor.html b/frontend/src/app/shared/components/editor/components/ckeditor/op-ckeditor.html
index 3c6873bcc94..2db4838c47d 100644
--- a/frontend/src/app/shared/components/editor/components/ckeditor/op-ckeditor.html
+++ b/frontend/src/app/shared/components/editor/components/ckeditor/op-ckeditor.html
@@ -1,13 +1,15 @@
<ng-container>
- <div *ngIf="error" class="op-toast -error">
- <div class="op-toast--content">
- <p>
- <strong [textContent]="text.errorTitle"></strong>
- <br/>
- <span [textContent]="error"></span>
- </p>
+ @if (error) {
+ <div class="op-toast -error">
+ <div class="op-toast--content">
+ <p>
+ <strong [textContent]="text.errorTitle"></strong>
+ <br/>
+ <span [textContent]="error"></span>
+ </p>
+ </div>
</div>
- </div>
+ }
<div class="op-ckeditor-source-element document-editor" #opCkeditorReplacementContainer>
<div class="document-editor__toolbar"></div>
diff --git a/frontend/src/app/shared/components/fields/edit/editing-portal/edit-form-portal.component.html b/frontend/src/app/shared/components/fields/edit/editing-portal/edit-form-portal.component.html
index 10e7919d3a9..61251ab679d 100644
--- a/frontend/src/app/shared/components/fields/edit/editing-portal/edit-form-portal.component.html
+++ b/frontend/src/app/shared/components/fields/edit/editing-portal/edit-form-portal.component.html
@@ -1,17 +1,17 @@
-<div *ngIf="handler"
- class="inline-edit--active-field inplace-edit {{ handler.fieldName }}"
- [ngClass]="{'-error': handler.isErrorenous }">
- <form (submit)="handler.handleUserSubmit()"
- role="form"
- autocomplete="off"
- tabindex="-1">
-
- <label [for]="handler.htmlId"
- class="sr-only">
- {{handler.fieldLabel}}
-
- {{handler.errorMessageOnLabel()}}
- </label>
- <ng-container *ngComponentOutlet="componentClass; injector: fieldInjector"></ng-container>
- </form>
-</div>
+@if (handler) {
+ <div
+ class="inline-edit--active-field inplace-edit {{ handler.fieldName }}"
+ [ngClass]="{'-error': handler.isErrorenous }">
+ <form (submit)="handler.handleUserSubmit()"
+ role="form"
+ autocomplete="off"
+ tabindex="-1">
+ <label [for]="handler.htmlId"
+ class="sr-only">
+ {{handler.fieldLabel}}
+ {{handler.errorMessageOnLabel()}}
+ </label>
+ <ng-container *ngComponentOutlet="componentClass; injector: fieldInjector"></ng-container>
+ </form>
+ </div>
+}
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/formattable-edit-field/formattable-edit-field.component.html b/frontend/src/app/shared/components/fields/edit/field-types/formattable-edit-field/formattable-edit-field.component.html
index b9cd1473fe1..0543debe752 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/formattable-edit-field/formattable-edit-field.component.html
+++ b/frontend/src/app/shared/components/fields/edit/field-types/formattable-edit-field/formattable-edit-field.component.html
@@ -1,19 +1,21 @@
<div class="textarea-wrapper">
<div class="op-ckeditor--wrapper op-ckeditor-element">
<op-ckeditor [context]="ckEditorContext"
- [content]="initialContent"
- (contentChanged)="onContentChange($event)"
- (initializationFailed)="initializationError = true"
- (initializeDone)="onCkeditorSetup($event)"
- (saveRequested)="handleUserSubmit()"
- >
+ [content]="initialContent"
+ (contentChanged)="onContentChange($event)"
+ (initializationFailed)="initializationError = true"
+ (initializeDone)="onCkeditorSetup($event)"
+ (saveRequested)="handleUserSubmit()"
+ >
</op-ckeditor>
</div>
- <edit-field-controls *ngIf="!(handler.inEditMode || initializationError)"
- [fieldController]="field"
- (onSave)="handleUserSubmit()"
- (onCancel)="handleUserCancel()"
- [saveTitle]="text.save"
- [cancelTitle]="text.cancel">
- </edit-field-controls>
+ @if (!(handler.inEditMode || initializationError)) {
+ <edit-field-controls
+ [fieldController]="field"
+ (onSave)="handleUserSubmit()"
+ (onCancel)="handleUserCancel()"
+ [saveTitle]="text.save"
+ [cancelTitle]="text.cancel">
+ </edit-field-controls>
+ }
</div>
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/multi-select-edit-field.component.html b/frontend/src/app/shared/components/fields/edit/field-types/multi-select-edit-field.component.html
index f2b57acbac9..4cdd61cdc64 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/multi-select-edit-field.component.html
+++ b/frontend/src/app/shared/components/fields/edit/field-types/multi-select-edit-field.component.html
@@ -1,24 +1,24 @@
<ng-select [(ngModel)]="selectedOption"
- [ngClass]="'inline-edit--field -multi-select'"
- [required]="required"
- [clearable]="!required"
- [disabled]="inFlight"
- [id]="handler.htmlId"
- [items]="availableOptions"
- bindLabel="name"
- [virtualScroll]="true"
- [clearSearchOnAdd]="true"
- (keydown)="handler.handleUserKeydown($event, true)"
- (open)="onOpen()"
- (close)="onClose()"
- (add)="repositionDropdown()"
- (remove)="repositionDropdown()"
- [multiple]="true"
- [closeOnSelect]="false"
- [appendTo]="appendTo"
- [groupBy]="groupByFn"
- [dropdownPosition]="'top'"
- [hideSelected]="true">
+ [ngClass]="'inline-edit--field -multi-select'"
+ [required]="required"
+ [clearable]="!required"
+ [disabled]="inFlight"
+ [id]="handler.htmlId"
+ [items]="availableOptions"
+ bindLabel="name"
+ [virtualScroll]="true"
+ [clearSearchOnAdd]="true"
+ (keydown)="handler.handleUserKeydown($event, true)"
+ (open)="onOpen()"
+ (close)="onClose()"
+ (add)="repositionDropdown()"
+ (remove)="repositionDropdown()"
+ [multiple]="true"
+ [closeOnSelect]="false"
+ [appendTo]="appendTo"
+ [groupBy]="groupByFn"
+ [dropdownPosition]="'top'"
+ [hideSelected]="true">
<ng-template ng-option-tmp let-item="item">
<span
class="ng-option-label ellipsis"
@@ -28,18 +28,21 @@
[ngStyle]="{'padding-left.px': item.depth * 16}"
></span>
</ng-template>
- <ng-template ng-footer-tmp *ngIf="showAddNewUserButton">
- <op-invite-user-button
+ @if (showAddNewUserButton) {
+ <ng-template ng-footer-tmp>
+ <op-invite-user-button
[projectId]="resource.project?.id"
(invited)="selectedOption = $event"
- ></op-invite-user-button>
- </ng-template>
+ ></op-invite-user-button>
+ </ng-template>
+ }
</ng-select>
-<edit-field-controls [fieldController]="self"
- *ngIf="!handler.inEditMode"
- (onSave)="handler.handleUserSubmit()"
- (onCancel)="handler.handleUserCancel()"
- [saveTitle]="text.save"
- [cancelTitle]="text.cancel">
-</edit-field-controls>
+@if (!handler.inEditMode) {
+ <edit-field-controls [fieldController]="self"
+ (onSave)="handler.handleUserSubmit()"
+ (onCancel)="handler.handleUserCancel()"
+ [saveTitle]="text.save"
+ [cancelTitle]="text.cancel">
+ </edit-field-controls>
+}
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/project-edit-field.component.html b/frontend/src/app/shared/components/fields/edit/field-types/project-edit-field.component.html
index 8c440f62ea1..aa5fba8f48e 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/project-edit-field.component.html
+++ b/frontend/src/app/shared/components/fields/edit/field-types/project-edit-field.component.html
@@ -1,24 +1,22 @@
-<op-project-autocompleter
- *ngIf="url; else loadingTemplate"
- [ngClass]="'inline-edit--field ' + handler.fieldName"
-
- [model]="value"
- [url]="url"
- [filters]="APIFilters"
- [focusDirectly]="!(handler.inEditMode || isNew)"
- [openDirectly]="!isNew"
- [isInlineContext]="true"
- appendTo=".op-wide-autocomplete-wrapper"
-
- (change)="onModelChange($event)"
- (cancel)="handler.handleUserCancel()"
-></op-project-autocompleter>
-
-<ng-template #loadingTemplate>
+@if (url) {
+ <op-project-autocompleter
+ [ngClass]="'inline-edit--field ' + handler.fieldName"
+ [model]="value"
+ [url]="url"
+ [filters]="APIFilters"
+ [focusDirectly]="!(handler.inEditMode || isNew)"
+ [openDirectly]="!isNew"
+ [isInlineContext]="true"
+ appendTo=".op-wide-autocomplete-wrapper"
+ (change)="onModelChange($event)"
+ (cancel)="handler.handleUserCancel()"
+ ></op-project-autocompleter>
+} @else {
<op-content-loader
class="project-edit-field--loading-indicator"
viewBox="0 0 100 24"
- >
+ >
<svg:rect x="0" y="0" width="100%" height="100%" rx="1" />
</op-content-loader>
-</ng-template>
+}
+
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/user-edit-field.component.html b/frontend/src/app/shared/components/fields/edit/field-types/user-edit-field.component.html
index 3394349d1c7..176948b4150 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/user-edit-field.component.html
+++ b/frontend/src/app/shared/components/fields/edit/field-types/user-edit-field.component.html
@@ -1,14 +1,15 @@
-<op-user-autocompleter
- class="inline-edit--field {{ handler.fieldName }}"
- *ngIf="url"
- [url]="url"
- [inviteUserToProject]="resource.project?.id"
- [focusDirectly]="!(handler.inEditMode || isNew)"
- [openDirectly]="!(handler.inEditMode || isNew)"
- appendTo="body"
- [model]="value"
- [id]="handler.htmlId"
- (change)="onModelChange($event)"
- (cancel)="handler.handleUserCancel()"
- (userInvited)="onModelChange($event)"
-></op-user-autocompleter>
+@if (url) {
+ <op-user-autocompleter
+ class="inline-edit--field {{ handler.fieldName }}"
+ [url]="url"
+ [inviteUserToProject]="resource.project?.id"
+ [focusDirectly]="!(handler.inEditMode || isNew)"
+ [openDirectly]="!(handler.inEditMode || isNew)"
+ appendTo="body"
+ [model]="value"
+ [id]="handler.htmlId"
+ (change)="onModelChange($event)"
+ (cancel)="handler.handleUserCancel()"
+ (userInvited)="onModelChange($event)"
+ ></op-user-autocompleter>
+}
diff --git a/frontend/src/app/shared/components/fields/macros/attribute-label-macro.html b/frontend/src/app/shared/components/fields/macros/attribute-label-macro.html
index 90d5e555cf6..0c1d05cc744 100644
--- a/frontend/src/app/shared/components/fields/macros/attribute-label-macro.html
+++ b/frontend/src/app/shared/components/fields/macros/attribute-label-macro.html
@@ -1,11 +1,13 @@
-<ng-container *ngIf="resource">
+@if (resource) {
<span [textContent]="label"></span>
<attribute-help-text [attribute]="attribute"
- [attributeScope]="attributeScope">
+ [attributeScope]="attributeScope">
</attribute-help-text>
-</ng-container>
+}
-<span *ngIf="error">
- <i class="icon icon-error"></i>
- <em [textContent]="error"></em>
-</span>
+@if (error) {
+ <span>
+ <i class="icon icon-error"></i>
+ <em [textContent]="error"></em>
+ </span>
+}
diff --git a/frontend/src/app/shared/components/fields/macros/attribute-value-macro.html b/frontend/src/app/shared/components/fields/macros/attribute-value-macro.html
index 57749939937..05fee28fb05 100644
--- a/frontend/src/app/shared/components/fields/macros/attribute-value-macro.html
+++ b/frontend/src/app/shared/components/fields/macros/attribute-value-macro.html
@@ -1,10 +1,14 @@
-<span *ngIf="error">
- <i class="icon icon-error"></i>
- <em [textContent]="error"></em>
-</span>
-<display-field *ngIf="!!resource"
- [resource]="resource"
- containerType="single-view"
- [displayFieldOptions]="{ writable: false }"
- [fieldName]="fieldName">
-</display-field>
+@if (error) {
+ <span>
+ <i class="icon icon-error"></i>
+ <em [textContent]="error"></em>
+ </span>
+}
+@if (!!resource) {
+ <display-field
+ [resource]="resource"
+ containerType="single-view"
+ [displayFieldOptions]="{ writable: false }"
+ [fieldName]="fieldName">
+ </display-field>
+}
diff --git a/frontend/src/app/shared/components/fields/macros/work-package-quickinfo-macro.html b/frontend/src/app/shared/components/fields/macros/work-package-quickinfo-macro.html
index 0c8abdb01a0..fbaa209cd86 100644
--- a/frontend/src/app/shared/components/fields/macros/work-package-quickinfo-macro.html
+++ b/frontend/src/app/shared/components/fields/macros/work-package-quickinfo-macro.html
@@ -1,49 +1,59 @@
-<ng-container *ngIf="(workPackage$ | async) as workPackage">
- <display-field *ngIf="detailed"
- [resource]="workPackage"
- [displayFieldOptions]="{ writable: false }"
- containerType="single-view"
- fieldName="status">
- </display-field>
+@if ((workPackage$ | async); as workPackage) {
+ @if (detailed) {
+ <display-field
+ [resource]="workPackage"
+ [displayFieldOptions]="{ writable: false }"
+ containerType="single-view"
+ fieldName="status">
+ </display-field>
+ }
<display-field [resource]="workPackage"
- [displayFieldOptions]="{ writable: false }"
- fieldName="type">
+ [displayFieldOptions]="{ writable: false }"
+ fieldName="type">
</display-field>
<a data-hover-card-trigger-target="trigger"
- target="_top"
- [href]="workPackageLink"
- [attr.data-work-package-id]="workPackage.id"
- [attr.data-hover-card-url]="workPackageHoverCardUrl">
+ target="_top"
+ [href]="workPackageLink"
+ [attr.data-work-package-id]="workPackage.id"
+ [attr.data-hover-card-url]="workPackageHoverCardUrl">
#{{workPackage.id}}:
</a>
<display-field [resource]="workPackage"
- [displayFieldOptions]="{ writable: false }"
- fieldName="subject">
+ [displayFieldOptions]="{ writable: false }"
+ fieldName="subject">
</display-field>
- <ng-container *ngIf="detailed && (!!workPackage.startDate || !!workPackage.dueDate || !!workPackage.date)">
- (<display-field *ngIf="!!workPackage.date"
- [resource]="workPackage"
- [displayFieldOptions]="{ writable: false }"
- fieldName="date"
- containerType="single-view">
+ @if (detailed && (!!workPackage.startDate || !!workPackage.dueDate || !!workPackage.date)) {
+ (@if (!!workPackage.date) {
+ <display-field
+ [resource]="workPackage"
+ [displayFieldOptions]="{ writable: false }"
+ fieldName="date"
+ containerType="single-view">
+ </display-field>
+ }
+ @if (!!workPackage.startDate) {
+ <display-field
+ [resource]="workPackage"
+ [displayFieldOptions]="{ writable: false }"
+ [displayClass]="combinedDateDisplayField"
+ fieldName="startDate"
+ containerType="single-view">
</display-field>
- <display-field *ngIf="!!workPackage.startDate"
- [resource]="workPackage"
- [displayFieldOptions]="{ writable: false }"
- [displayClass]="combinedDateDisplayField"
- fieldName="startDate"
- containerType="single-view">
+ }
+ @if (!workPackage.startDate && !!workPackage.dueDate) {
+ <display-field
+ [resource]="workPackage"
+ [displayFieldOptions]="{ writable: false }"
+ [displayClass]="combinedDateDisplayField"
+ fieldName="dueDate"
+ containerType="single-view">
</display-field>
- <display-field *ngIf="!workPackage.startDate && !!workPackage.dueDate"
- [resource]="workPackage"
- [displayFieldOptions]="{ writable: false }"
- [displayClass]="combinedDateDisplayField"
- fieldName="dueDate"
- containerType="single-view">
- </display-field>)
- </ng-container>
-</ng-container>
-<span *ngIf="error">
- <i class="icon icon-error"></i>
- <em [textContent]="error"></em>
-</span>
+ })
+ }
+}
+@if (error) {
+ <span>
+ <i class="icon icon-error"></i>
+ <em [textContent]="error"></em>
+ </span>
+}
diff --git a/frontend/src/app/shared/components/grids/grid/grid.component.html b/frontend/src/app/shared/components/grids/grid/grid.component.html
index fcdca4de4f1..15d5855f2c4 100644
--- a/frontend/src/app/shared/components/grids/grid/grid.component.html
+++ b/frontend/src/app/shared/components/grids/grid/grid.component.html
@@ -1,114 +1,124 @@
<div class="grid--container"
- [style.grid-template-columns]="gridColumnStyle"
- [style.grid-template-rows]="gridRowStyle">
+ [style.grid-template-columns]="gridColumnStyle"
+ [style.grid-template-rows]="gridRowStyle">
<!-- Grid areas that have a widget in them -->
- <div *ngFor="let area of layout.widgetAreas; trackBy: identifyGridArea;"
- class="grid--area -widgeted"
+ @for (area of layout.widgetAreas; track identifyGridArea($index, area)) {
+ <div
+ class="grid--area -widgeted"
[ngClass]="{'-dragged': drag.isDragged(area),
'-passive': drag.isPassive(area) || resize.isPassive(area),
'-resizing' : resize.isResized(area) }"
- [style.grid-row-start]="area.gridStartRow"
- [style.grid-row-end]="area.gridEndRow"
- [style.grid-column-start]="area.gridStartColumn"
- [style.grid-column-end]="area.gridEndColumn"
- cdkDropList
- [id]="area.guid"
- [cdkDropListData]="area"
- [cdkDropListConnectedTo]="layout.gridAreaIds">
- <div class="grid--area-content widget-box"
- cdkDrag
- (cdkDragStarted)="drag.start(area)"
- (cdkDragDropped)="drag.drop()"
- [cdkDragDisabled]="isMobileDevice || !drag.isDraggable">
-
- <ndc-dynamic [ndcDynamicComponent]="widgetComponent(area)"
- [ndcDynamicInputs]="widgetComponentInput(area)"
- [ndcDynamicOutputs]="widgetComponentOutput(area)">
- </ndc-dynamic>
- </div>
- <op-resizer *ngIf="resize.isResizable"
- [customHandler]="true"
- (resizeFinished)="resize.end(area)"
- (resizeStarted)="resize.start(area)"
- (move)="resize.moving()">
- <div class="grid--resizer">
- <i class="icon-resizer-bottom-right hidden-for-mobile"
- aria-hidden="true">
- </i>
+ [style.grid-row-start]="area.gridStartRow"
+ [style.grid-row-end]="area.gridEndRow"
+ [style.grid-column-start]="area.gridStartColumn"
+ [style.grid-column-end]="area.gridEndColumn"
+ cdkDropList
+ [id]="area.guid"
+ [cdkDropListData]="area"
+ [cdkDropListConnectedTo]="layout.gridAreaIds">
+ <div class="grid--area-content widget-box"
+ cdkDrag
+ (cdkDragStarted)="drag.start(area)"
+ (cdkDragDropped)="drag.drop()"
+ [cdkDragDisabled]="isMobileDevice || !drag.isDraggable">
+ <ndc-dynamic [ndcDynamicComponent]="widgetComponent(area)"
+ [ndcDynamicInputs]="widgetComponentInput(area)"
+ [ndcDynamicOutputs]="widgetComponentOutput(area)">
+ </ndc-dynamic>
</div>
- </op-resizer>
- </div>
+ @if (resize.isResizable) {
+ <op-resizer
+ [customHandler]="true"
+ (resizeFinished)="resize.end(area)"
+ (resizeStarted)="resize.start(area)"
+ (move)="resize.moving()">
+ <div class="grid--resizer">
+ <i class="icon-resizer-bottom-right hidden-for-mobile"
+ aria-hidden="true">
+ </i>
+ </div>
+ </op-resizer>
+ }
+ </div>
+ }
<!-- One grid area per cell (row x columns) -->
- <div *ngFor="let area of layout.gridAreas; trackBy: identifyGridArea;"
- class="grid--area hidden-for-mobile"
- [ngClass] = "{'-drop-target': drag.currentlyDragging,
- '-drop-only': drag.isDropOnlyArea(area),
- '-resize-target': resize.isTarget(area),
- '-addable': true,
- '-help-mode': layout.inHelpMode}"
- [style.grid-row-start]="area.gridStartRow"
- [style.grid-row-end]="area.gridEndRow"
- [style.grid-column-start]="area.gridStartColumn"
- [style.grid-column-end]="area.gridEndColumn"
- cdkDropList
- [id]="area.guid"
- tabindex="0"
- (mouseover)="layout.setMousedOverArea(area)"
- (focus)="layout.setMousedOverArea(area)"
- [cdkDropListData]="area"
- [cdkDropListConnectedTo]="layout.gridAreaIds">
- <div class="grid--widget-add"
- *ngIf="add.isAllowed"
- [title]="add.addText"
- tabindex="0"
- (click)="addWidget(area)"
- (keyup.enter)="addWidget(area)"
- (keyup.space)="addWidget(area)">
-
- <svg plus-icon size="small"></svg>
- <span
- class="grid--widget-add-help-text"
- [textContent]="add.addText">
- </span>
+ @for (area of layout.gridAreas; track identifyGridArea($index, area)) {
+ <div
+ class="grid--area hidden-for-mobile"
+ [ngClass] = "{'-drop-target': drag.currentlyDragging,
+ '-drop-only': drag.isDropOnlyArea(area),
+ '-resize-target': resize.isTarget(area),
+ '-addable': true,
+ '-help-mode': layout.inHelpMode}"
+ [style.grid-row-start]="area.gridStartRow"
+ [style.grid-row-end]="area.gridEndRow"
+ [style.grid-column-start]="area.gridStartColumn"
+ [style.grid-column-end]="area.gridEndColumn"
+ cdkDropList
+ [id]="area.guid"
+ tabindex="0"
+ (mouseover)="layout.setMousedOverArea(area)"
+ (focus)="layout.setMousedOverArea(area)"
+ [cdkDropListData]="area"
+ [cdkDropListConnectedTo]="layout.gridAreaIds">
+ @if (add.isAllowed) {
+ <div class="grid--widget-add"
+ [title]="add.addText"
+ tabindex="0"
+ (click)="addWidget(area)"
+ (keyup.enter)="addWidget(area)"
+ (keyup.space)="addWidget(area)">
+ <svg plus-icon size="small"></svg>
+ <span
+ class="grid--widget-add-help-text"
+ [textContent]="add.addText">
+ </span>
+ </div>
+ }
</div>
- </div>
+ }
- <div *ngFor="let gap of layout.gridGaps; trackBy: identifyGridArea;"
- class="grid--area -gap hidden-for-mobile"
- [ngClass] = "{'-addable': add.isAddable(gap),
- '-help-mode': layout.inHelpMode,
- '-row': gap.isRow,
- '-column': gap.isColumn}"
- [style.grid-row-start]="gap.gridStartRow"
- [style.grid-row-end]="gap.gridEndRow"
- [style.grid-column-start]="gap.gridStartColumn"
- [style.grid-column-end]="gap.gridEndColumn"
- [id]="gap.guid"
- tabindex="0"
- (mouseover)="layout.setMousedOverArea(gap)"
- (focus)="layout.setMousedOverArea(gap)">
- <div class="grid--widget-add -gap"
- *ngIf="add.isAllowed"
- [title]="add.addText"
- tabindex="0"
- (click)="addWidget(gap)"
- (keyup.enter)="addWidget(gap)"
- (keyup.space)="addWidget(gap)">
- <svg plus-icon size="small"></svg>
+ @for (gap of layout.gridGaps; track identifyGridArea($index, gap)) {
+ <div
+ class="grid--area -gap hidden-for-mobile"
+ [ngClass] = "{'-addable': add.isAddable(gap),
+ '-help-mode': layout.inHelpMode,
+ '-row': gap.isRow,
+ '-column': gap.isColumn}"
+ [style.grid-row-start]="gap.gridStartRow"
+ [style.grid-row-end]="gap.gridEndRow"
+ [style.grid-column-start]="gap.gridStartColumn"
+ [style.grid-column-end]="gap.gridEndColumn"
+ [id]="gap.guid"
+ tabindex="0"
+ (mouseover)="layout.setMousedOverArea(gap)"
+ (focus)="layout.setMousedOverArea(gap)">
+ @if (add.isAllowed) {
+ <div class="grid--widget-add -gap"
+ [title]="add.addText"
+ tabindex="0"
+ (click)="addWidget(gap)"
+ (keyup.enter)="addWidget(gap)"
+ (keyup.space)="addWidget(gap)">
+ <svg plus-icon size="small"></svg>
+ </div>
+ }
</div>
- </div>
+ }
<!-- Grid area used as a placeholder while dragging -->
- <div *ngIf="drag.placeholderArea"
- class="grid--area -widgeted -placeholder"
- [style.grid-row-start]="drag.placeholderArea.gridStartRow"
- [style.grid-row-end]="drag.placeholderArea.gridEndRow"
- [style.grid-column-start]="drag.placeholderArea.gridStartColumn"
- [style.grid-column-end]="drag.placeholderArea.gridEndColumn"
- [style.min-height.px]="drag.draggedHeight">
- <div class="widget-box">
+ @if (drag.placeholderArea) {
+ <div
+ class="grid--area -widgeted -placeholder"
+ [style.grid-row-start]="drag.placeholderArea.gridStartRow"
+ [style.grid-row-end]="drag.placeholderArea.gridEndRow"
+ [style.grid-column-start]="drag.placeholderArea.gridStartColumn"
+ [style.grid-column-end]="drag.placeholderArea.gridEndColumn"
+ [style.min-height.px]="drag.draggedHeight">
+ <div class="widget-box">
+ </div>
</div>
- </div>
+ }
</div>
diff --git a/frontend/src/app/shared/components/grids/grid/page/grid-page.component.html b/frontend/src/app/shared/components/grids/grid/page/grid-page.component.html
index 123a1d8e0f3..38e126c10e6 100644
--- a/frontend/src/app/shared/components/grids/grid/page/grid-page.component.html
+++ b/frontend/src/app/shared/components/grids/grid/page/grid-page.component.html
@@ -1 +1,3 @@
-<grid *ngIf="grid" [grid]="grid"></grid>
+@if (grid) {
+ <grid [grid]="grid"></grid>
+}
diff --git a/frontend/src/app/shared/components/grids/widgets/add/add.modal.html b/frontend/src/app/shared/components/grids/widgets/add/add.modal.html
index 270ffe16aae..ee535004b61 100644
--- a/frontend/src/app/shared/components/grids/widgets/add/add.modal.html
+++ b/frontend/src/app/shared/components/grids/widgets/add/add.modal.html
@@ -1,25 +1,26 @@
<div
class="spot-modal loading-indicator--location"
data-indicator-name="modal"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{text.title}}</div>
<div class="spot-divider"></div>
<div class="ngdialog-body spot-modal--body spot-container">
<ul class="spot-list">
- <li
- *ngFor="let widget of selectable;trackBy: trackWidgetBy"
- class="spot-list--item"
- data-test-selector="op-grid--addable-widget">
- <button
- type="button"
- class="spot-list--item-action"
- (click)="select($event, widget)"
- [id]="widget.identifier"
- [textContent]="widget.title"
- ></button>
- </li>
+ @for (widget of selectable; track trackWidgetBy($index, widget)) {
+ <li
+ class="spot-list--item"
+ data-test-selector="op-grid--addable-widget">
+ <button
+ type="button"
+ class="spot-list--item-action"
+ (click)="select($event, widget)"
+ [id]="widget.identifier"
+ [textContent]="widget.title"
+ ></button>
+ </li>
+ }
</ul>
</div>
@@ -31,7 +32,7 @@
(click)="closeMe()"
>
{{ text.cancel_button }}
- </button>
+ </button>
</div>
</div>
</div>
diff --git a/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text.component.html b/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text.component.html
index 7060aa01016..f2068fedc9b 100644
--- a/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text.component.html
@@ -10,52 +10,57 @@
<ng-template #text>
<span #displayContainer
- class="inline-edit--formattable-display-text -default">
- <div class="op-uc-container"
- *ngIf="!textEmpty"
- [innerHTML]="customText"></div>
- <div
- *ngIf="textEmpty"
+ class="inline-edit--formattable-display-text -default">
+ @if (!textEmpty) {
+ <div class="op-uc-container"
+ [innerHTML]="customText"></div>
+ }
+ @if (textEmpty) {
+ <div
[innerHTML]="placeholderText"></div>
+ }
</span>
</ng-template>
<div class="op-widget-box--body -custom-text -allow-inner-overflow">
<div class="inline-edit--container inplace-edit">
- <edit-form-portal
- *ngIf="active"
- [schemaInput]="schema"
- [changeInput]="changeset"
- [editFieldHandler]="handler"
- ></edit-form-portal>
+ @if (active) {
+ <edit-form-portal
+ [schemaInput]="schema"
+ [changeInput]="changeset"
+ [editFieldHandler]="handler"
+ ></edit-form-portal>
+ }
- <fieldset
- *ngIf="active"
- class="form--fieldset"
- >
- <legend class="form--fieldset-legend">
- {{ text.attachments }}
- </legend>
- <op-attachments [resource]="resource.grid"></op-attachments>
- </fieldset>
+ @if (active) {
+ <fieldset
+ class="form--fieldset"
+ >
+ <legend class="form--fieldset-legend">
+ {{ text.attachments }}
+ </legend>
+ <op-attachments [resource]="resource.grid"></op-attachments>
+ </fieldset>
+ }
- <div
- *ngIf="!active"
- class="inplace-edit--read wiki -no-label"
- [ngClass]="{'inline-edit--container': isTextEditable}"
- >
- <button
- type="button"
- *ngIf="isTextEditable"
- (click)="activate($event)"
- [ngClass]="inplaceEditClasses"
- >
- <ng-container *ngTemplateOutlet="text"></ng-container>
- </button>
-
- <ng-container *ngIf="!isTextEditable">
- <ng-container *ngTemplateOutlet="text"></ng-container>
- </ng-container>
- </div>
+ @if (!active) {
+ <div
+ class="inplace-edit--read wiki -no-label"
+ [ngClass]="{'inline-edit--container': isTextEditable}"
+ >
+ @if (isTextEditable) {
+ <button
+ type="button"
+ (click)="activate($event)"
+ [ngClass]="inplaceEditClasses"
+ >
+ <ng-container *ngTemplateOutlet="text"></ng-container>
+ </button>
+ }
+ @if (!isTextEditable) {
+ <ng-container *ngTemplateOutlet="text"></ng-container>
+ }
+ </div>
+ }
</div>
</div>
diff --git a/frontend/src/app/shared/components/grids/widgets/documents/documents.component.html b/frontend/src/app/shared/components/grids/widgets/documents/documents.component.html
index 212d707488d..1a6787b3a1f 100644
--- a/frontend/src/app/shared/components/grids/widgets/documents/documents.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/documents/documents.component.html
@@ -9,24 +9,27 @@
</widget-header>
<div class="op-widget-box--body">
- <op-no-results *ngIf="noEntries"
- [title]="text.noResults">
- </op-no-results>
- <ng-container *ngFor="let document of entries">
+ @if (noEntries) {
+ <op-no-results
+ [title]="text.noResults">
+ </op-no-results>
+ }
+ @for (document of entries; track document) {
<h4 class="document-category-elements--header">
<a [href]="documentPath(document)"
- [textContent]="document.title">
+ [textContent]="document.title">
</a>
- <span *ngIf="!currentProject.identifier">
+ @if (!currentProject.identifier) {
+ <span>
({{ text.project }}: {{ document.project.name }})
- </span>
+ </span>
+ }
</h4>
<p class="document-category-elements--date">
<em [textContent]="documentCreated(document)"></em>
</p>
-
<div class="wiki grid--widget-limited-text op-uc-container"
- [innerHtml]="documentDescription(document)">
+ [innerHtml]="documentDescription(document)">
</div>
- </ng-container>
+ }
</div>
diff --git a/frontend/src/app/shared/components/grids/widgets/header/header.component.html b/frontend/src/app/shared/components/grids/widgets/header/header.component.html
index 7a85da685ea..5e9139cdd25 100644
--- a/frontend/src/app/shared/components/grids/widgets/header/header.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/header/header.component.html
@@ -1,18 +1,20 @@
<h3 class="op-widget-box--header"
- data-test-selector="op-widget-box--header"
- [ngClass]="{ '-editable': isRenameable }">
- <svg *ngIf="drag.isDraggable"
- grabber-icon
- size="small"
- cdkDragHandle
- class="grid--area-drag-handle hidden-for-mobile"></svg>
+ data-test-selector="op-widget-box--header"
+ [ngClass]="{ '-editable': isRenameable }">
+ @if (drag.isDraggable) {
+ <svg
+ grabber-icon
+ size="small"
+ cdkDragHandle
+ class="grid--area-drag-handle hidden-for-mobile"></svg>
+ }
<ng-content select="[slot=prepend]"></ng-content>
<editable-toolbar-title [title]="name"
- (onSave)="renamed($event)"
- [editable]="isRenameable"
- class="op-widget-box--header-title">
+ (onSave)="renamed($event)"
+ [editable]="isRenameable"
+ class="op-widget-box--header-title">
</editable-toolbar-title>
<ng-content select="[slot=menu]"></ng-content>
diff --git a/frontend/src/app/shared/components/grids/widgets/members/members.component.html b/frontend/src/app/shared/components/grids/widgets/members/members.component.html
index 7753b35f0de..a4e67518fe6 100644
--- a/frontend/src/app/shared/components/grids/widgets/members/members.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/members/members.component.html
@@ -1,59 +1,68 @@
<widget-header
- [name]="widgetName"
- [editable]="isEditable">
+ [name]="widgetName"
+ [editable]="isEditable">
<attribute-help-text slot="prepend"
- attribute="members"
- [attributeScope]="'Project'"></attribute-help-text>
+ attribute="members"
+ [attributeScope]="'Project'"></attribute-help-text>
<widget-menu
- slot="menu"
- [resource]="resource">
+ slot="menu"
+ [resource]="resource">
</widget-menu>
</widget-header>
<div class="op-widget-box--body">
- <op-no-results *ngIf="noMembers"
- [title]="text.noResults">
- </op-no-results>
+ @if (noMembers) {
+ <op-no-results
+ [title]="text.noResults">
+ </op-no-results>
+ }
<div class="op-members-widget--attributes-map -minimal-keys">
- <ng-container *ngFor="let usersByRole of usersByRole">
+ @for (usersByRole of usersByRole; track usersByRole) {
<div class="attributes-map--key">
{{usersByRole.role.name}}
</div>
-
<div class="attributes-map--value">
- <ng-container *ngFor="let principal of usersByRole.users; let last = last">
- <op-principal
- [principal]="principal"
- size="mini"
- ></op-principal>
- <ng-container *ngIf="!last">, </ng-container>
- </ng-container>
+ @for (principal of usersByRole.users; track principal; let last = $last) {
+ <op-principal
+ [principal]="principal"
+ size="mini"
+ ></op-principal>
+ @if (!last) {
+ ,
+ }
+ }
</div>
- </ng-container>
- </div>
- <div *ngIf="moreMembers"
- class="op-members-widget--notification">
- {{moreMembersText}}
+ }
</div>
+ @if (moreMembers) {
+ <div
+ class="op-members-widget--notification">
+ {{moreMembersText}}
+ </div>
+ }
<div class="op-members-widget--grid--widget-footer">
- <a *ngIf="membersAddable$ | async"
- [href]="projectMembershipsPath + '?show_add_members=true'"
- class="button -primary">
- <i class="button--icon icon-add" aria-hidden="true"></i>
- <span class="button--text"
- [textContent]="text.add">
- </span>
- </a>
+ @if (membersAddable$ | async) {
+ <a
+ [href]="projectMembershipsPath + '?show_add_members=true'"
+ class="button -primary">
+ <i class="button--icon icon-add" aria-hidden="true"></i>
+ <span class="button--text"
+ [textContent]="text.add">
+ </span>
+ </a>
+ }
- <a *ngIf="!noMembers"
- [href]="projectMembershipsPath"
- class="button -highlight-inverted">
- <i class="button--icon icon-group" aria-hidden="true"></i>
- <span class="button--text"
- [textContent]="text.viewAll">
- </span>
- </a>
+ @if (!noMembers) {
+ <a
+ [href]="projectMembershipsPath"
+ class="button -highlight-inverted">
+ <i class="button--icon icon-group" aria-hidden="true"></i>
+ <span class="button--text"
+ [textContent]="text.viewAll">
+ </span>
+ </a>
+ }
</div>
</div>
diff --git a/frontend/src/app/shared/components/grids/widgets/menu/widget-menu.component.html b/frontend/src/app/shared/components/grids/widgets/menu/widget-menu.component.html
index 450fd0363d2..bc32cfb2f13 100644
--- a/frontend/src/app/shared/components/grids/widgets/menu/widget-menu.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/menu/widget-menu.component.html
@@ -1,4 +1,5 @@
-<icon-triggered-context-menu
- *ngIf="hasMenu"
+@if (hasMenu) {
+ <icon-triggered-context-menu
[menuItemsFactory]="menuItemsFactory">
-</icon-triggered-context-menu>
+ </icon-triggered-context-menu>
+}
diff --git a/frontend/src/app/shared/components/grids/widgets/news/news.component.html b/frontend/src/app/shared/components/grids/widgets/news/news.component.html
index e05c2c4aab2..47a99493682 100644
--- a/frontend/src/app/shared/components/grids/widgets/news/news.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/news/news.component.html
@@ -1,7 +1,7 @@
<widget-header
[name]="widgetName"
[editable]="isEditable"
->
+ >
<widget-menu
slot="menu"
@@ -10,41 +10,46 @@
</widget-header>
<div class="op-widget-box--body">
- <op-no-results
- *ngIf="noEntries"
- [title]="text.noResults"
- ></op-no-results>
+ @if (noEntries) {
+ <op-no-results
+ [title]="text.noResults"
+ ></op-no-results>
+ }
<ul class="widget-box--arrow-links">
- <li
- class="widget-box--arrow-multiline"
- *ngFor="let news of entries"
- >
- <op-principal
- *ngIf="news.author"
- [principal]="news.author"
- [hideName]="true"
- class="widget-box--avatar news-author-avatar hidden-for-mobile"
- ></op-principal>
- <div class="widget-box--project">
- <a
- [href]="newsProjectPath(news)"
- [textContent]="newsProjectName(news)"
- ></a>:
- <a
- [href]="newsPath(news)"
- [textContent]="news.title"
- ></a>
- </div>
- <div
- *ngIf="news.author"
- class="widget-box--author news-author"
- [innerHTML]="text.addedBy(news)"
- ></div>
- <p
- *ngIf="news.summary"
- [textContent]="news.summary"
- class="widget-box--additional-info"
- ></p>
- </li>
+ @for (news of entries; track news) {
+ <li
+ class="widget-box--arrow-multiline"
+ >
+ @if (news.author) {
+ <op-principal
+ [principal]="news.author"
+ [hideName]="true"
+ class="widget-box--avatar news-author-avatar hidden-for-mobile"
+ ></op-principal>
+ }
+ <div class="widget-box--project">
+ <a
+ [href]="newsProjectPath(news)"
+ [textContent]="newsProjectName(news)"
+ ></a>:
+ <a
+ [href]="newsPath(news)"
+ [textContent]="news.title"
+ ></a>
+ </div>
+ @if (news.author) {
+ <div
+ class="widget-box--author news-author"
+ [innerHTML]="text.addedBy(news)"
+ ></div>
+ }
+ @if (news.summary) {
+ <p
+ [textContent]="news.summary"
+ class="widget-box--additional-info"
+ ></p>
+ }
+ </li>
+ }
</ul>
</div>
diff --git a/frontend/src/app/shared/components/grids/widgets/project-description/project-description.component.html b/frontend/src/app/shared/components/grids/widgets/project-description/project-description.component.html
index 930683c7b83..56462b1c314 100644
--- a/frontend/src/app/shared/components/grids/widgets/project-description/project-description.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/project-description/project-description.component.html
@@ -3,20 +3,22 @@
[editable]="isEditable">
<attribute-help-text slot="prepend"
- attribute="description"
- [attributeScope]="'Project'"></attribute-help-text>
+ attribute="description"
+ [attributeScope]="'Project'"></attribute-help-text>
<widget-menu
- slot="menu"
- [resource]="resource">
+ slot="menu"
+ [resource]="resource">
</widget-menu>
</widget-header>
<div class="op-widget-box--body -allow-inner-overflow">
- <edit-form *ngIf="(project$ | async) as project"
- [resource]="project">
- <op-editable-attribute-field [resource]="project"
- fieldName="description">
- </op-editable-attribute-field>
- </edit-form>
+ @if ((project$ | async); as project) {
+ <edit-form
+ [resource]="project">
+ <op-editable-attribute-field [resource]="project"
+ fieldName="description">
+ </op-editable-attribute-field>
+ </edit-form>
+ }
</div>
diff --git a/frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.html b/frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.html
index b7e86384a3c..ac8a33733a4 100644
--- a/frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.html
@@ -8,33 +8,49 @@
</widget-menu>
</widget-header>
-<div *ngIf="(projects$ | async) as projects" class="op-widget-box--body">
- <div class="op-header-project-select--no-favorites" *ngIf="projects.length === 0">
- <svg
- class="op-header-project-select--no-favorites-icon"
- star-icon
- size="medium"
- ></svg>
- <p>
- <strong [textContent]="text.no_favorites"></strong>
- <br/>
- <span class="op-header-project-select--no-favorites-subtext"
- [textContent]="text.no_favorites_subtext"></span>
- </p>
- </div>
- <ng-container *ngIf="projects.length > 0">
- <ul class="op-widget-project-favorites--list">
- <li *ngFor="let project of projects">
+@if ((projects$ | async); as projects) {
+ <div class="op-widget-box--body">
+ @if (projects.length === 0) {
+ <div class="op-header-project-select--no-favorites">
<svg
- star-fill-icon
- class="op-primer--star-icon"
- size="small"
+ class="op-header-project-select--no-favorites-icon"
+ star-icon
+ size="medium"
></svg>
- <a
- class="op-widget-project-favorites--link"
- [href]="projectPath(project)"
- [textContent]="project.name">
- </a>
- </ul>
- </ng-container>
-</div>
+ <p>
+ <strong [textContent]="text.no_favorites"></strong>
+ <br/>
+ <span class="op-header-project-select--no-favorites-subtext"
+ [textContent]="text.no_favorites_subtext"></span>
+ </p>
+ </div>
+ }
+ @if (projects.length > 0) {
+ <ul class="op-widget-project-favorites--list">
+ @for (project of projects; track project) {
+ <li>
+ <svg
+ star-fill-icon
+ class="op-primer--star-icon"
+ size="small"
+ ></svg>
+ <a
+ class="op-widget-project-favorites--link"
+ [href]="projectPath(project)"
+ [textContent]="project.name">
+ </a>
+ }
+ <svg
+ star-fill-icon
+ class="op-primer--star-icon"
+ size="small"
+ ></svg>
+ <a
+ class="op-widget-project-favorites--link"
+ [href]="projectPath(project)"
+ [textContent]="project.name">
+ </a>
+ </ul>
+ }
+ </div>
+ }
diff --git a/frontend/src/app/shared/components/grids/widgets/project-status/project-status.component.html b/frontend/src/app/shared/components/grids/widgets/project-status/project-status.component.html
index c167ebe3b0a..17050361a46 100644
--- a/frontend/src/app/shared/components/grids/widgets/project-status/project-status.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/project-status/project-status.component.html
@@ -3,8 +3,8 @@
[editable]="isEditable">
<attribute-help-text slot="prepend"
- attribute="status"
- [attributeScope]="'Project'"></attribute-help-text>
+ attribute="status"
+ [attributeScope]="'Project'"></attribute-help-text>
<widget-menu
slot="menu"
@@ -13,17 +13,19 @@
</widget-header>
<div class="op-widget-box--body -allow-inner-overflow">
- <edit-form *ngIf="(project$ | async) as project" [resource]="project">
- <div class="project-status--container">
- <op-editable-attribute-field [resource]="project"
- fieldName="status"
- wrapperClasses="project-status--display-field">
- </op-editable-attribute-field>
- </div>
- <div class="project-status-explanation--container">
- <op-editable-attribute-field [resource]="project"
- fieldName="statusExplanation">
- </op-editable-attribute-field>
- </div>
- </edit-form>
+ @if ((project$ | async); as project) {
+ <edit-form [resource]="project">
+ <div class="project-status--container">
+ <op-editable-attribute-field [resource]="project"
+ fieldName="status"
+ wrapperClasses="project-status--display-field">
+ </op-editable-attribute-field>
+ </div>
+ <div class="project-status-explanation--container">
+ <op-editable-attribute-field [resource]="project"
+ fieldName="statusExplanation">
+ </op-editable-attribute-field>
+ </div>
+ </edit-form>
+ }
</div>
diff --git a/frontend/src/app/shared/components/grids/widgets/subprojects/subprojects.component.html b/frontend/src/app/shared/components/grids/widgets/subprojects/subprojects.component.html
index e9cb43c7927..2729f4d5abe 100644
--- a/frontend/src/app/shared/components/grids/widgets/subprojects/subprojects.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/subprojects/subprojects.component.html
@@ -1,21 +1,27 @@
<widget-header
- [name]="widgetName"
- [editable]="isEditable">
+ [name]="widgetName"
+ [editable]="isEditable">
<widget-menu
- slot="menu"
- [resource]="resource">
+ slot="menu"
+ [resource]="resource">
</widget-menu>
</widget-header>
<div class="op-widget-box--body">
- <op-no-results *ngIf="noEntries"
- [title]="text.noResults">
- </op-no-results>
- <span *ngFor="let project of projects; let last = last">
- <a [href]="projectPath(project)"
- [textContent]="projectName(project)">
- </a>
- <span *ngIf="!last">, </span>
- </span>
+ @if (noEntries) {
+ <op-no-results
+ [title]="text.noResults">
+ </op-no-results>
+ }
+ @for (project of projects; track project; let last = $last) {
+ <span>
+ <a [href]="projectPath(project)"
+ [textContent]="projectName(project)">
+ </a>
+ @if (!last) {
+ <span>, </span>
+ }
+ </span>
+ }
</div>
diff --git a/frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.html b/frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.html
index 1a2bade53e3..795e9381e47 100644
--- a/frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.html
+++ b/frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.html
@@ -1,20 +1,22 @@
<div class="spot-modal"
- data-indicator-name="modal"
- tabindex="0">
+ data-indicator-name="modal"
+ tabindex="0">
<div id="spotModalTitle" class="spot-modal--header">{{text.displayedDays}}</div>
<div class="spot-divider"></div>
<div class="spot-modal--body spot-container">
- <div class="form--field -trailing-label" *ngFor="let day of days; let index = index">
- <label class="form--label" [textContent]="day.weekDay" [htmlFor]="'day_' + index"></label>
- <span class="form--field-container">
- <span class="form--check-box-container">
- <input type="checkbox" [id]="'day_' + index" name="days" class="form--check-box" [(ngModel)]="day.checked">
+ @for (day of days; track day; let index = $index) {
+ <div class="form--field -trailing-label">
+ <label class="form--label" [textContent]="day.weekDay" [htmlFor]="'day_' + index"></label>
+ <span class="form--field-container">
+ <span class="form--check-box-container">
+ <input type="checkbox" [id]="'day_' + index" name="days" class="form--check-box" [(ngModel)]="day.checked">
+ </span>
</span>
- </span>
- </div>
+ </div>
+ }
</div>
<div class="spot-action-bar">
diff --git a/frontend/src/app/shared/components/grids/widgets/time-entries/list/time-entries-list.component.html b/frontend/src/app/shared/components/grids/widgets/time-entries/list/time-entries-list.component.html
index 1acbdd7ae62..45c2f1db4ba 100644
--- a/frontend/src/app/shared/components/grids/widgets/time-entries/list/time-entries-list.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/time-entries/list/time-entries-list.component.html
@@ -1,117 +1,136 @@
<widget-header
- [name]="widgetName"
- [editable]="isEditable">
+ [name]="widgetName"
+ [editable]="isEditable">
<widget-menu
- slot="menu"
- [resource]="resource">
+ slot="menu"
+ [resource]="resource">
</widget-menu>
</widget-header>
<div class="op-widget-box--body">
- <op-no-results *ngIf="noEntries"
- [title]="text.noResults">
- </op-no-results>
+ @if (noEntries) {
+ <op-no-results
+ [title]="text.noResults">
+ </op-no-results>
+ }
- <ng-container *ngIf="!noEntries">
+ @if (!noEntries) {
<div class="total-hours">
<p>Total: <span [textContent]="total"></span></p>
</div>
-
- <div class="generic-table--results-container" *ngIf="entriesLoaded && anyEntries">
- <table class="generic-table time-entries">
- <colgroup>
- <col>
- <col>
+ @if (entriesLoaded && anyEntries) {
+ <div class="generic-table--results-container">
+ <table class="generic-table time-entries">
+ <colgroup>
<col>
- <col>
- <col data-highlight="false">
- </colgroup>
- <thead class="-sticky">
- <tr>
- <th>
- <div class="generic-table--sort-header-outer">
- <div class="generic-table--sort-header">
- <span [textContent]="schema.activity.name"></span>
- </div>
- </div>
- </th>
- <th>
- <div class="generic-table--sort-header-outer">
- <div class="generic-table--sort-header">
- <span [textContent]="schema.entity.name"></span>
- </div>
- </div>
- </th>
- <th>
- <div class="generic-table--sort-header-outer">
- <div class="generic-table--sort-header">
- <span [textContent]="schema.comment.name"></span>
- </div>
- </div>
- </th>
- <th>
- <div class="generic-table--sort-header-outer">
- <div class="generic-table--sort-header">
- <span [textContent]="schema.hours.name"></span>
- </div>
- </div>
- </th>
- <th><div class="generic-table--empty-header"></div></th>
- </tr>
- </thead>
- <tbody>
- <tr class="time-entry" *ngFor="let item of rows">
- <td class="activity"
- *ngIf="item.entry"
- [textContent]="activityName(item.entry)">
- </td>
- <td colspan="3"
- *ngIf="item.sum">
- <strong [textContent]="item.date"></strong>
- </td>
- <td class="subject"
- *ngIf="item.entry && item.entry.entity">
- {{projectName(item.entry)}} - <a [href]="entityPath(item.entry)" [textContent]="entityName(item.entry)"></a>
- </td>
- <td class="subject"
- *ngIf="item.entry && !item.entry.entity"
- [textContent]="projectName(item.entry)">
- </td>
- <td class="comments"
- *ngIf="item.entry"
- [textContent]="comment(item.entry)">
- </td>
- <td class="hours"
- *ngIf="item.entry"
- [textContent]="hours(item.entry)">
- </td>
- <td class="hours"
- *ngIf="item.sum">
- <em [textContent]="item.sum"></em>
- </td>
- <td class="buttons">
- <a *ngIf="item.entry && item.entry.updateImmediately"
- (click)="editTimeEntry(item.entry)"
- (keyup.enter)="editTimeEntry(item.entry)"
- (keyup.space)="editTimeEntry(item.entry)"
- tabindex="0"
- [title]="text.edit"
- attr.data-test-selector="edit-time-entry-{{ item.entry.id }}">
- <op-icon icon-classes="icon-context icon-edit"></op-icon>
- </a>
- <a *ngIf="item.entry && item.entry.delete"
- tabindex="0"
- (click)="deleteIfConfirmed($event, item.entry)"
- (keyup.enter)="deleteIfConfirmed($event, item.entry)"
- (keyup.space)="deleteIfConfirmed($event, item.entry)"
- [title]="text.delete">
- <op-icon icon-classes="icon-context icon-delete"></op-icon>
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </ng-container>
-</div>
+ <col>
+ <col>
+ <col>
+ <col data-highlight="false">
+ </colgroup>
+ <thead class="-sticky">
+ <tr>
+ <th>
+ <div class="generic-table--sort-header-outer">
+ <div class="generic-table--sort-header">
+ <span [textContent]="schema.activity.name"></span>
+ </div>
+ </div>
+ </th>
+ <th>
+ <div class="generic-table--sort-header-outer">
+ <div class="generic-table--sort-header">
+ <span [textContent]="schema.entity.name"></span>
+ </div>
+ </div>
+ </th>
+ <th>
+ <div class="generic-table--sort-header-outer">
+ <div class="generic-table--sort-header">
+ <span [textContent]="schema.comment.name"></span>
+ </div>
+ </div>
+ </th>
+ <th>
+ <div class="generic-table--sort-header-outer">
+ <div class="generic-table--sort-header">
+ <span [textContent]="schema.hours.name"></span>
+ </div>
+ </div>
+ </th>
+ <th><div class="generic-table--empty-header"></div></th>
+ </tr>
+ </thead>
+ <tbody>
+ @for (item of rows; track item) {
+ <tr class="time-entry">
+ @if (item.entry) {
+ <td class="activity"
+ [textContent]="activityName(item.entry)">
+ </td>
+ }
+ @if (item.sum) {
+ <td colspan="3"
+ >
+ <strong [textContent]="item.date"></strong>
+ </td>
+ }
+ @if (item.entry && item.entry.entity) {
+ <td class="subject"
+ >
+ {{projectName(item.entry)}} - <a [href]="entityPath(item.entry)" [textContent]="entityName(item.entry)"></a>
+ </td>
+ }
+ @if (item.entry && !item.entry.entity) {
+ <td class="subject"
+ [textContent]="projectName(item.entry)">
+ </td>
+ }
+ @if (item.entry) {
+ <td class="comments"
+ [textContent]="comment(item.entry)">
+ </td>
+ }
+ @if (item.entry) {
+ <td class="hours"
+ [textContent]="hours(item.entry)">
+ </td>
+ }
+ @if (item.sum) {
+ <td class="hours"
+ >
+ <em [textContent]="item.sum"></em>
+ </td>
+ }
+ <td class="buttons">
+ @if (item.entry && item.entry.updateImmediately) {
+ <a
+ (click)="editTimeEntry(item.entry)"
+ (keyup.enter)="editTimeEntry(item.entry)"
+ (keyup.space)="editTimeEntry(item.entry)"
+ tabindex="0"
+ [title]="text.edit"
+ attr.data-test-selector="edit-time-entry-{{ item.entry.id }}">
+ <op-icon icon-classes="icon-context icon-edit"></op-icon>
+ </a>
+ }
+ @if (item.entry && item.entry.delete) {
+ <a
+ tabindex="0"
+ (click)="deleteIfConfirmed($event, item.entry)"
+ (keyup.enter)="deleteIfConfirmed($event, item.entry)"
+ (keyup.space)="deleteIfConfirmed($event, item.entry)"
+ [title]="text.delete">
+ <op-icon icon-classes="icon-context icon-delete"></op-icon>
+ </a>
+ }
+ </td>
+ </tr>
+ }
+ </tbody>
+ </table>
+ </div>
+ }
+ }
+ </div>
diff --git a/frontend/src/app/shared/components/grids/widgets/wp-calendar/wp-calendar.component.html b/frontend/src/app/shared/components/grids/widgets/wp-calendar/wp-calendar.component.html
index e1dea51fdf7..7329872bd03 100644
--- a/frontend/src/app/shared/components/grids/widgets/wp-calendar/wp-calendar.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/wp-calendar/wp-calendar.component.html
@@ -9,15 +9,17 @@
</widget-header>
<div class="op-widget-box--body">
- <ng-container *ngIf="{hasCapability: hasCapability$ | async} as context">
- <div class="op-toast -error" *ngIf="context.hasCapability === false">
- <span [textContent]="text.missing_permission"></span>
- </div>
-
- <op-wp-calendar
- *ngIf="context.hasCapability === true"
- [showMeetings]="true"
- [static]="true"
- ></op-wp-calendar>
- </ng-container>
+ @if ({hasCapability: hasCapability$ | async}; as context) {
+ @if (context.hasCapability === false) {
+ <div class="op-toast -error">
+ <span [textContent]="text.missing_permission"></span>
+ </div>
+ }
+ @if (context.hasCapability === true) {
+ <op-wp-calendar
+ [showMeetings]="true"
+ [static]="true"
+ ></op-wp-calendar>
+ }
+ }
</div>
diff --git a/frontend/src/app/shared/components/grids/widgets/wp-table/wp-table.component.html b/frontend/src/app/shared/components/grids/widgets/wp-table/wp-table.component.html
index 11e96d33e01..ab6876bb29d 100644
--- a/frontend/src/app/shared/components/grids/widgets/wp-table/wp-table.component.html
+++ b/frontend/src/app/shared/components/grids/widgets/wp-table/wp-table.component.html
@@ -8,8 +8,10 @@
</widget-header>
<div class="op-widget-box--body">
- <wp-embedded-table [queryId]="queryId"
- [configuration]="configuration"
- *ngIf="queryId">
- </wp-embedded-table>
+ @if (queryId) {
+ <wp-embedded-table [queryId]="queryId"
+ [configuration]="configuration"
+ >
+ </wp-embedded-table>
+ }
</div>
diff --git a/frontend/src/app/shared/components/header-project-select/header-project-select.component.html b/frontend/src/app/shared/components/header-project-select/header-project-select.component.html
index 3c586fb5fa3..c104b30ff2f 100644
--- a/frontend/src/app/shared/components/header-project-select/header-project-select.component.html
+++ b/frontend/src/app/shared/components/header-project-select/header-project-select.component.html
@@ -4,7 +4,7 @@
(closed)="close()"
alignment="bottom-start"
class="op-project-list-modal"
->
+ >
<button
id="projects-menu"
accesskey="5"
@@ -14,7 +14,7 @@
slot="trigger"
(click)="toggleDropModal()"
data-test-selector="op-projects-menu"
- >
+ >
<span
class="ellipsis"
[textContent]="currentProjectName()"
@@ -30,97 +30,102 @@
[textContent]="text.project.plural"
></h1>
- <spot-toggle
- *ngIf="this.currentUserService.isLoggedIn"
- [options]="displayModeOptions"
- [ngModel]="displayMode"
- (ngModelChange)="displayModeChange($event)"
- ></spot-toggle>
+ @if (this.currentUserService.isLoggedIn) {
+ <spot-toggle
+ [options]="displayModeOptions"
+ [ngModel]="displayMode"
+ (ngModelChange)="displayModeChange($event)"
+ ></spot-toggle>
+ }
</div>
- <div
- class="op-project-list-modal--body spot-container"
- data-searchable-list-parent="true"
- *ngIf="projects$ | async as projects"
- >
- <spot-text-field
- *ngIf="displayMode !== 'favorited' || (favorites$ | async)?.length > 0"
- [placeholder]="displayMode === 'favorited' ? text.search_favorites_placeholder : text.search_placeholder"
- [(ngModel)]="searchableProjectListService.searchText"
- [ngModelOptions]="{standalone: true}"
- data-test-selector="op-header-project-select--search"
- data-modal-focus-catcher-container="true"
- (keydown)="searchableProjectListService.onKeydown($event, projects)"
- (inputFocus)="textFieldFocused = true"
- (inputBlur)="textFieldFocused = false"
- >
- <span
- slot="before"
- class="spot-icon spot-icon_search"
- ></span>
- </spot-text-field>
-
- <ng-container *ngIf="(loading$ | async) === false; else loadingTemplate">
- <ul
- *ngIf="anyProjectsFound(projects, (favorites$ | async)); else noResultsTemplate"
- op-header-project-select-list
- class="spot-list_active"
- [projects]="projects"
- [displayMode]="displayMode"
- [favorited]="favorites$ | async"
- [searchText]="searchableProjectListService.searchText"
- [root]="true"
- data-list-root="true"
- data-test-selector="op-header-project-select--list"
- ></ul>
-
- <ng-template #noResultsTemplate>
- <div *ngIf="displayMode === 'favorited' && (favorites$ | async).length === 0"
- class="op-header-project-select--no-favorites"
- >
- <svg
- class="op-header-project-select--no-favorites-icon"
- star-icon
- size="medium"
- ></svg>
- <p>
- <strong [textContent]="text.no_favorites"></strong>
- <br/>
- <span class="op-header-project-select--no-favorites-subtext"
- [textContent]="text.no_favorites_subtext"></span>
- </p>
- </div>
- <span *ngIf="!(displayMode === 'favorited' && (favorites$ | async).length === 0)"
- class="op-project-list-modal--no-results">
- {{ displayMode === 'favorited' ? text.no_favorite_results : text.no_results }}
- </span>
- </ng-template>
- </ng-container>
-
+ @if (projects$ | async; as projects) {
<div
- *ngIf="!portfolioModelsEnabled"
- class="spot-action-bar">
- <div class="spot-action-bar--right">
- <a
- class="button spot-action-bar--action"
- [href]="allProjectsPath()"
- >
- <span class="spot-icon spot-icon_unordered-list"></span>
- <span [textContent]="text.project.list"></span>
- </a>
- <a
- *ngIf="canCreateNewProjects$ | async"
- class="button -primary spot-action-bar--action"
- [href]="newProjectPath()"
- >
- <span class="spot-icon spot-icon_add"></span>
- <span [textContent]="text.project.singular"></span>
- </a>
- </div>
+ class="op-project-list-modal--body spot-container"
+ data-searchable-list-parent="true"
+ >
+ @if (displayMode !== 'favorited' || (favorites$ | async)?.length > 0) {
+ <spot-text-field
+ [placeholder]="displayMode === 'favorited' ? text.search_favorites_placeholder : text.search_placeholder"
+ [(ngModel)]="searchableProjectListService.searchText"
+ [ngModelOptions]="{standalone: true}"
+ data-test-selector="op-header-project-select--search"
+ data-modal-focus-catcher-container="true"
+ (keydown)="searchableProjectListService.onKeydown($event, projects)"
+ (inputFocus)="textFieldFocused = true"
+ (inputBlur)="textFieldFocused = false"
+ >
+ <span
+ slot="before"
+ class="spot-icon spot-icon_search"
+ ></span>
+ </spot-text-field>
+ }
+ @if ((loading$ | async) === false) {
+ @if (anyProjectsFound(projects, (favorites$ | async))) {
+ <ul
+ op-header-project-select-list
+ class="spot-list_active"
+ [projects]="projects"
+ [displayMode]="displayMode"
+ [favorited]="favorites$ | async"
+ [searchText]="searchableProjectListService.searchText"
+ [root]="true"
+ data-list-root="true"
+ data-test-selector="op-header-project-select--list"
+ ></ul>
+ } @else {
+ @if (displayMode === 'favorited' && (favorites$ | async).length === 0) {
+ <div
+ class="op-header-project-select--no-favorites"
+ >
+ <svg
+ class="op-header-project-select--no-favorites-icon"
+ star-icon
+ size="medium"
+ ></svg>
+ <p>
+ <strong [textContent]="text.no_favorites"></strong>
+ <br/>
+ <span class="op-header-project-select--no-favorites-subtext"
+ [textContent]="text.no_favorites_subtext"></span>
+ </p>
+ </div>
+ }
+ @if (!(displayMode === 'favorited' && (favorites$ | async).length === 0)) {
+ <span
+ class="op-project-list-modal--no-results">
+ {{ displayMode === 'favorited' ? text.no_favorite_results : text.no_results }}
+ </span>
+ }
+ }
+ } @else {
+ <op-loading-project-list class="op-project-list-modal--loading"></op-loading-project-list>
+ }
+ @if (!portfolioModelsEnabled) {
+ <div
+ class="spot-action-bar">
+ <div class="spot-action-bar--right">
+ <a
+ class="button spot-action-bar--action"
+ [href]="allProjectsPath()"
+ >
+ <span class="spot-icon spot-icon_unordered-list"></span>
+ <span [textContent]="text.project.list"></span>
+ </a>
+ @if (canCreateNewProjects$ | async) {
+ <a
+ class="button -primary spot-action-bar--action"
+ [href]="newProjectPath()"
+ >
+ <span class="spot-icon spot-icon_add"></span>
+ <span [textContent]="text.project.singular"></span>
+ </a>
+ }
+ </div>
+ </div>
+ }
</div>
- </div>
+ }
</ng-container>
- <ng-template #loadingTemplate>
- <op-loading-project-list class="op-project-list-modal--loading"></op-loading-project-list>
- </ng-template>
</spot-drop-modal>
diff --git a/frontend/src/app/shared/components/header-project-select/list/header-project-select-list.component.html b/frontend/src/app/shared/components/header-project-select/list/header-project-select-list.component.html
index a8fbfc6c522..e34370fc176 100644
--- a/frontend/src/app/shared/components/header-project-select/list/header-project-select-list.component.html
+++ b/frontend/src/app/shared/components/header-project-select/list/header-project-select-list.component.html
@@ -1,68 +1,71 @@
-<li
- class="spot-list--item"
- *ngFor="let project of filteredProjects; index as i; first as isFirst; last as isLast"
- data-test-selector="op-header-project-select--item"
- [attr.data-list-selector]="projectListItemIdentifier"
->
- <a
- tabindex="-1"
- *ngIf="!project.disabled"
- class="spot-list--item-action"
- [ngClass]="{
- 'spot-list--item-action_disabled': project.disabled,
- 'spot-list--item-action_active': (searchableProjectListService.selectedItemID$ | async) === project.id
- }"
- [href]="extendedUrl(project.identifier)"
- [attr.data-list-selector]="projectListActionIdentifier"
- [attr.data-project-id]="project.id"
- [attr.data-test-selector]="currentProjectService.id === project.id.toString() ? 'op-header-project-select--active-item' : null"
- >
- <span
- class="spot-list--item-title spot-list--item-title_ellipse-text"
- data-test-selector="op-header-project-select--item-title"
+@for (project of filteredProjects; track project; let i = $index; let isFirst = $first; let isLast = $last) {
+ <li
+ class="spot-list--item"
+ data-test-selector="op-header-project-select--item"
+ [attr.data-list-selector]="projectListItemIdentifier"
>
- <span
- [opSearchHighlight]="searchText"
- [textContent]="project.name"></span>
-
- <svg
- *ngIf="favorited?.includes(project.id.toString())"
- star-fill-icon
- class="op-primer--star-icon"
- size="small"
- ></svg>
- </span>
-
- <a
- [href]="extendedUrl(null)"
- *ngIf="currentProjectService.id === project.id.toString()"
- data-test-selector="op-header-project-select--item-remove-icon"
- >
- <svg
- x-circle-icon
- size="small"
- ></svg></a>
- </a>
- <span
- *ngIf="project.disabled"
- class="spot-list--item-action spot-list--item-action_disabled"
- [ngClass]="{
- 'spot-list--item-action_active': (searchableProjectListService.selectedItemID$ | async) === project.id
- }"
- >
- <span
- class="spot-list--item-title spot-list--item-title_ellipse-text"
- data-test-selector="op-header-project-select--item-disabled-title"
- >{{ project.name }}</span>
- </span>
-
- <ul
- *ngIf="project.children.length"
- op-header-project-select-list
- [projects]="project.children"
- [displayMode]="displayMode"
- [favorited]="favorited"
- [selected]="selected"
- [searchText]="searchText"
- ></ul>
-</li>
+ @if (!project.disabled) {
+ <a
+ tabindex="-1"
+ class="spot-list--item-action"
+ [ngClass]="{
+ 'spot-list--item-action_disabled': project.disabled,
+ 'spot-list--item-action_active': (searchableProjectListService.selectedItemID$ | async) === project.id
+ }"
+ [href]="extendedUrl(project.identifier)"
+ [attr.data-list-selector]="projectListActionIdentifier"
+ [attr.data-project-id]="project.id"
+ [attr.data-test-selector]="currentProjectService.id === project.id.toString() ? 'op-header-project-select--active-item' : null"
+ >
+ <span
+ class="spot-list--item-title spot-list--item-title_ellipse-text"
+ data-test-selector="op-header-project-select--item-title"
+ >
+ <span
+ [opSearchHighlight]="searchText"
+ [textContent]="project.name"></span>
+ @if (favorited?.includes(project.id.toString())) {
+ <svg
+ star-fill-icon
+ class="op-primer--star-icon"
+ size="small"
+ ></svg>
+ }
+ </span>
+ @if (currentProjectService.id === project.id.toString()) {
+ <a
+ [href]="extendedUrl(null)"
+ data-test-selector="op-header-project-select--item-remove-icon"
+ >
+ <svg
+ x-circle-icon
+ size="small"
+ ></svg></a>
+ }
+ </a>
+ }
+ @if (project.disabled) {
+ <span
+ class="spot-list--item-action spot-list--item-action_disabled"
+ [ngClass]="{
+ 'spot-list--item-action_active': (searchableProjectListService.selectedItemID$ | async) === project.id
+ }"
+ >
+ <span
+ class="spot-list--item-title spot-list--item-title_ellipse-text"
+ data-test-selector="op-header-project-select--item-disabled-title"
+ >{{ project.name }}</span>
+ </span>
+ }
+ @if (project.children.length) {
+ <ul
+ op-header-project-select-list
+ [projects]="project.children"
+ [displayMode]="displayMode"
+ [favorited]="favorited"
+ [selected]="selected"
+ [searchText]="searchText"
+ ></ul>
+ }
+ </li>
+ }
diff --git a/frontend/src/app/shared/components/icon/icon.component.ts b/frontend/src/app/shared/components/icon/icon.component.ts
index 5e9f3df2a65..0f41a7ec501 100644
--- a/frontend/src/app/shared/components/icon/icon.component.ts
+++ b/frontend/src/app/shared/components/icon/icon.component.ts
@@ -33,13 +33,15 @@ import { Component, Input } from '@angular/core';
host: { class: 'op-icon--wrapper' },
template: `
<i [ngClass]="iconClasses"
- [attr.title]="iconTitle || undefined"
- aria-hidden="true"></i>
- <span
- class="sr-only"
- [textContent]="iconTitle"
- *ngIf="iconTitle"></span>
- `,
+ [attr.title]="iconTitle || undefined"
+ aria-hidden="true"></i>
+ @if (iconTitle) {
+ <span
+ class="sr-only"
+ [textContent]="iconTitle"
+ ></span>
+ }
+ `,
standalone: false,
})
export class OpIconComponent {
diff --git a/frontend/src/app/shared/components/modal/modal-banner/modal-banner.component.html b/frontend/src/app/shared/components/modal/modal-banner/modal-banner.component.html
index 290cbaa3a05..cb3a8df8a11 100644
--- a/frontend/src/app/shared/components/modal/modal-banner/modal-banner.component.html
+++ b/frontend/src/app/shared/components/modal/modal-banner/modal-banner.component.html
@@ -2,18 +2,20 @@
class="op-modal-banner"
ngClass="op-modal-banner_{{ type }}"
attr.data-test-selector="op-modal-banner-{{ type }}"
->
- <span
- *ngIf="type === 'info'"
- class="spot-icon spot-icon_info1 hidden-for-mobile"
- ></span>
- <span
- *ngIf="type === 'warning'"
- class="spot-icon spot-icon_warning hidden-for-mobile"
- ></span>
+ >
+ @if (type === 'info') {
+ <span
+ class="spot-icon spot-icon_info1 hidden-for-mobile"
+ ></span>
+ }
+ @if (type === 'warning') {
+ <span
+ class="spot-icon spot-icon_warning hidden-for-mobile"
+ ></span>
+ }
<p
class="op-modal-banner--text spot-caption"
- >
+ >
<span
class="op-modal-banner--title spot-caption spot-caption_bold"
[textContent]="title"
@@ -25,13 +27,14 @@
></span>
</p>
- <button
- *ngIf="!!actionButton"
- class="op-modal-banner--button button"
- type="button"
- (click)="buttonClicked.emit($event)"
- >
- <op-icon icon-classes="button--icon {{ actionButtonClasses }}"></op-icon>
- <span class="button--text" [textContent]="actionButton"></span>
- </button>
+ @if (!!actionButton) {
+ <button
+ class="op-modal-banner--button button"
+ type="button"
+ (click)="buttonClicked.emit($event)"
+ >
+ <op-icon icon-classes="button--icon {{ actionButtonClasses }}"></op-icon>
+ <span class="button--text" [textContent]="actionButton"></span>
+ </button>
+ }
</div>
diff --git a/frontend/src/app/shared/components/modal/modal-overlay.component.html b/frontend/src/app/shared/components/modal/modal-overlay.component.html
index 6de0972e67f..a603fb5a5c5 100644
--- a/frontend/src/app/shared/components/modal/modal-overlay.component.html
+++ b/frontend/src/app/shared/components/modal/modal-overlay.component.html
@@ -12,14 +12,15 @@
role="dialog"
aria-modal="true"
aria-labelledby="spotModalTitle"
->
- <button
- *ngIf="(activeModalInstance$ | async)?.showCloseButton !== false"
- type="button"
- class="spot-button spot-modal-overlay--close-button"
- (click)="close($event)"
>
- <span class="spot-icon spot-icon_close"></span>
- </button>
+ @if ((activeModalInstance$ | async)?.showCloseButton !== false) {
+ <button
+ type="button"
+ class="spot-button spot-modal-overlay--close-button"
+ (click)="close($event)"
+ >
+ <span class="spot-icon spot-icon_close"></span>
+ </button>
+ }
<ng-template cdkPortalOutlet></ng-template>
</div>
diff --git a/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.html b/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.html
index 094602a4f66..c67271750b9 100644
--- a/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.html
+++ b/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.html
@@ -5,39 +5,43 @@
cdkFocusInitial
cdkTrapFocus
[cdkTrapFocusAutoCapture]="true"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{text.title}}</div>
- <div *ngIf="divideContent" class="spot-divider"></div>
+ @if (divideContent) {
+ <div class="spot-divider"></div>
+ }
<div class="spot-modal--body spot-container">
<span class="op-confirm-dialog--text spot-body-small"
- [textContent]="text.text"
+ [textContent]="text.text"
></span>
- <ng-container *ngIf="showListData; else showData">
+ @if (showListData) {
<span class="op-confirm-dialog--text spot-body-small"
- [textContent]="listTitle"
- ></span>
+ [textContent]="listTitle"
+ ></span>
<ul class="op-confirm-dialog--list">
- <li *ngFor="let data of passedData" class="spot-body-small">
- <span>{{data}}</span>
- </li>
+ @for (data of passedData; track data) {
+ <li class="spot-body-small">
+ <span>{{data}}</span>
+ </li>
+ }
</ul>
- </ng-container>
+ } @else {
+ @for (data of passedData; track data) {
+ <span
+ class="spot-body-small"
+ >
+ <br/>
+ <strong>{{data}}</strong>
+ </span>
+ }
+ }
- <ng-template #showData>
- <span
- *ngFor="let data of passedData"
- class="spot-body-small"
- >
- <br/>
- <strong>{{data}}</strong>
- </span>
- </ng-template>
<span class="op-confirm-dialog--text spot-body-small"
- [innerHtml]="warningText"
+ [innerHtml]="warningText"
></span>
</div>
@@ -49,8 +53,10 @@
class="button spot-modal--cancel-button spot-action-bar--action"
data-test-selector="confirmation-modal--cancel"
(click)="close($event)"
- >
- <span *ngIf="icon.cancel as clazz" class="spot-icon spot-icon_{{clazz}}"></span>
+ >
+ @if (icon.cancel; as clazz) {
+ <span class="spot-icon spot-icon_{{clazz}}"></span>
+ }
<span>{{text.button_cancel}}</span>
</button>
<button
@@ -59,8 +65,10 @@
data-test-selector="confirmation-modal--confirmed"
[ngClass]="dangerHighlighting ? '-danger': '-primary'"
(click)="confirmAndClose($event)"
- >
- <span *ngIf="icon.continue as clazz" class="spot-icon spot-icon_{{clazz}}"></span>
+ >
+ @if (icon.continue; as clazz) {
+ <span class="spot-icon spot-icon_{{clazz}}"></span>
+ }
<span>{{text.button_continue}}</span>
</button>
</div>
diff --git a/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.html b/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.html
index 476796341d1..08a975ab384 100644
--- a/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.html
+++ b/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.html
@@ -2,7 +2,7 @@
class="spot-modal spot-modal_autoheight loading-indicator--location"
(submit)="applyAndClose($event)"
data-indicator-name="modal"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{text.title}}</div>
<div class="spot-divider"></div>
@@ -26,12 +26,14 @@
(change)="selectedType = $event.target.value"
class="form--select">
<option [textContent]="text.none"
- [selected]="!selectedType"
- [value]=""></option>
- <option *ngFor="let type of availableTypes"
- [textContent]="type.name"
- [selected]="selectedType === type.name"
- [value]="type.name"></option>
+ [selected]="!selectedType"
+ [value]=""></option>
+ @for (type of availableTypes; track type) {
+ <option
+ [textContent]="type.name"
+ [selected]="selectedType === type.name"
+ [value]="type.name"></option>
+ }
</select>
</div>
</div>
@@ -49,7 +51,7 @@
(change)="buttonStyle = $event.target.checked"
[checked]="buttonStyle"
name="button_style"
- />
+ />
</div>
{{ text.button_style }}
</label>
diff --git a/frontend/src/app/shared/components/modals/get-ical-url-modal/query-get-ical-url.modal.html b/frontend/src/app/shared/components/modals/get-ical-url-modal/query-get-ical-url.modal.html
index 4a62a7c8fbc..1db7987a650 100644
--- a/frontend/src/app/shared/components/modals/get-ical-url-modal/query-get-ical-url.modal.html
+++ b/frontend/src/app/shared/components/modals/get-ical-url-modal/query-get-ical-url.modal.html
@@ -2,7 +2,7 @@
class="spot-modal loading-indicator--location op-query-get-ical-url"
[formGroup]="tokenNameForm"
(submit)="generateAndCopyUrl()"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{text.label_ical_sharing}}</div>
<div class="spot-divider"></div>
@@ -29,13 +29,14 @@
opAutofocus
></spot-text-field>
- <div
- slot="errors"
- class="spot-form-field--error"
- *ngIf="nameControl?.errors?.rails"
- >
- {{nameControl?.errors?.rails}}
- </div>
+ @if (nameControl?.errors?.rails) {
+ <div
+ slot="errors"
+ class="spot-form-field--error"
+ >
+ {{nameControl?.errors?.rails}}
+ </div>
+ }
<span
slot="description"
@@ -48,13 +49,13 @@
<div class="spot-action-bar">
<div class="spot-action-bar--right">
<button type="button" class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
- [textContent]="text.button_cancel"
- (click)="closeMe($event)">
+ [textContent]="text.button_cancel"
+ (click)="closeMe($event)">
</button>
<button type="submit" class="button button_no-margin -primary -with-icon icon-copy spot-action-bar--action"
- (click)="generateAndCopyUrl()"
- [textContent]="text.button_copy"
- [disabled]="isBusy">
+ (click)="generateAndCopyUrl()"
+ [textContent]="text.button_copy"
+ [disabled]="isBusy">
</button>
</div>
</div>
diff --git a/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.html b/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.html
index 60f9f8b362c..ac09271ee01 100644
--- a/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.html
+++ b/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.html
@@ -2,61 +2,71 @@
class="spot-modal"
data-indicator-name="modal"
id="wp_destroy_modal"
->
+ >
<div id="spotModalTitle" class="spot-modal--header">{{text.title}}</div>
<div class="spot-modal--body spot-container">
- <ng-container *ngIf="singleWorkPackage">
+ @if (singleWorkPackage) {
<p>
<span [textContent]="text.single_text"></span>
<strong> {{ singleWorkPackage.subject }} #{{ singleWorkPackage.id }}</strong>
<span>?</span>
</p>
- <div *ngIf="singleWorkPackageChildren && singleWorkPackageChildren.length > 0">
- <p class="danger-zone--warning">
- <span class="icon-context icon-error"></span>
- <strong [textContent]="text.warning"></strong>:
- <span [textContent]="text.hasChildren(singleWorkPackage)"></span>
- </p>
- <ul>
- <li *ngFor="let child of singleWorkPackageChildren">
- #<span [textContent]="child.id"></span>
- <span [textContent]="child.subject || ''"></span>
- </li>
- </ul>
- <p>
- <span [textContent]="text.deletesChildren"></span>
- </p>
- </div>
- </ng-container>
- <ng-container *ngIf="workPackages.length > 1">
+ @if (singleWorkPackageChildren && singleWorkPackageChildren.length > 0) {
+ <div>
+ <p class="danger-zone--warning">
+ <span class="icon-context icon-error"></span>
+ <strong [textContent]="text.warning"></strong>:
+ <span [textContent]="text.hasChildren(singleWorkPackage)"></span>
+ </p>
+ <ul>
+ @for (child of singleWorkPackageChildren; track child) {
+ <li>
+ #<span [textContent]="child.id"></span>
+ <span [textContent]="child.subject || ''"></span>
+ </li>
+ }
+ </ul>
+ <p>
+ <span [textContent]="text.deletesChildren"></span>
+ </p>
+ </div>
+ }
+ }
+ @if (workPackages.length > 1) {
<p class="danger-zone--warning">
<span class="icon-context icon-error"></span>
<strong [textContent]="text.bulk_text"></strong>
</p>
<ul>
- <li *ngFor="let wp of workPackages">
- #<span [textContent]="wp.id"></span>
- &ngsp;
- <span [textContent]="wp.subject"></span>
- <strong *ngIf="children(wp).length > 0">
- (+ {{ text.childCount(wp) }})
- </strong>
- </li>
+ @for (wp of workPackages; track wp) {
+ <li>
+ #<span [textContent]="wp.id"></span>
+ &ngsp;
+ <span [textContent]="wp.subject"></span>
+ @if (children(wp).length > 0) {
+ <strong>
+ (+ {{ text.childCount(wp) }})
+ </strong>
+ }
+ </li>
+ }
</ul>
- </ng-container>
- <div *ngIf="mustConfirmChildren">
- <label class="form--label-with-check-box -no-ellipsis">
- <div class="form--check-box-container">
- <input type="checkbox"
- name="confirm-children-deletion"
- id="confirm-children-deletion"
- [(ngModel)]="childrenDeletionConfirmed"
- class="form--check-box"/>
- </div>
- {{ text.label_confirm_children_deletion }}
- </label>
- </div>
+ }
+ @if (mustConfirmChildren) {
+ <div>
+ <label class="form--label-with-check-box -no-ellipsis">
+ <div class="form--check-box-container">
+ <input type="checkbox"
+ name="confirm-children-deletion"
+ id="confirm-children-deletion"
+ [(ngModel)]="childrenDeletionConfirmed"
+ class="form--check-box"/>
+ </div>
+ {{ text.label_confirm_children_deletion }}
+ </label>
+ </div>
+ }
</div>
<div class="spot-action-bar">
diff --git a/frontend/src/app/shared/components/no-results/no-results.component.html b/frontend/src/app/shared/components/no-results/no-results.component.html
index 3e383c24f88..d216e0148a8 100644
--- a/frontend/src/app/shared/components/no-results/no-results.component.html
+++ b/frontend/src/app/shared/components/no-results/no-results.component.html
@@ -1,9 +1,13 @@
-<i *ngIf="showIcon"
- class="icon-info1"
- aria-hidden="true"></i>
+@if (showIcon) {
+ <i
+ class="icon-info1"
+ aria-hidden="true"></i>
+}
<span class="generic-table--no-results-title">
{{ title }}
- <div *ngIf="description"
- class="generic-table--no-results-description"
- [innerHTML]="description"></div>
+ @if (description) {
+ <div
+ class="generic-table--no-results-description"
+ [innerHTML]="description"></div>
+ }
</span>
diff --git a/frontend/src/app/shared/components/op-context-menu/op-context-menu.html b/frontend/src/app/shared/components/op-context-menu/op-context-menu.html
index 7b05a8072f7..d6476c22656 100644
--- a/frontend/src/app/shared/components/op-context-menu/op-context-menu.html
+++ b/frontend/src/app/shared/components/op-context-menu/op-context-menu.html
@@ -1,58 +1,74 @@
<div [attr.id]="locals.contextMenuId"
- class="dropdown-relative dropdown -overflow-in-view"
- ng-class="{'dropdown-anchor-right': locals.showAnchorRight}">
+ class="dropdown-relative dropdown -overflow-in-view"
+ ng-class="{'dropdown-anchor-right': locals.showAnchorRight}">
<ul class="dropdown-menu "
- role="menu"
- [attr.aria-label]="locals.label"
- [ngClass]="{'-empty': items.length === 0 }">
- <ng-container *ngFor="let item of items">
- <li *ngIf="item.isHeader" role="none">
- <span
- role="presentation"
- [attr.aria-hidden]="true"
- [textContent]="item.linkText"
- class="op-menu--headline">
- </span>
- </li>
- <li *ngIf="item.divider" class="dropdown-divider" role="separator"></li>
- <li *ngIf="!item.divider && !item.isHeader">
- <a
- *ngIf="item.href"
- class="menu-item"
- role="menuitem"
- [ngClass]="item.class"
- [class.inactive]="item.disabled"
- [attr.href]="item.href"
- data-turbo="false"
- [attr.aria-disabled]="item.disabled"
- [attr.aria-label]="item.ariaLabel || item.linkText"
- [attr.title]="item.title || undefined"
- (click)="handleClick(item, $event)"
- >
- <op-icon *ngIf="item.icon" icon-classes="icon-action-menu {{ item.icon }}"></op-icon>
- <span [textContent]="item.linkText"></span>
- <op-icon *ngIf="item.postIcon"
- [icon-title]="item.postIconTitle || ''"
- icon-classes="icon-action-menu-post {{ item.postIcon }}"></op-icon>
- </a>
- <button
- *ngIf="!item.href"
- class="menu-item"
- role="menuitem"
- [ngClass]="item.class"
- [class.inactive]="item.disabled"
- [attr.aria-disabled]="item.disabled"
- [attr.aria-label]="item.ariaLabel || item.linkText"
- [attr.title]="item.title || undefined"
- (click)="handleClick(item, $event)"
- >
- <op-icon *ngIf="item.icon" icon-classes="icon-action-menu {{ item.icon }}"></op-icon>
- <span [textContent]="item.linkText"></span>
- <op-icon *ngIf="item.postIcon"
- [icon-title]="item.postIconTitle || ''"
- icon-classes="icon-action-menu-post {{ item.postIcon }}"></op-icon>
- </button>
- </li>
- </ng-container>
+ role="menu"
+ [attr.aria-label]="locals.label"
+ [ngClass]="{'-empty': items.length === 0 }">
+ @for (item of items; track item) {
+ @if (item.isHeader) {
+ <li role="none">
+ <span
+ role="presentation"
+ [attr.aria-hidden]="true"
+ [textContent]="item.linkText"
+ class="op-menu--headline">
+ </span>
+ </li>
+ }
+ @if (item.divider) {
+ <li class="dropdown-divider" role="separator"></li>
+ }
+ @if (!item.divider && !item.isHeader) {
+ <li>
+ @if (item.href) {
+ <a
+ class="menu-item"
+ role="menuitem"
+ [ngClass]="item.class"
+ [class.inactive]="item.disabled"
+ [attr.href]="item.href"
+ data-turbo="false"
+ [attr.aria-disabled]="item.disabled"
+ [attr.aria-label]="item.ariaLabel || item.linkText"
+ [attr.title]="item.title || undefined"
+ (click)="handleClick(item, $event)"
+ >
+ @if (item.icon) {
+ <op-icon icon-classes="icon-action-menu {{ item.icon }}"></op-icon>
+ }
+ <span [textContent]="item.linkText"></span>
+ @if (item.postIcon) {
+ <op-icon
+ [icon-title]="item.postIconTitle || ''"
+ icon-classes="icon-action-menu-post {{ item.postIcon }}"></op-icon>
+ }
+ </a>
+ }
+ @if (!item.href) {
+ <button
+ class="menu-item"
+ role="menuitem"
+ [ngClass]="item.class"
+ [class.inactive]="item.disabled"
+ [attr.aria-disabled]="item.disabled"
+ [attr.aria-label]="item.ariaLabel || item.linkText"
+ [attr.title]="item.title || undefined"
+ (click)="handleClick(item, $event)"
+ >
+ @if (item.icon) {
+ <op-icon icon-classes="icon-action-menu {{ item.icon }}"></op-icon>
+ }
+ <span [textContent]="item.linkText"></span>
+ @if (item.postIcon) {
+ <op-icon
+ [icon-title]="item.postIconTitle || ''"
+ icon-classes="icon-action-menu-post {{ item.postIcon }}"></op-icon>
+ }
+ </button>
+ }
+ </li>
+ }
+ }
</ul>
</div>
diff --git a/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.html b/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.html
index 05afd1a12d3..2f8e049891d 100644
--- a/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.html
+++ b/frontend/src/app/shared/components/op-non-working-days-list/op-non-working-days-list.component.html
@@ -1,24 +1,25 @@
-<full-calendar
- #ucCalendar
- *ngIf="calendarOptions"
- [options]="calendarOptions"
- class="op-non-working-days-list--calendar"
-></full-calendar>
+@if (calendarOptions) {
+ <full-calendar
+ #ucCalendar
+ [options]="calendarOptions"
+ class="op-non-working-days-list--calendar"
+ ></full-calendar>
+}
-<ng-container *ngFor="let date of nonWorkingDays;">
- <ng-container *ngIf="!date.id">
+@for (date of nonWorkingDays; track date) {
+ @if (!date.id) {
<input type="hidden" name="settings[non_working_days_attributes][{{ date.date }}][date]" [value]="date.date"/>
<input type="hidden" name="settings[non_working_days_attributes][{{ date.date }}][name]" [value]="date.name"/>
- </ng-container>
- <ng-container *ngIf="date.id && date._destroy">
+ }
+ @if (date.id && date._destroy) {
<input type="hidden" name="settings[non_working_days_attributes][{{ date.id }}][id]" [value]="date.id"/>
<input type="hidden" name="settings[non_working_days_attributes][{{ date.id }}][_destroy]" value="true" />
- </ng-container>
-</ng-container>
+ }
+}
<div
class="op-non-working-days-list--add-button"
->
+ >
<op-modal-single-date-picker
id="test"
name="test"
@@ -29,12 +30,12 @@
[applyLabel]="text.add"
(closed)="datepickerOpened = false"
(valueChange)="addNonWorkingDay($event)"
- >
+ >
<spot-form-field
slot="extra-fields"
[required]="true"
[label]="text.non_working_day_name"
- >
+ >
<spot-text-field
name="name"
slot="input"
@@ -49,7 +50,7 @@
type="button"
class="spot-link op-non-working-days-list--add-button"
(click)="datepickerOpened = true"
- >
+ >
<span class="spot-icon spot-icon_add"></span>
<span [textContent]="text.add_non_working_day"></span>
</button>
diff --git a/frontend/src/app/shared/components/option-list/option-list.component.html b/frontend/src/app/shared/components/option-list/option-list.component.html
index 53058bafc81..b750c042812 100644
--- a/frontend/src/app/shared/components/option-list/option-list.component.html
+++ b/frontend/src/app/shared/components/option-list/option-list.component.html
@@ -1,21 +1,23 @@
-<label
- *ngFor="let option of options"
- [class]="getClassListForItem(option)"
->
- <input
- class="op-option-list--input"
- type="radio"
- [attr.name]="name"
- [value]="option.value"
- [(ngModel)]="selected"
- [disabled]="option.disabled"
- />
- <div>
- <p class="op-option-list--item-title">{{ option.title }}</p>
- <p
- *ngIf="option.description"
- class="op-option-list--item-description"
- [innerHTML]="option.description"
- ></p>
- </div>
-</label>
+@for (option of options; track option) {
+ <label
+ [class]="getClassListForItem(option)"
+ >
+ <input
+ class="op-option-list--input"
+ type="radio"
+ [attr.name]="name"
+ [value]="option.value"
+ [(ngModel)]="selected"
+ [disabled]="option.disabled"
+ />
+ <div>
+ <p class="op-option-list--item-title">{{ option.title }}</p>
+ @if (option.description) {
+ <p
+ class="op-option-list--item-description"
+ [innerHTML]="option.description"
+ ></p>
+ }
+ </div>
+ </label>
+}
diff --git a/frontend/src/app/shared/components/project-include/list/project-include-list.component.html b/frontend/src/app/shared/components/project-include/list/project-include-list.component.html
index d223f459c18..f35632ce4c8 100644
--- a/frontend/src/app/shared/components/project-include/list/project-include-list.component.html
+++ b/frontend/src/app/shared/components/project-include/list/project-include-list.component.html
@@ -1,65 +1,68 @@
-<li
- class="spot-list--item op-project-include-list--item"
- *ngFor="let project of projects"
- data-test-selector="op-project-include-list--item"
- [attr.data-list-selector]="projectListItemIdentifier"
->
- <spot-tooltip
- class="op-project-include-list--tooltip"
- [alignment]="getTooltipAlignment(project)"
- [disabled]="!project.disabled"
- >
- <ng-container slot="trigger">
- <label
- tabindex="-1"
- class="spot-list--item-action op-project-include-list--item-action"
- (keydown.space)="changeSelected(project)"
- [ngClass]="{
- 'spot-list--item-action_disabled': project.disabled,
- 'spot-list--item-action_active': (searchableProjectListService.activeItemID$ | async) === project.id
- }"
- [attr.data-list-selector]="projectListActionIdentifier"
- [attr.data-list-disabled]="project.disabled || undefined"
- >
- <spot-checkbox
- [tabindex]="-1"
- [checked]="isChecked(project.href) || (includeSubprojects && parentChecked)"
- (change)="changeSelected(project)"
- [disabled]="project.disabled"
- [attr.data-qa-project-include-id]="project.id"
- [attr.data-qa-project-include-checked]="(isChecked(project.href) || (includeSubprojects && parentChecked)) ? 1 : 0"
- ></spot-checkbox>
- <div
- class="spot-list--item-title spot-list--item-title_ellipse-text"
- data-test-selector="op-project-include-list--item-title"
- [opSearchHighlight]="searchText"
- >{{ project.name }}</div>
- </label>
- </ng-container>
-
- <p
- slot="body"
- class="spot-body-small"
+@for (project of projects; track project) {
+ <li
+ class="spot-list--item op-project-include-list--item"
+ data-test-selector="op-project-include-list--item"
+ [attr.data-list-selector]="projectListItemIdentifier"
>
- <span *ngIf="project.href === currentProjectHref else otherMessages">{{ text.current_project }}</span>
-
- <ng-template #otherMessages>
- <span *ngIf="includeSubprojects && parentChecked else searchMatch">{{ text.include_all_selected }}</span>
- <ng-template #searchMatch>
- <span *ngIf="project.disabled">{{ text.does_not_match_search }}</span>
- </ng-template>
- </ng-template>
- </p>
- </spot-tooltip>
-
- <ul
- *ngIf="project.children.length"
- op-project-include-list
- [projects]="project.children"
- [selected]="selected"
- [includeSubprojects]="includeSubprojects"
- [parentChecked]="parentChecked || isChecked(project.href)"
- [searchText]="searchText"
- (update)="updateList($event)"
- ></ul>
-</li>
+ <spot-tooltip
+ class="op-project-include-list--tooltip"
+ [alignment]="getTooltipAlignment(project)"
+ [disabled]="!project.disabled"
+ >
+ <ng-container slot="trigger">
+ <label
+ tabindex="-1"
+ class="spot-list--item-action op-project-include-list--item-action"
+ (keydown.space)="changeSelected(project)"
+ [ngClass]="{
+ 'spot-list--item-action_disabled': project.disabled,
+ 'spot-list--item-action_active': (searchableProjectListService.activeItemID$ | async) === project.id
+ }"
+ [attr.data-list-selector]="projectListActionIdentifier"
+ [attr.data-list-disabled]="project.disabled || undefined"
+ >
+ <spot-checkbox
+ [tabindex]="-1"
+ [checked]="isChecked(project.href) || (includeSubprojects && parentChecked)"
+ (change)="changeSelected(project)"
+ [disabled]="project.disabled"
+ [attr.data-qa-project-include-id]="project.id"
+ [attr.data-qa-project-include-checked]="(isChecked(project.href) || (includeSubprojects && parentChecked)) ? 1 : 0"
+ ></spot-checkbox>
+ <div
+ class="spot-list--item-title spot-list--item-title_ellipse-text"
+ data-test-selector="op-project-include-list--item-title"
+ [opSearchHighlight]="searchText"
+ >{{ project.name }}</div>
+ </label>
+ </ng-container>
+ <p
+ slot="body"
+ class="spot-body-small"
+ >
+ @if (project.href === currentProjectHref) {
+ <span>{{ text.current_project }}</span>
+ } @else {
+ @if (includeSubprojects && parentChecked) {
+ <span>{{ text.include_all_selected }}</span>
+ } @else {
+ @if (project.disabled) {
+ <span>{{ text.does_not_match_search }}</span>
+ }
+ }
+ }
+ </p>
+ </spot-tooltip>
+ @if (project.children.length) {
+ <ul
+ op-project-include-list
+ [projects]="project.children"
+ [selected]="selected"
+ [includeSubprojects]="includeSubprojects"
+ [parentChecked]="parentChecked || isChecked(project.href)"
+ [searchText]="searchText"
+ (update)="updateList($event)"
+ ></ul>
+ }
+ </li>
+}
diff --git a/frontend/src/app/shared/components/project-include/project-include.component.html b/frontend/src/app/shared/components/project-include/project-include.component.html
index 41409994bed..54c1ee11d9f 100644
--- a/frontend/src/app/shared/components/project-include/project-include.component.html
+++ b/frontend/src/app/shared/components/project-include/project-include.component.html
@@ -2,7 +2,7 @@
[opened]="opened"
(closed)="opened = false"
class="op-project-list-modal"
->
+ >
<button
slot="trigger"
type="button"
@@ -10,14 +10,15 @@
(click)="toggleOpen()"
[title]="text.toggle_title"
data-test-selector="project-include-button"
- >
- {{ text.toggle_title }}
- <span
- *ngIf="(numberOfProjectsInFilter$ | async) as count"
- class="badge"
- [textContent]="count"
>
- </span>
+ {{ text.toggle_title }}
+ @if ((numberOfProjectsInFilter$ | async); as count) {
+ <span
+ class="badge"
+ [textContent]="count"
+ >
+ </span>
+ }
<span class="spot-icon spot-icon_dropdown"></span>
</button>
@@ -29,88 +30,85 @@
[(ngModel)]="displayMode"
></spot-toggle>
</div>
- <form
- (submit)="onSubmit($event)"
- class="spot-container op-project-list-modal--body"
- data-searchable-list-parent="true"
- *ngIf="projects$ | async as projects"
- >
- <spot-text-field
- [placeholder]="text.search_placeholder"
- name="project-include-search"
- [(ngModel)]="searchableProjectListService.searchText"
- [ngModelOptions]="{standalone: true}"
- data-test-selector="project-include-search"
- data-list-focus-catcher-container="true"
- data-modal-focus-catcher-container="true"
- (keydown)="searchableProjectListService.onKeydown($event, projects)"
- (inputFocus)="textFieldFocused = true"
- (inputBlur)="textFieldFocused = false"
- >
- <span
- slot="before"
- class="spot-icon spot-icon_search"
- ></span>
- </spot-text-field>
-
- <ng-container *ngIf="(loading$ | async) === false; else loadingTemplate">
- <ul
- *ngIf="projects.length > 0; else noResultsTemplate"
- class="op-project-include--list"
- [ngClass]="{ 'spot-list_active': textFieldFocused }"
- op-project-include-list
- [projects]="projects"
- [selected]="selectedProjects"
- [includeSubprojects]="includeSubprojects$ | async"
- [searchText]="searchableProjectListService.searchText"
- [root]="true"
- (update)="selectedProjects = $event"
- data-test-selector="project-include-list"
- data-list-root="true"
- ></ul>
-
- <ng-template #noResultsTemplate>
- <span class="op-project-list-modal--no-results">
- {{text.no_results}}
- </span>
- </ng-template>
- </ng-container>
-
- <div class="spot-action-bar">
- <div class="spot-action-bar--left">
- <label class="op-project-include--include-all spot-action-bar--action">
- <spot-checkbox
- [(ngModel)]="includeSubprojects"
- [ngModelOptions]="{standalone: true}"
- data-qa-project-include-all-subprojects="1"
- ></spot-checkbox>
- <span class="op-project-include--include-all-text">{{ text.include_subprojects }}</span>
- </label>
- </div>
- <div class="spot-action-bar--right">
- <button
- [disabled]="(loading$ | async)"
- class="button spot-action-bar--action"
- type="button"
- (click)="clearSelection()"
- >
- {{ text.clear_selection }}
- </button>
- <button
- [disabled]="(loading$ | async)"
- class="button -primary spot-action-bar--action"
+ @if (projects$ | async; as projects) {
+ <form
+ (submit)="onSubmit($event)"
+ class="spot-container op-project-list-modal--body"
+ data-searchable-list-parent="true"
+ >
+ <spot-text-field
+ [placeholder]="text.search_placeholder"
+ name="project-include-search"
+ [(ngModel)]="searchableProjectListService.searchText"
+ [ngModelOptions]="{standalone: true}"
+ data-test-selector="project-include-search"
+ data-list-focus-catcher-container="true"
+ data-modal-focus-catcher-container="true"
+ (keydown)="searchableProjectListService.onKeydown($event, projects)"
+ (inputFocus)="textFieldFocused = true"
+ (inputBlur)="textFieldFocused = false"
>
- {{ text.apply }}
- </button>
+ <span
+ slot="before"
+ class="spot-icon spot-icon_search"
+ ></span>
+ </spot-text-field>
+ @if ((loading$ | async) === false) {
+ @if (projects.length > 0) {
+ <ul
+ class="op-project-include--list"
+ [ngClass]="{ 'spot-list_active': textFieldFocused }"
+ op-project-include-list
+ [projects]="projects"
+ [selected]="selectedProjects"
+ [includeSubprojects]="includeSubprojects$ | async"
+ [searchText]="searchableProjectListService.searchText"
+ [root]="true"
+ (update)="selectedProjects = $event"
+ data-test-selector="project-include-list"
+ data-list-root="true"
+ ></ul>
+ } @else {
+ <span class="op-project-list-modal--no-results">
+ {{text.no_results}}
+ </span>
+ }
+ } @else {
+ <op-loading-project-list
+ class="op-project-list-modal--loading"
+ data-test-selector="op-project-include--loading"
+ ></op-loading-project-list>
+ }
+ <div class="spot-action-bar">
+ <div class="spot-action-bar--left">
+ <label class="op-project-include--include-all spot-action-bar--action">
+ <spot-checkbox
+ [(ngModel)]="includeSubprojects"
+ [ngModelOptions]="{standalone: true}"
+ data-qa-project-include-all-subprojects="1"
+ ></spot-checkbox>
+ <span class="op-project-include--include-all-text">{{ text.include_subprojects }}</span>
+ </label>
+ </div>
+ <div class="spot-action-bar--right">
+ <button
+ [disabled]="(loading$ | async)"
+ class="button spot-action-bar--action"
+ type="button"
+ (click)="clearSelection()"
+ >
+ {{ text.clear_selection }}
+ </button>
+ <button
+ [disabled]="(loading$ | async)"
+ class="button -primary spot-action-bar--action"
+ >
+ {{ text.apply }}
+ </button>
+ </div>
</div>
- </div>
- </form>
+ </form>
+ }
</ng-container>
- <ng-template #loadingTemplate>
- <op-loading-project-list
- class="op-project-list-modal--loading"
- data-test-selector="op-project-include--loading"
- ></op-loading-project-list>
- </ng-template>
</spot-drop-modal>
diff --git a/frontend/src/app/shared/components/resizer/resizer.component.html b/frontend/src/app/shared/components/resizer/resizer.component.html
index fe0f05513af..519366f70c9 100644
--- a/frontend/src/app/shared/components/resizer/resizer.component.html
+++ b/frontend/src/app/shared/components/resizer/resizer.component.html
@@ -1,4 +1,6 @@
-<div [ngClass]="resizerClass"
- *ngIf="!customHandler">
-</div>
+@if (!customHandler) {
+ <div [ngClass]="resizerClass"
+ >
+ </div>
+}
<ng-content></ng-content>
diff --git a/frontend/src/app/shared/components/storages/storage-file-list-item/storage-file-list-item.html b/frontend/src/app/shared/components/storages/storage-file-list-item/storage-file-list-item.html
index a89a891686b..0b7762d08f3 100644
--- a/frontend/src/app/shared/components/storages/storage-file-list-item/storage-file-list-item.html
+++ b/frontend/src/app/shared/components/storages/storage-file-list-item/storage-file-list-item.html
@@ -13,7 +13,7 @@
'spot-list--item-action_disabled': content.disabled,
'op-file-list--item-action_view-not-allowed': content.isConstrained
}"
- >
+ >
@if (!!content.checkbox) {
<spot-checkbox
[checked]="content.disabled || content.checkbox.selected"
@@ -103,14 +103,15 @@
<span class="op-file-list--item-text" [textContent]="content.timestamp"></span>
}
- <op-principal
- *ngIf="!content.isDirectory"
- class="op-file-list--item-avatar"
- [principal]="principal"
- [hideName]="true"
- [size]="'mini'"
- [link]="false"
- ></op-principal>
+ @if (!content.isDirectory) {
+ <op-principal
+ class="op-file-list--item-avatar"
+ [principal]="principal"
+ [hideName]="true"
+ [size]="'mini'"
+ [link]="false"
+ ></op-principal>
+ }
@if (content.isDirectory) {
<button
@@ -119,7 +120,7 @@
(click)="content.enterDirectory()"
(keydown.enter)="content.enterDirectory()"
(keydown.space)="content.enterDirectory()"
- >
+ >
<svg chevron-right-icon size="small"></svg>
</button>
}
diff --git a/frontend/src/app/shared/components/table-pagination/table-pagination.component.html b/frontend/src/app/shared/components/table-pagination/table-pagination.component.html
index 20106162216..0ea76d7dbef 100644
--- a/frontend/src/app/shared/components/table-pagination/table-pagination.component.html
+++ b/frontend/src/app/shared/components/table-pagination/table-pagination.component.html
@@ -1,132 +1,146 @@
-<div class="op-pagination" *ngIf="pagination && isVisible && pagination.total">
- <nav class="op-pagination--pages" [attr.aria-label]="text.page_navigation">
- <ul class="op-pagination--items op-pagination--items_start" role="presentation">
-
- <li [hidden]="pagination.page === 1 || !showPageSelections" class="op-pagination--item">
- <button
- class="op-pagination--item-link op-pagination--item-link_prev"
- type="button"
- (click)="showPage(pagination.page - 1)"
- data-rel="prev">
- <svg chevron-left-icon size="xsmall" class="op-pagination--item-link-icon op-pagination--item-link-icon_prev" />
- {{text.label_previous}}
- </button>
- </li>
-
- <ng-container *ngIf="prePageNumbers.length > 0">
- <li *ngFor="let pageNumber of prePageNumbers"
- class="op-pagination--item">
+@if (pagination && isVisible && pagination.total) {
+ <div class="op-pagination">
+ <nav class="op-pagination--pages" [attr.aria-label]="text.page_navigation">
+ <ul class="op-pagination--items op-pagination--items_start" role="presentation">
+ <li [hidden]="pagination.page === 1 || !showPageSelections" class="op-pagination--item">
<button
- class="op-pagination--item-link"
+ class="op-pagination--item-link op-pagination--item-link_prev"
type="button"
- (click)="showPage(pageNumber)"
- data-rel="prev"
- [attr.aria-label]="text.page_number(pageNumber)"
- [textContent]="pageNumber"
- ></button>
+ (click)="showPage(pagination.page - 1)"
+ data-rel="prev">
+ <svg chevron-left-icon size="xsmall" class="op-pagination--item-link-icon op-pagination--item-link-icon_prev" />
+ {{text.label_previous}}
+ </button>
</li>
- <li class="op-pagination--space">
- <span class="sr-only" [textContent]="text.pages_skipped"></span>
- <span aria-hidden="true">…</span>
- </li>
- </ng-container>
-
- <ng-container *ngIf="pageNumbers.length > 1">
- <li *ngFor="let pageNumber of pageNumbers"
- [ngClass]="{ 'op-pagination--item_current': pageNumber === pagination.page }"
- class="op-pagination--item">
- <em
- *ngIf="pageNumber === pagination.page"
- [attr.aria-label]="text.page_number(pageNumber)"
- aria-current="page"
- tabindex="0">
- {{ pageNumber }}
- </em>
- <button
- class="op-pagination--item-link"
- type="button"
- *ngIf="pageNumber !== pagination.page"
- (click)="showPage(pageNumber)"
- data-rel="next"
- [attr.aria-label]="text.page_number(pageNumber)"
- [textContent]="pageNumber"
- ></button>
- </li>
- <li class="op-pagination--space">
- <span class="sr-only" [textContent]="text.pages_skipped"></span>
- <span aria-hidden="true">…</span>
- </li>
- </ng-container>
-
- <ng-container *ngIf="postPageNumbers.length">
- <li *ngFor="let pageNumber of postPageNumbers" class="op-pagination--item">
- <button
- class="op-pagination--item-link"
- type="button"
- (click)="showPage(pageNumber)"
- data-rel="next"
- [attr.aria-label]="text.page_number(pageNumber)"
- [textContent]="pageNumber"
- ></button>
- </li>
- </ng-container>
-
- <li [hidden]="!(pagination.total && pagination.page < pageNumbers[pageNumbers.length - 1])"
+ @if (prePageNumbers.length > 0) {
+ @for (pageNumber of prePageNumbers; track pageNumber) {
+ <li
+ class="op-pagination--item">
+ <button
+ class="op-pagination--item-link"
+ type="button"
+ (click)="showPage(pageNumber)"
+ data-rel="prev"
+ [attr.aria-label]="text.page_number(pageNumber)"
+ [textContent]="pageNumber"
+ ></button>
+ </li>
+ }
+ <li class="op-pagination--space">
+ <span class="sr-only" [textContent]="text.pages_skipped"></span>
+ <span aria-hidden="true">…</span>
+ </li>
+ }
+ @if (pageNumbers.length > 1) {
+ @for (pageNumber of pageNumbers; track pageNumber) {
+ <li
+ [ngClass]="{ 'op-pagination--item_current': pageNumber === pagination.page }"
+ class="op-pagination--item">
+ @if (pageNumber === pagination.page) {
+ <em
+ [attr.aria-label]="text.page_number(pageNumber)"
+ aria-current="page"
+ tabindex="0">
+ {{ pageNumber }}
+ </em>
+ }
+ @if (pageNumber !== pagination.page) {
+ <button
+ class="op-pagination--item-link"
+ type="button"
+ (click)="showPage(pageNumber)"
+ data-rel="next"
+ [attr.aria-label]="text.page_number(pageNumber)"
+ [textContent]="pageNumber"
+ ></button>
+ }
+ </li>
+ }
+ <li class="op-pagination--space">
+ <span class="sr-only" [textContent]="text.pages_skipped"></span>
+ <span aria-hidden="true">…</span>
+ </li>
+ }
+ @if (postPageNumbers.length) {
+ @for (pageNumber of postPageNumbers; track pageNumber) {
+ <li class="op-pagination--item">
+ <button
+ class="op-pagination--item-link"
+ type="button"
+ (click)="showPage(pageNumber)"
+ data-rel="next"
+ [attr.aria-label]="text.page_number(pageNumber)"
+ [textContent]="pageNumber"
+ ></button>
+ </li>
+ }
+ }
+ <li [hidden]="!(pagination.total && pagination.page < pageNumbers[pageNumbers.length - 1])"
class="op-pagination--item">
- <button
- class="op-pagination--item-link op-pagination--item-link_next"
- type="button"
- (click)="showPage(pagination.page + 1)"
- data-rel="next">
- {{text.label_next}}
- <svg chevron-right-icon size="xsmall" class="op-pagination--item-link-icon op-pagination--item-link-icon_next" />
- </button>
- </li>
- <li class="op-pagination--range" aria-live="polite">
- {{currentRange}}
- <span *ngIf="pageNumbers.length === 1"
- id="op-pagination-empty-text"
- tabindex="0"
- class="sr-only"
- [textContent]="text.no_other_page"></span>
- </li>
- <li class="op-pagination--info"
- *ngIf="infoText">
- <op-icon icon-classes="icon-info1 icon-context"></op-icon>
- <span [textContent]="infoText"></span>
- </li>
- </ul>
- </nav>
-
- <div class="op-pagination--options" *ngIf="showPerPageOptions()">
- <nav [attr.aria-label]="text.per_page_navigation">
- <ul
- class="op-pagination--items op-pagination--items_end"
- role="presentation">
- <li
- class="op-pagination--label"
- [textContent]="text.per_page">
- </li>
- <li
- *ngFor="let perPageOption of perPageOptions"
- class="op-pagination--item"
- [ngClass]="{ 'op-pagination--item_current': perPageOption === pagination.perPage }">
<button
- *ngIf="perPageOption !== pagination.perPage"
- class="op-pagination--item-link"
+ class="op-pagination--item-link op-pagination--item-link_next"
type="button"
- (click)="selectPerPage(perPageOption)"
- [textContent]="perPageOption"
- [attr.aria-label]="text.show_per_page(perPageOption)"
- ></button>
- <span *ngIf="perPageOption === pagination.perPage"
- tabindex="0"
- aria-current="true"
- [attr.aria-label]="text.show_per_page(perPageOption)">
- {{ perPageOption }}
- </span>
+ (click)="showPage(pagination.page + 1)"
+ data-rel="next">
+ {{text.label_next}}
+ <svg chevron-right-icon size="xsmall" class="op-pagination--item-link-icon op-pagination--item-link-icon_next" />
+ </button>
+ </li>
+ <li class="op-pagination--range" aria-live="polite">
+ {{currentRange}}
+ @if (pageNumbers.length === 1) {
+ <span
+ id="op-pagination-empty-text"
+ tabindex="0"
+ class="sr-only"
+ [textContent]="text.no_other_page"></span>
+ }
</li>
+ @if (infoText) {
+ <li class="op-pagination--info"
+ >
+ <op-icon icon-classes="icon-info1 icon-context"></op-icon>
+ <span [textContent]="infoText"></span>
+ </li>
+ }
</ul>
</nav>
+ @if (showPerPageOptions()) {
+ <div class="op-pagination--options">
+ <nav [attr.aria-label]="text.per_page_navigation">
+ <ul
+ class="op-pagination--items op-pagination--items_end"
+ role="presentation">
+ <li
+ class="op-pagination--label"
+ [textContent]="text.per_page">
+ </li>
+ @for (perPageOption of perPageOptions; track perPageOption) {
+ <li
+ class="op-pagination--item"
+ [ngClass]="{ 'op-pagination--item_current': perPageOption === pagination.perPage }">
+ @if (perPageOption !== pagination.perPage) {
+ <button
+ class="op-pagination--item-link"
+ type="button"
+ (click)="selectPerPage(perPageOption)"
+ [textContent]="perPageOption"
+ [attr.aria-label]="text.show_per_page(perPageOption)"
+ ></button>
+ }
+ @if (perPageOption === pagination.perPage) {
+ <span
+ tabindex="0"
+ aria-current="true"
+ [attr.aria-label]="text.show_per_page(perPageOption)">
+ {{ perPageOption }}
+ </span>
+ }
+ </li>
+ }
+ </ul>
+ </nav>
+ </div>
+ }
</div>
-</div>
+}
diff --git a/frontend/src/app/shared/components/tabs/scrollable-tabs/scrollable-tabs.component.html b/frontend/src/app/shared/components/tabs/scrollable-tabs/scrollable-tabs.component.html
index 91017584724..0937d526478 100644
--- a/frontend/src/app/shared/components/tabs/scrollable-tabs/scrollable-tabs.component.html
+++ b/frontend/src/app/shared/components/tabs/scrollable-tabs/scrollable-tabs.component.html
@@ -2,75 +2,80 @@
<div
#scrollContainer
class="op-scrollable-tabs--tab-container"
- >
+ >
<ul
#scrollPane
class="op-tab-row"
(scroll)="onScroll()"
- >
- <li
- *ngFor="let tab of tabs; trackBy:trackById"
- class="op-tab-row--tab"
- (dragenter)="startDebouncedTabActivation(tab)"
- (dragleave)="cancelDebouncedTabActivation()"
- [attr.data-tab-id]="tab.id"
- [attr.data-qa-tab-id]="tab.id"
- [attr.data-qa-tab-selected]="tab.id === currentTabId || undefined"
- [attr.data-qa-tab-disabled]="tab.disable || undefined"
>
- <a
- *ngIf="!tab.route"
- [href]="tab.path"
- class="op-tab-row--link"
- role="tab"
- [class.op-tab-row--link_selected]="tab.id === currentTabId"
- [class.op-tab-row--link_disabled]="tab.disable !== undefined"
- [attr.aria-selected]="tab.id === currentTabId"
- (click)="clickTab(tab, $event)"
- [attr.title]="tabTitle(tab)"
- [textContent]="tab.name"
- >
- </a>
- <a
- *ngIf="tab.route"
- [uiSref]="tab.route"
- [uiParams]="tab.routeParams"
- [attr.aria-selected]="tab.id === currentTabId"
- role="tab"
- class="op-tab-row--link"
- uiSrefActive="op-tab-row--link_selected"
- (click)="clickTab(tab, $event)"
- [attr.title]="tabTitle(tab)"
- [class.op-tab-row--link_disabled]="tab.disable !== undefined"
- href=""
- >
- <span [textContent]="tab.name"></span>
- <ng-container *ngIf="counter(tab) | async as tabCounter">
- <op-tab-count
- *ngIf="tab.showCountAsBubble"
- [count]="tabCounter"
- [attr.data-test-selector]="'tab-counter-' + tab.name"
- ></op-tab-count>
- <span
- *ngIf="tabCounter > 0 && !tab.showCountAsBubble"
- data-test-selector="tab-count"
- > ({{ tabCounter }})</span>
- </ng-container>
- </a>
- </li>
+ @for (tab of tabs; track trackById($index, tab)) {
+ <li
+ class="op-tab-row--tab"
+ (dragenter)="startDebouncedTabActivation(tab)"
+ (dragleave)="cancelDebouncedTabActivation()"
+ [attr.data-tab-id]="tab.id"
+ [attr.data-qa-tab-id]="tab.id"
+ [attr.data-qa-tab-selected]="tab.id === currentTabId || undefined"
+ [attr.data-qa-tab-disabled]="tab.disable || undefined"
+ >
+ @if (!tab.route) {
+ <a
+ [href]="tab.path"
+ class="op-tab-row--link"
+ role="tab"
+ [class.op-tab-row--link_selected]="tab.id === currentTabId"
+ [class.op-tab-row--link_disabled]="tab.disable !== undefined"
+ [attr.aria-selected]="tab.id === currentTabId"
+ (click)="clickTab(tab, $event)"
+ [attr.title]="tabTitle(tab)"
+ [textContent]="tab.name"
+ >
+ </a>
+ }
+ @if (tab.route) {
+ <a
+ [uiSref]="tab.route"
+ [uiParams]="tab.routeParams"
+ [attr.aria-selected]="tab.id === currentTabId"
+ role="tab"
+ class="op-tab-row--link"
+ uiSrefActive="op-tab-row--link_selected"
+ (click)="clickTab(tab, $event)"
+ [attr.title]="tabTitle(tab)"
+ [class.op-tab-row--link_disabled]="tab.disable !== undefined"
+ href=""
+ >
+ <span [textContent]="tab.name"></span>
+ @if (counter(tab) | async; as tabCounter) {
+ @if (tab.showCountAsBubble) {
+ <op-tab-count
+ [count]="tabCounter"
+ [attr.data-test-selector]="'tab-counter-' + tab.name"
+ ></op-tab-count>
+ }
+ @if (tabCounter > 0 && !tab.showCountAsBubble) {
+ <span
+ data-test-selector="tab-count"
+ > ({{ tabCounter }})</span>
+ }
+ }
+ </a>
+ }
+ </li>
+ }
</ul>
<div
#scrollLeftBtn [hidden]="hideLeftButton"
class="op-scrollable-tabs--button op-scrollable-tabs--button_left"
(click)="scrollLeft()"
- >
+ >
<span class="icon-arrow-left2"></span>
</div>
<div
#scrollRightBtn [hidden]="hideRightButton"
class="op-scrollable-tabs--button op-scrollable-tabs--button_right"
(click)="scrollRight()"
- >
+ >
<span class="icon-arrow-right2"></span>
</div>
</div>
diff --git a/frontend/src/app/shared/components/tabs/tab-badges/tab-count.component.html b/frontend/src/app/shared/components/tabs/tab-badges/tab-count.component.html
index 0d2d57491e8..3e3c07181ca 100644
--- a/frontend/src/app/shared/components/tabs/tab-badges/tab-count.component.html
+++ b/frontend/src/app/shared/components/tabs/tab-badges/tab-count.component.html
@@ -1,7 +1,8 @@
-<ng-container *ngIf="count">
- <span
- class="op-tab-count"
- *ngIf="count > 0"
- [textContent]="count"
- ></span>
-</ng-container>
\ No newline at end of file
+@if (count) {
+ @if (count > 0) {
+ <span
+ class="op-tab-count"
+ [textContent]="count"
+ ></span>
+ }
+}
\ No newline at end of file
diff --git a/frontend/src/app/shared/components/time_entries/timer/timer-account-menu.component.html b/frontend/src/app/shared/components/time_entries/timer/timer-account-menu.component.html
index f36ab01149b..2fcbecbdba6 100644
--- a/frontend/src/app/shared/components/time_entries/timer/timer-account-menu.component.html
+++ b/frontend/src/app/shared/components/time_entries/timer/timer-account-menu.component.html
@@ -1,10 +1,10 @@
-<ng-container *ngIf="timer$ | async as timer">
+@if (timer$ | async; as timer) {
<span class="op-timer-account-menu--timer"> {{text.tracking}}: {{ elapsed$ | async }}
<a
- class="op-timer-account-menu--timer-icon"
- data-test-selector="op-timer-account-menu-stop"
- (click)="stopTimer()"
- >
+ class="op-timer-account-menu--timer-icon"
+ data-test-selector="op-timer-account-menu-stop"
+ (click)="stopTimer()"
+ >
<span class="spot-icon spot-icon_inline spot-icon_time-tracking-stop spot-icon_1_25"> </span>
{{text.stop}}
</a>
@@ -13,7 +13,7 @@
class="op-timer-account-menu--wp-details"
uiSref="work-packages.show"
[uiParams]="{ workPackageId: timer.entity.id }"
- >
+ >
#{{ timer.entity.id }}: {{ timer.entity.name }}
</a>
-</ng-container>
+}
diff --git a/frontend/src/app/shared/components/toaster/toast.component.html b/frontend/src/app/shared/components/toaster/toast.component.html
index ff64413aeed..5465baba9b4 100644
--- a/frontend/src/app/shared/components/toaster/toast.component.html
+++ b/frontend/src/app/shared/components/toaster/toast.component.html
@@ -1,61 +1,81 @@
<div class="op-toast -{{ type }} {{ icon }}" tabindex="0">
<div class="op-toast--content" role="alert" aria-atomic="true">
- <ng-container *ngIf="type === 'loading'">
+ @if (type === 'loading') {
<p [textContent]="toast.message"></p>
- <div
- *ngIf="(loading$ | async)"
- class="op-loading-indicator op-loading-indicator_embedded"
- >
- <div></div><div></div>
- </div>
- </ng-container>
- <p *ngIf="type !== 'loading'">
- <span [textContent]="toast.message"></span>
- <span [textContent]="' '"></span>
- <a class="op-toast--target-link"
- *ngIf="toast.link"
- (click)="executeTarget()"
- [textContent]="toast.link!.text">
- </a>
- </p>
- <div [ngSwitch]="type">
- <div *ngSwitchCase="'upload'">
- <div *ngIf="canBeHidden">
- <a (click)="show = true" [hidden]="show">
- <span class="spot-icon spot-icon_arrow-right2"></span>
- </a>
- <a (click)="show = false" [hidden]="!show">
- <span class="spot-icon spot-icon_arrow-down1"></span>
- </a>
- <span [textContent]="uploadText"></span>
+ @if ((loading$ | async)) {
+ <div
+ class="op-loading-indicator op-loading-indicator_embedded"
+ >
+ <div></div><div></div>
</div>
- <div [ngClass]="{ '-hidden': !show && canBeHidden }">
- <ul class="op-toast--uploads" *ngIf="data && data.length > 0">
- <op-toasters-upload-progress
- *ngFor="let upload of data"
- [file]="upload[0]"
- [upload]="upload[1]"
- (uploadSuccess)="onUploadSuccess()"
- (uploadError)="remove()">
- </op-toasters-upload-progress>
- </ul>
- </div>
- </div>
- <div *ngSwitchCase="'success'"></div>
- <div *ngSwitchCase="'error'">
- <ul class="op-toast--errors">
- <li *ngFor="let error of data" [textContent]="error"></li>
- </ul>
- </div>
+ }
+ }
+ @if (type !== 'loading') {
+ <p>
+ <span [textContent]="toast.message"></span>
+ <span [textContent]="' '"></span>
+ @if (toast.link) {
+ <a class="op-toast--target-link"
+ (click)="executeTarget()"
+ [textContent]="toast.link!.text">
+ </a>
+ }
+ </p>
+ }
+ <div>
+ @switch (type) {
+ @case ('upload') {
+ <div>
+ @if (canBeHidden) {
+ <div>
+ <a (click)="show = true" [hidden]="show">
+ <span class="spot-icon spot-icon_arrow-right2"></span>
+ </a>
+ <a (click)="show = false" [hidden]="!show">
+ <span class="spot-icon spot-icon_arrow-down1"></span>
+ </a>
+ <span [textContent]="uploadText"></span>
+ </div>
+ }
+ <div [ngClass]="{ '-hidden': !show && canBeHidden }">
+ @if (data && data.length > 0) {
+ <ul class="op-toast--uploads">
+ @for (upload of data; track upload) {
+ <op-toasters-upload-progress
+ [file]="upload[0]"
+ [upload]="upload[1]"
+ (uploadSuccess)="onUploadSuccess()"
+ (uploadError)="remove()">
+ </op-toasters-upload-progress>
+ }
+ </ul>
+ }
+ </div>
+ </div>
+ }
+ @case ('success') {
+ <div></div>
+ }
+ @case ('error') {
+ <div>
+ <ul class="op-toast--errors">
+ @for (error of data; track error) {
+ <li [textContent]="error"></li>
+ }
+ </ul>
+ </div>
+ }
+ }
</div>
- <button
- *ngIf="removable"
- type="button"
- class="spot-link op-toast--close"
- [title]="text.close_popup"
- (click)="remove()"
- >
- <span class="spot-icon spot-icon_1 spot-icon_close"></span>
- </button>
+ @if (removable) {
+ <button
+ type="button"
+ class="spot-link op-toast--close"
+ [title]="text.close_popup"
+ (click)="remove()"
+ >
+ <span class="spot-icon spot-icon_1 spot-icon_close"></span>
+ </button>
+ }
</div>
</div>
diff --git a/frontend/src/app/shared/components/toaster/toasts-container.component.ts b/frontend/src/app/shared/components/toaster/toasts-container.component.ts
index 7880ebca7e6..6c941060999 100644
--- a/frontend/src/app/shared/components/toaster/toasts-container.component.ts
+++ b/frontend/src/app/shared/components/toaster/toasts-container.component.ts
@@ -35,10 +35,12 @@ import { IToast, ToastService } from './toast.service';
template: `
<div class="op-toast--wrapper">
<div class="op-toast--casing">
- <op-toast [toast]="toast" *ngFor="let toast of stack"></op-toast>
+ @for (toast of stack; track toast) {
+ <op-toast [toast]="toast"></op-toast>
+ }
</div>
</div>
- `,
+ `,
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'opce-toasts-container',
standalone: false,
diff --git a/frontend/src/app/shared/components/toaster/upload-progress.component.ts b/frontend/src/app/shared/components/toaster/upload-progress.component.ts
index 803c1bd3dd9..9ef04dd87ee 100644
--- a/frontend/src/app/shared/components/toaster/upload-progress.component.ts
+++ b/frontend/src/app/shared/components/toaster/upload-progress.component.ts
@@ -55,12 +55,18 @@ import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destr
<span class="filename" [textContent]="fileName"></span>
<progress max="100" value="0" #progressBar></progress>
<p #progressPercentage>0%</p>
- <span class="upload-completed" *ngIf="completed || error">
- <op-icon icon-classes="icon-close" *ngIf="error"></op-icon>
- <op-icon icon-classes="icon-checkmark" *ngIf="completed"></op-icon>
- </span>
+ @if (completed || error) {
+ <span class="upload-completed">
+ @if (error) {
+ <op-icon icon-classes="icon-close"></op-icon>
+ }
+ @if (completed) {
+ <op-icon icon-classes="icon-checkmark"></op-icon>
+ }
+ </span>
+ }
</li>
- `,
+ `,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
diff --git a/frontend/src/app/shared/components/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component.html b/frontend/src/app/shared/components/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component.html
index 792da3056ed..5242438d03b 100644
--- a/frontend/src/app/shared/components/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component.html
+++ b/frontend/src/app/shared/components/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component.html
@@ -1,3 +1,5 @@
-<op-query-filters *ngIf="!!filters"
- (filtersChanged)="filters = $event"
- [filters]="filters"></op-query-filters>
+@if (!!filters) {
+ <op-query-filters
+ (filtersChanged)="filters = $event"
+ [filters]="filters"></op-query-filters>
+}
diff --git a/frontend/src/app/shared/components/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component.html b/frontend/src/app/shared/components/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component.html
index 4e16a27f7db..d93a245b096 100644
--- a/frontend/src/app/shared/components/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component.html
+++ b/frontend/src/app/shared/components/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component.html
@@ -5,12 +5,14 @@
<div class="form--field-container">
<div class="form--select-container -middle">
<select [(ngModel)]="currentGroup"
- [ngModelOptions]="{standalone: true}"
- id="selected_grouping"
- class="form--select">
- <option *ngFor="let group of availableGroups"
- [ngValue]="group"
- [textContent]="group.name"></option>
+ [ngModelOptions]="{standalone: true}"
+ id="selected_grouping"
+ class="form--select">
+ @for (group of availableGroups; track group) {
+ <option
+ [ngValue]="group"
+ [textContent]="group.name"></option>
+ }
</select>
</div>
</div>
@@ -21,12 +23,14 @@
<div class="form--field-container">
<div class="form--select-container -middle">
<select [(ngModel)]="currentChartType"
- [ngModelOptions]="{standalone: true}"
- id="selected_chart_type"
- class="form--select">
- <option *ngFor="let type of availableChartTypes"
- [ngValue]="type"
- [textContent]="type.label"></option>
+ [ngModelOptions]="{standalone: true}"
+ id="selected_chart_type"
+ class="form--select">
+ @for (type of availableChartTypes; track type) {
+ <option
+ [ngValue]="type"
+ [textContent]="type.label"></option>
+ }
</select>
</div>
</div>
diff --git a/frontend/src/app/shared/components/work-package-graphs/embedded/wp-embedded-graph.html b/frontend/src/app/shared/components/work-package-graphs/embedded/wp-embedded-graph.html
index d0a2f4454de..0f8dfc10a77 100644
--- a/frontend/src/app/shared/components/work-package-graphs/embedded/wp-embedded-graph.html
+++ b/frontend/src/app/shared/components/work-package-graphs/embedded/wp-embedded-graph.html
@@ -1,14 +1,18 @@
<div class="op-wp-embedded-graph work-packages-embedded-view--container loading-indicator--location" #graphContainer [ngStyle]="{height: chartHeight}">
- <canvas baseChart
- [datasets]="chartData"
- [labels]="chartLabels"
- [plugins]="chartPlugins"
- [type]="mappedChartType"
- [options]="internalChartOptions"
- *ngIf="hasDataToDisplay">
- {{chartDescription}}
- </canvas>
- <op-no-results *ngIf="!hasDataToDisplay && initialized"
- [title]="text.noResults">
- </op-no-results>
+ @if (hasDataToDisplay) {
+ <canvas baseChart
+ [datasets]="chartData"
+ [labels]="chartLabels"
+ [plugins]="chartPlugins"
+ [type]="mappedChartType"
+ [options]="internalChartOptions"
+ >
+ {{chartDescription}}
+ </canvas>
+ }
+ @if (!hasDataToDisplay && initialized) {
+ <op-no-results
+ [title]="text.noResults">
+ </op-no-results>
+ }
</div>
diff --git a/frontend/src/app/shared/components/work-package-graphs/overview/wp-overview-graph.template.html b/frontend/src/app/shared/components/work-package-graphs/overview/wp-overview-graph.template.html
index 0470ca8388d..0895132f037 100644
--- a/frontend/src/app/shared/components/work-package-graphs/overview/wp-overview-graph.template.html
+++ b/frontend/src/app/shared/components/work-package-graphs/overview/wp-overview-graph.template.html
@@ -1,23 +1,31 @@
<select [(ngModel)]="groupBy"
- (ngModelChange)="setQueryProps()">
- <option [ngValue]="option.key" *ngFor="let option of availableGroupBy">{{option.label}}</option>
+ (ngModelChange)="setQueryProps()">
+ @for (option of availableGroupBy; track option) {
+ <option [ngValue]="option.key">{{option.label}}</option>
+ }
</select>
-<div *ngIf="error"
+@if (error) {
+ <div
class="op-toast -error">
<div class="op-toast--content"
- [textContent]="error">
+ [textContent]="error">
</div>
-</div>
+ </div>
+}
-<op-wp-embedded-graph #wpEmbeddedGraphMulti
- [datasets]="datasets"
- [chartOptions]="chartOptions"
- *ngIf="displayMulti">
-</op-wp-embedded-graph>
+@if (displayMulti) {
+ <op-wp-embedded-graph #wpEmbeddedGraphMulti
+ [datasets]="datasets"
+ [chartOptions]="chartOptions"
+ >
+ </op-wp-embedded-graph>
+}
-<op-wp-embedded-graph #wpEmbeddedGraphSingle
- [datasets]="datasets"
- [chartOptions]="chartOptions"
- *ngIf="displaySingle">
-</op-wp-embedded-graph>
+@if (displaySingle) {
+ <op-wp-embedded-graph #wpEmbeddedGraphSingle
+ [datasets]="datasets"
+ [chartOptions]="chartOptions"
+ >
+ </op-wp-embedded-graph>
+}
diff --git a/frontend/src/app/spot/components/drop-modal/drop-modal.component.html b/frontend/src/app/spot/components/drop-modal/drop-modal.component.html
index 4cfb51af1b8..f459eead2e6 100644
--- a/frontend/src/app/spot/components/drop-modal/drop-modal.component.html
+++ b/frontend/src/app/spot/components/drop-modal/drop-modal.component.html
@@ -6,25 +6,25 @@
></span>
<ng-template #body>
- <div
- *ngIf="opened"
- #anchor
- [attr.id]="id"
- [ngClass]="['spot-drop-modal--body', 'spot-container' ]"
- [class.spot-drop-modal--body_not-full-screen]="notFullscreen"
- (click)="onBodyClick($event)"
- cdkTrapFocus
- tabindex="0"
- >
- <ng-content select="[slot=body]"></ng-content>
-
- <button
- class="spot-drop-modal--close-button spot-button"
- type="button"
- [attr.aria-label]="text.close"
- (click)="close()"
- >
- <span class="spot-icon spot-icon_close"></span>
- </button>
- </div>
+ @if (opened) {
+ <div
+ #anchor
+ [attr.id]="id"
+ [ngClass]="['spot-drop-modal--body', 'spot-container' ]"
+ [class.spot-drop-modal--body_not-full-screen]="notFullscreen"
+ (click)="onBodyClick($event)"
+ cdkTrapFocus
+ tabindex="0"
+ >
+ <ng-content select="[slot=body]"></ng-content>
+ <button
+ class="spot-drop-modal--close-button spot-button"
+ type="button"
+ [attr.aria-label]="text.close"
+ (click)="close()"
+ >
+ <span class="spot-icon spot-icon_close"></span>
+ </button>
+ </div>
+ }
</ng-template>
diff --git a/frontend/src/app/spot/components/filter-chip/filter-chip.component.html b/frontend/src/app/spot/components/filter-chip/filter-chip.component.html
index 67014ede578..ed93c405ec3 100644
--- a/frontend/src/app/spot/components/filter-chip/filter-chip.component.html
+++ b/frontend/src/app/spot/components/filter-chip/filter-chip.component.html
@@ -1,17 +1,19 @@
-<button
- *ngIf="removable"
- class="spot-filter-chip--remove"
- type="button"
- (click)="remove.emit()"
- [attr.aria-label]="text.remove"
- [disabled]="disabled"
->
- <span class="spot-icon spot-icon_close"></span>
-</button>
+@if (removable) {
+ <button
+ class="spot-filter-chip--remove"
+ type="button"
+ (click)="remove.emit()"
+ [attr.aria-label]="text.remove"
+ [disabled]="disabled"
+ >
+ <span class="spot-icon spot-icon_close"></span>
+ </button>
+}
<div class="spot-filter-chip--title">
- <span
- *ngIf="icon"
- [ngClass]="iconClasses"
- ></span>
+ @if (icon) {
+ <span
+ [ngClass]="iconClasses"
+ ></span>
+ }
{{ title }}
</div>
diff --git a/frontend/src/app/spot/components/form-field/form-field.component.html b/frontend/src/app/spot/components/form-field/form-field.component.html
index c0a3ac4653b..0edff6c694c 100644
--- a/frontend/src/app/spot/components/form-field/form-field.component.html
+++ b/frontend/src/app/spot/components/form-field/form-field.component.html
@@ -1,53 +1,50 @@
-<ng-container *ngIf="!hidden">
+@if (!hidden) {
<label class="spot-form-field--label-wrap">
<div class="spot-form-field--label">
- <span
- *ngIf="showErrorMessage"
- class="sr-only"
- >
- {{ text.invalid }}
- </span>
+ @if (showErrorMessage) {
+ <span
+ class="sr-only"
+ >
+ {{ text.invalid }}
+ </span>
+ }
{{ label }}
-
- <span *ngIf="required" class="spot-form-field--label-indicator">*</span>
-
+ @if (required) {
+ <span class="spot-form-field--label-indicator">*</span>
+ }
<ng-content select="[slot=help-text]"></ng-content>
</div>
-
- <ng-container *ngIf="!noWrapLabel">
+ @if (!noWrapLabel) {
<ng-container *ngTemplateOutlet="inputTemplate"></ng-container>
- </ng-container>
+ }
</label>
-
- <ng-container *ngIf="noWrapLabel">
+ @if (noWrapLabel) {
<ng-container *ngTemplateOutlet="inputTemplate"></ng-container>
- </ng-container>
-
+ }
<div
class="spot-form-field--description"
[id]="descriptionID"
- >
+ >
<ng-content select="[slot=description]"></ng-content>
</div>
-
- <div
- class="spot-form-field--errors"
- *ngIf="showErrorMessage"
- [id]="errorsID"
- >
- <ng-content select="[slot=errors]"></ng-content>
- </div>
-
+ @if (showErrorMessage) {
+ <div
+ class="spot-form-field--errors"
+ [id]="errorsID"
+ >
+ <ng-content select="[slot=errors]"></ng-content>
+ </div>
+ }
<div class="spot-form-field--actions">
<ng-content select="[slot=action]"></ng-content>
</div>
-</ng-container>
+}
<ng-template #inputTemplate>
<div
class="spot-form-field--input"
[attr.aria-describedby]="describedByID"
- >
+ >
<ng-content select="[slot=input]"></ng-content>
</div>
</ng-template>
diff --git a/frontend/src/app/spot/components/selector-field/selector-field.component.html b/frontend/src/app/spot/components/selector-field/selector-field.component.html
index c2932b7b3ed..58a24cb69b4 100644
--- a/frontend/src/app/spot/components/selector-field/selector-field.component.html
+++ b/frontend/src/app/spot/components/selector-field/selector-field.component.html
@@ -1,45 +1,47 @@
-<ng-container *ngIf="!hidden">
+@if (!hidden) {
<label
class="spot-form-field--label-wrap spot-selector-field--label-wrap"
[ngClass]="{ 'spot-selector-field--label-wrap_reversed': reverseLabel }"
- >
+ >
<div
class="spot-form-field--input spot-selector-field--input"
[ngClass]="{ 'spot-selector-field--input_reversed': reverseLabel }"
[attr.aria-describedby]="describedByID"
- >
+ >
<ng-content select="[slot=input]"></ng-content>
</div>
-
- <div
- *ngIf="label"
- class="spot-form-field--label spot-selector-field--label"
- [ngClass]="{
- 'spot-selector-field--label_regular': labelWeight === 'regular'
- }"
- >
- <span
- *ngIf="showErrorMessage"
- class="Hidden for sighted"
- >Invalid</span>
- {{ label }}
- <span *ngIf="required" class="spot-form-field--label-indicator">*</span>
- <ng-content select="[slot=help-text]"></ng-content>
- </div>
+ @if (label) {
+ <div
+ class="spot-form-field--label spot-selector-field--label"
+ [ngClass]="{
+ 'spot-selector-field--label_regular': labelWeight === 'regular'
+ }"
+ >
+ @if (showErrorMessage) {
+ <span
+ class="Hidden for sighted"
+ >Invalid</span>
+ }
+ {{ label }}
+ @if (required) {
+ <span class="spot-form-field--label-indicator">*</span>
+ }
+ <ng-content select="[slot=help-text]"></ng-content>
+ </div>
+ }
</label>
-
<div
class="spot-form-field--description"
[id]="descriptionID"
- >
+ >
<ng-content select="[slot=description]"></ng-content>
</div>
-
- <div
- class="spot-form-field--errors"
- *ngIf="showErrorMessage"
- [id]="errorsID"
- >
- <ng-content select="[slot=errors]"></ng-content>
- </div>
-</ng-container>
+ @if (showErrorMessage) {
+ <div
+ class="spot-form-field--errors"
+ [id]="errorsID"
+ >
+ <ng-content select="[slot=errors]"></ng-content>
+ </div>
+ }
+}
diff --git a/frontend/src/app/spot/components/text-field/text-field.component.html b/frontend/src/app/spot/components/text-field/text-field.component.html
index c297b97af6c..aac7c5a4c77 100644
--- a/frontend/src/app/spot/components/text-field/text-field.component.html
+++ b/frontend/src/app/spot/components/text-field/text-field.component.html
@@ -12,13 +12,14 @@
(focus)="onInputFocus($event)"
(blur)="onInputBlur($event)"
#input
-/>
-<button
- *ngIf="showClearButton && value !== '' && !disabled"
- (click)="valueChanged('')"
- type="button"
- class="spot-text-field--clear-button"
->
- <span class="spot-icon spot-icon_close"></span>
-</button>
+ />
+@if (showClearButton && value !== '' && !disabled) {
+ <button
+ (click)="valueChanged('')"
+ type="button"
+ class="spot-text-field--clear-button"
+ >
+ <span class="spot-icon spot-icon_close"></span>
+ </button>
+}
<ng-content select="[slot=after]"></ng-content>
diff --git a/frontend/src/app/spot/components/toggle/toggle.component.html b/frontend/src/app/spot/components/toggle/toggle.component.html
index 7ac18585899..911b7cc50b5 100644
--- a/frontend/src/app/spot/components/toggle/toggle.component.html
+++ b/frontend/src/app/spot/components/toggle/toggle.component.html
@@ -1,18 +1,19 @@
-<label
- *ngFor="let option of options"
- [ngClass]="{ 'button': true, '-disabled': disabled, 'form--field-inline-button': true, '-active': value === option.value, 'spot-toggle--button': true }"
- data-test-selector="spot-toggle--option"
- [attr.data-qa-disabled]="disabled || undefined"
- [attr.data-qa-active-toggle]="value === option.value"
->
- <input
- class="spot-toggle--option-input"
- type="radio"
- [disabled]="disabled"
- [name]="name"
- [value]="option.value"
- [ngModel]="value"
- (ngModelChange)="onToggle($event)"
- />
- {{ option.title }}
-</label>
+@for (option of options; track option) {
+ <label
+ [ngClass]="{ 'button': true, '-disabled': disabled, 'form--field-inline-button': true, '-active': value === option.value, 'spot-toggle--button': true }"
+ data-test-selector="spot-toggle--option"
+ [attr.data-qa-disabled]="disabled || undefined"
+ [attr.data-qa-active-toggle]="value === option.value"
+ >
+ <input
+ class="spot-toggle--option-input"
+ type="radio"
+ [disabled]="disabled"
+ [name]="name"
+ [value]="option.value"
+ [ngModel]="value"
+ (ngModelChange)="onToggle($event)"
+ />
+ {{ option.title }}
+ </label>
+}
diff --git a/frontend/src/app/spot/components/tooltip/tooltip.component.html b/frontend/src/app/spot/components/tooltip/tooltip.component.html
index 331dcd24767..34c6e5771d9 100644
--- a/frontend/src/app/spot/components/tooltip/tooltip.component.html
+++ b/frontend/src/app/spot/components/tooltip/tooltip.component.html
@@ -1,7 +1,8 @@
<ng-content select="[slot=trigger]"></ng-content>
-<div
- *ngIf="!disabled"
- [ngClass]="['spot-tooltip--body', 'spot-container', alignmentClass]"
->
- <ng-content select="[slot=body]"></ng-content>
-</div>
+@if (!disabled) {
+ <div
+ [ngClass]="['spot-tooltip--body', 'spot-container', alignmentClass]"
+ >
+ <ng-content select="[slot=body]"></ng-content>
+ </div>
+}
diff --git a/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.html b/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.html
index 9630fdb2365..e720505a9aa 100644
--- a/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.html
+++ b/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.html
@@ -1,32 +1,36 @@
<div class="form--field">
- <label class="form--label"
- [ngClass]="{ '-error': fileInvalid }"
- [textContent]="text.label_choose_avatar"
- for="avatar_file_input">
- </label>
- <div class="form--field-container">
- <input #avatarFilePicker
- type="file"
- accept="image/jpeg,image/png,image/gif"
- id="avatar_file_input"
- name="avatar_file_input"
- (change)="onFilePickerChanged($event)" />
- </div>
- <div class="form--field-instructions">
- <span [textContent]="text.upload_instructions"></span>
- <div class="avatars--error-pane">
- <span *ngIf="fileInvalid" [textContent]="text.wrong_file_format"></span>
- </div>
+ <label class="form--label"
+ [ngClass]="{ '-error': fileInvalid }"
+ [textContent]="text.label_choose_avatar"
+ for="avatar_file_input">
+ </label>
+ <div class="form--field-container">
+ <input #avatarFilePicker
+ type="file"
+ accept="image/jpeg,image/png,image/gif"
+ id="avatar_file_input"
+ name="avatar_file_input"
+ (change)="onFilePickerChanged($event)" />
+ </div>
+ <div class="form--field-instructions">
+ <span [textContent]="text.upload_instructions"></span>
+ <div class="avatars--error-pane">
+ @if (fileInvalid) {
+ <span [textContent]="text.wrong_file_format"></span>
+ }
</div>
+ </div>
</div>
-<fieldset class="preview" *ngIf="avatarPreviewUrl">
+@if (avatarPreviewUrl) {
+ <fieldset class="preview">
<legend class="preview--legend" [textContent]="text.preview"></legend>
<img [src]="avatarPreviewUrl" class="avatars--local-avatar-preview" />
-</fieldset>
+ </fieldset>
+}
<button type="submit"
- (click)="uploadAvatar($event)"
- [attr.disabled]="!avatarFile || busy || undefined"
- [textContent]="text.button_update"
- class="button -primary -with-icon icon-checkmark">
+ (click)="uploadAvatar($event)"
+ [attr.disabled]="!avatarFile || busy || undefined"
+ [textContent]="text.button_update"
+ class="button -primary -with-icon icon-checkmark">
</button>
diff --git a/modules/github_integration/frontend/module/git-actions-menu/git-actions-menu.template.html b/modules/github_integration/frontend/module/git-actions-menu/git-actions-menu.template.html
index 66ee11151ed..26e12ca9e9c 100644
--- a/modules/github_integration/frontend/module/git-actions-menu/git-actions-menu.template.html
+++ b/modules/github_integration/frontend/module/git-actions-menu/git-actions-menu.template.html
@@ -1,23 +1,27 @@
<div class="git-actions-menu dropdown-relative dropdown -overflow-in-view dropdown-anchor-right">
<h3 class="title">{{text.title}}</h3>
- <div class="copy-wrapper spot-form-field" *ngFor="let snippet of snippets">
- <label class="spot-form-field--label-wrap">
- <div class="spot-form-field--label">{{ snippet.name }}</div>
- <div class="spot-form-field--input">
- <input type="text" class="copy-content op-input" readonly="true" [value]="snippet.textToDisplay()">
- <button
- class="button copy-button"
- type="button"
- [attr.aria-label]="text.copyButtonHelpText"
- (click)="onCopyButtonClick(snippet)"
- >
- <span class="spot-icon spot-icon_copy"></span>
- </button>
- <div class="copy-result-message" *ngIf="showCopyResult && snippet.id === copiedSnippetId" [textContent]="lastCopyResult"></div>
- </div>
- </label>
- </div>
+ @for (snippet of snippets; track snippet) {
+ <div class="copy-wrapper spot-form-field">
+ <label class="spot-form-field--label-wrap">
+ <div class="spot-form-field--label">{{ snippet.name }}</div>
+ <div class="spot-form-field--input">
+ <input type="text" class="copy-content op-input" readonly="true" [value]="snippet.textToDisplay()">
+ <button
+ class="button copy-button"
+ type="button"
+ [attr.aria-label]="text.copyButtonHelpText"
+ (click)="onCopyButtonClick(snippet)"
+ >
+ <span class="spot-icon spot-icon_copy"></span>
+ </button>
+ @if (showCopyResult && snippet.id === copiedSnippetId) {
+ <div class="copy-result-message" [textContent]="lastCopyResult"></div>
+ }
+ </div>
+ </label>
+ </div>
+ }
</div>
diff --git a/modules/github_integration/frontend/module/pull-request/pull-request-macro.component.html b/modules/github_integration/frontend/module/pull-request/pull-request-macro.component.html
index 794b385ecf9..5fa8862f55d 100644
--- a/modules/github_integration/frontend/module/pull-request/pull-request-macro.component.html
+++ b/modules/github_integration/frontend/module/pull-request/pull-request-macro.component.html
@@ -1,17 +1,18 @@
-<div
- class="op-pull-request-macro"
- *ngIf="(pullRequest$ | async) as pr; else loadingTemplate">
- <op-github-pull-request-state
- class="op-pull-request-macro--state"
- [small]="true"
- [state]="pullRequestState"
- ></op-github-pull-request-state>
- <span [innerHTML]="displayText$ | async"></span>
-</div>
-<ng-template #loadingTemplate>
+@if ((pullRequest$ | async); as pr) {
+ <div
+ class="op-pull-request-macro"
+ >
+ <op-github-pull-request-state
+ class="op-pull-request-macro--state"
+ [small]="true"
+ [state]="pullRequestState"
+ ></op-github-pull-request-state>
+ <span [innerHTML]="displayText$ | async"></span>
+ </div>
+} @else {
<op-content-loader
viewBox="0 0 200 5"
- >
+ >
<svg:rect x="0" y="0" width="100%" height="5" rx="1" />
</op-content-loader>
-</ng-template>
+}
diff --git a/modules/github_integration/frontend/module/pull-request/pull-request.component.html b/modules/github_integration/frontend/module/pull-request/pull-request.component.html
index 937b735720c..9ef7085b243 100644
--- a/modules/github_integration/frontend/module/pull-request/pull-request.component.html
+++ b/modules/github_integration/frontend/module/pull-request/pull-request.component.html
@@ -13,19 +13,21 @@
<div class="op-pull-request--info">
{{ text.label_created_by }}
- <div class="op-principal"
- *ngIf="pullRequest._embedded.githubUser">
- <img
- alt='PR author avatar'
- class='op-pull-request--avatar op-avatar op-avatar_mini op-principal--avatar'
- [src]="pullRequest._embedded.githubUser.avatarUrl"
- />
- <a
- [href]="pullRequest._embedded.githubUser.htmlUrl"
- [textContent]="pullRequest._embedded.githubUser.login"
- class="op-principal--name"
- ></a>
- </div>
+ @if (pullRequest._embedded.githubUser) {
+ <div class="op-principal"
+ >
+ <img
+ alt='PR author avatar'
+ class='op-pull-request--avatar op-avatar op-avatar_mini op-principal--avatar'
+ [src]="pullRequest._embedded.githubUser.avatarUrl"
+ />
+ <a
+ [href]="pullRequest._embedded.githubUser.htmlUrl"
+ [textContent]="pullRequest._embedded.githubUser.login"
+ class="op-principal--name"
+ ></a>
+ </div>
+ }
.
<span class='op-pull-request--date'>
@@ -39,32 +41,34 @@
[state]="state">
</op-github-pull-request-state>
-<span class="op-pull-request--checks-label"
- *ngIf="pullRequest._embedded.checkRuns?.length"
- [textContent]="text.label_actions"
-></span>
+@if (pullRequest._embedded.checkRuns?.length) {
+ <span class="op-pull-request--checks-label"
+ [textContent]="text.label_actions"
+ ></span>
+}
-<ul
- *ngIf="pullRequest._embedded.checkRuns?.length"
- [attr.aria-label]="text.label_actions"
- class='op-pull-request--checks'
->
- <li class='op-pr-check' *ngFor="let checkRun of pullRequest._embedded.checkRuns">
- <span class='op-pr-check--state-icon' [ngClass]="'op-pr-check--state-icon_' + checkRunState(checkRun)">
- <op-icon icon-classes="icon-{{ checkRunStateIcon(checkRun) }}"
- [icon-title]="checkRunStateText(checkRun)"></op-icon>
- </span>
- <span class='op-pr-check--avatar'><img alt='app owner avatar' [src]="checkRun.appOwnerAvatarUrl"/></span>
-
- <span class='op-pr-check--info'>
- <span class='op-pr-check--name' [textContent]="checkRun.name"></span>
- <span class='op-pr-check--state' [textContent]="checkRunStateText(checkRun)"></span>
- </span>
-
- <span class='op-pr-check--details'>
- <a [href]="checkRun.detailsUrl">
- {{ text.label_details }}
- </a>
- </span>
- </li>
-</ul>
+@if (pullRequest._embedded.checkRuns?.length) {
+ <ul
+ [attr.aria-label]="text.label_actions"
+ class='op-pull-request--checks'
+ >
+ @for (checkRun of pullRequest._embedded.checkRuns; track checkRun) {
+ <li class='op-pr-check'>
+ <span class='op-pr-check--state-icon' [ngClass]="'op-pr-check--state-icon_' + checkRunState(checkRun)">
+ <op-icon icon-classes="icon-{{ checkRunStateIcon(checkRun) }}"
+ [icon-title]="checkRunStateText(checkRun)"></op-icon>
+ </span>
+ <span class='op-pr-check--avatar'><img alt='app owner avatar' [src]="checkRun.appOwnerAvatarUrl"/></span>
+ <span class='op-pr-check--info'>
+ <span class='op-pr-check--name' [textContent]="checkRun.name"></span>
+ <span class='op-pr-check--state' [textContent]="checkRunStateText(checkRun)"></span>
+ </span>
+ <span class='op-pr-check--details'>
+ <a [href]="checkRun.detailsUrl">
+ {{ text.label_details }}
+ </a>
+ </span>
+ </li>
+ }
+ </ul>
+}
diff --git a/modules/github_integration/frontend/module/tab-prs/tab-prs.component.html b/modules/github_integration/frontend/module/tab-prs/tab-prs.component.html
index e8c9e37e551..edb4029c9f7 100644
--- a/modules/github_integration/frontend/module/tab-prs/tab-prs.component.html
+++ b/modules/github_integration/frontend/module/tab-prs/tab-prs.component.html
@@ -1,11 +1,12 @@
-<ng-container *ngIf="(pullRequests$ | async)?.length === 0">
+@if ((pullRequests$ | async)?.length === 0) {
<p
class="op-tab-content--text-box"
[innerHTML]="emptyText"
></p>
-</ng-container>
+}
-<op-github-pull-request
- *ngFor="let pullRequest of (pullRequests$ | async)"
- [pullRequest]="pullRequest"
-></op-github-pull-request>
+@for (pullRequest of (pullRequests$ | async); track pullRequest) {
+ <op-github-pull-request
+ [pullRequest]="pullRequest"
+ ></op-github-pull-request>
+}
diff --git a/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.template.html b/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.template.html
index aa5f4387185..7cde6649298 100644
--- a/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.template.html
+++ b/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.template.html
@@ -1,20 +1,24 @@
<div class="git-actions-menu dropdown-relative dropdown -overflow-in-view dropdown-anchor-right">
<h3 class="title">{{text.title}}</h3>
- <div class="copy-wrapper op-form-field" *ngFor="let snippet of snippets">
- <label class="op-form-field--label-wrap">
- <div class="op-form-field--label">{{ snippet.name }}</div>
- <div class="op-form-field--input">
- <input type="text" class="copy-content op-input" readonly="true" [value]="snippet.textToDisplay()">
- <button class="button copy-button"
+ @for (snippet of snippets; track snippet) {
+ <div class="copy-wrapper op-form-field">
+ <label class="op-form-field--label-wrap">
+ <div class="op-form-field--label">{{ snippet.name }}</div>
+ <div class="op-form-field--input">
+ <input type="text" class="copy-content op-input" readonly="true" [value]="snippet.textToDisplay()">
+ <button class="button copy-button"
type="button"
[attr.aria-label]="text.copyButtonHelpText"
(click)="onCopyButtonClick(snippet)">
- <op-icon icon-classes="button--icon icon-copy"></op-icon>
- </button>
- <div class="copy-result-message" *ngIf="showCopyResult && snippet.id === copiedSnippetId" [textContent]="lastCopyResult"></div>
- </div>
- </label>
- </div>
+ <op-icon icon-classes="button--icon icon-copy"></op-icon>
+ </button>
+ @if (showCopyResult && snippet.id === copiedSnippetId) {
+ <div class="copy-result-message" [textContent]="lastCopyResult"></div>
+ }
+ </div>
+ </label>
+ </div>
+ }
</div>
diff --git a/modules/gitlab_integration/frontend/module/issue/issue.component.html b/modules/gitlab_integration/frontend/module/issue/issue.component.html
index c9b9f855d78..69bacab9aff 100644
--- a/modules/gitlab_integration/frontend/module/issue/issue.component.html
+++ b/modules/gitlab_integration/frontend/module/issue/issue.component.html
@@ -5,50 +5,59 @@
<span class='op-issue--state' [ngClass]="'op-issue--state_' + state">
- <svg *ngIf="state === 'open'" op-gitlab-issue-open-icon size="small"></svg>
- <svg *ngIf="state !== 'open'" op-gitlab-issue-closed-icon size="small"></svg>
+ @if (state === 'open') {
+ <svg op-gitlab-issue-open-icon size="small"></svg>
+ }
+ @if (state !== 'open') {
+ <svg op-gitlab-issue-closed-icon size="small"></svg>
+ }
{{state}} |
<a
- [ngClass]="'op-issue--link_' + state"
- [href]="gitlabIssue.htmlUrl"
- target="blank"
- [textContent]="gitlabIssue.repository + '#' + gitlabIssue.number"
+ [ngClass]="'op-issue--link_' + state"
+ [href]="gitlabIssue.htmlUrl"
+ target="blank"
+ [textContent]="gitlabIssue.repository + '#' + gitlabIssue.number"
></a>
</span>
-<button *ngIf="gitlabIssue.labels && gitlabIssue.labels.length > 0" (click)="toggleLabels(gitlabIssue.number)" class='op-issue--label_icon' title="Show/Hide labels">
- <svg class="op-issue--label_icon_style" op-gitlab-labels-icon size="small"></svg>
-</button>
+@if (gitlabIssue.labels && gitlabIssue.labels.length > 0) {
+ <button (click)="toggleLabels(gitlabIssue.number)" class='op-issue--label_icon' title="Show/Hide labels">
+ <svg class="op-issue--label_icon_style" op-gitlab-labels-icon size="small"></svg>
+ </button>
+}
<div class="op-issue--info_created">
{{ text.label_created_by }}
<!-- <img
- alt='Issue author avatar'
- class='op-issue--avatar op-avatar op-avatar_mini'
- [src]="gitlabIssue.gitlabUser.avatarUrl"
- *ngIf="gitlabIssue.gitlabUser"
+ alt='Issue author avatar'
+ class='op-issue--avatar op-avatar op-avatar_mini'
+ [src]="gitlabIssue.gitlabUser.avatarUrl"
+ *ngIf="gitlabIssue.gitlabUser"
/>&nbsp; -->
<span class='op-issue--user'>
- <a
- [href]="'mailto:' + gitlabIssue.gitlabUser.email"
- class='op-issue--username'
- [textContent]="gitlabIssue.gitlabUser.login"
- *ngIf="gitlabIssue.gitlabUser"
- ></a>.
- </span>
- <span class='op-issue--date'>
- {{ text.label_last_updated_on }}
- <op-date-time [dateTimeValue]="gitlabIssue.gitlabUpdatedAt"></op-date-time>
- </span>.
-</div>
-
-<div
- class="op-issue--labels"
- [ngClass]="'op-issue--labels-' + gitlabIssue.number" style="display: none;">
- <span *ngFor="let label of gitlabIssue.labels">
- <span class='op-issue--label' [ngStyle]="{'background-color': label.color}" >
- {{label.title}}
+ @if (gitlabIssue.gitlabUser) {
+ <a
+ [href]="'mailto:' + gitlabIssue.gitlabUser.email"
+ class='op-issue--username'
+ [textContent]="gitlabIssue.gitlabUser.login"
+ ></a>
+ }.
</span>
- </span>
-</div>
+ <span class='op-issue--date'>
+ {{ text.label_last_updated_on }}
+ <op-date-time [dateTimeValue]="gitlabIssue.gitlabUpdatedAt"></op-date-time>
+ </span>.
+ </div>
+
+ <div
+ class="op-issue--labels"
+ [ngClass]="'op-issue--labels-' + gitlabIssue.number" style="display: none;">
+ @for (label of gitlabIssue.labels; track label) {
+ <span>
+ <span class='op-issue--label' [ngStyle]="{'background-color': label.color}" >
+ {{label.title}}
+ </span>
+ </span>
+ }
+ </div>
diff --git a/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.html b/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.html
index 28663a22b87..c0b4c01bf56 100644
--- a/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.html
+++ b/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.html
@@ -5,70 +5,105 @@
<span class='op-merge-request--state' [ngClass]="'op-merge-request--state_' + state">
- <svg *ngIf="state === 'open'" op-gitlab-merge-request-open-icon size="small"></svg>
- <svg *ngIf="state === 'ready'" op-gitlab-merge-request-ready-icon size="small"></svg>
- <svg *ngIf="state === 'merged'" op-gitlab-merge-request-merged-icon size="small"></svg>
- <svg *ngIf="state === 'closed'" op-gitlab-merge-request-closed-icon size="small"></svg>
+ @if (state === 'open') {
+ <svg op-gitlab-merge-request-open-icon size="small"></svg>
+ }
+ @if (state === 'ready') {
+ <svg op-gitlab-merge-request-ready-icon size="small"></svg>
+ }
+ @if (state === 'merged') {
+ <svg op-gitlab-merge-request-merged-icon size="small"></svg>
+ }
+ @if (state === 'closed') {
+ <svg op-gitlab-merge-request-closed-icon size="small"></svg>
+ }
{{state}} |
<a
- [ngClass]="'op-merge-request--link_' + state"
- [href]="mergeRequest.htmlUrl"
- target="blank"
- [textContent]="mergeRequest.repository + '#' + mergeRequest.number"
+ [ngClass]="'op-merge-request--link_' + state"
+ [href]="mergeRequest.htmlUrl"
+ target="blank"
+ [textContent]="mergeRequest.repository + '#' + mergeRequest.number"
></a>
</span>
-<button *ngIf="mergeRequest.labels && mergeRequest.labels.length > 0" (click)="toggleLabels(mergeRequest.number)" class='op-merge-request--label_icon' title="Show/Hide labels">
- <svg class="op-merge-request--label_icon_style" op-gitlab-labels-icon size="small"></svg>
-</button>
+@if (mergeRequest.labels && mergeRequest.labels.length > 0) {
+ <button (click)="toggleLabels(mergeRequest.number)" class='op-merge-request--label_icon' title="Show/Hide labels">
+ <svg class="op-merge-request--label_icon_style" op-gitlab-labels-icon size="small"></svg>
+ </button>
+}
-<span *ngIf="mergeRequest.pipelines && mergeRequest.pipelines.length > 0" class='op-merge-request--pipeline-icon'
- [ngClass]="'op-merge-request--pipeline-icon_bg_' + mergeRequest.pipelines[0].status">
-
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('failed')" op-gitlab-pipeline-status-failed-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('canceled')" op-gitlab-pipeline-status-canceled-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('created')" op-gitlab-pipeline-status-created-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('manual')" op-gitlab-pipeline-status-manual-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('pending')" op-gitlab-pipeline-status-pending-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('preparing')" op-gitlab-pipeline-status-preparing-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('running')" op-gitlab-pipeline-status-running-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('scheduled')" op-gitlab-pipeline-status-scheduled-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('skipped')" op-gitlab-pipeline-status-skipped-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('success')" op-gitlab-pipeline-status-success-icon size="small"></svg>
- <svg [ngClass]="pipelineIconClass" *ngIf="isCurrentPipelinestate('waiting')" op-gitlab-pipeline-status-waiting-icon size="small"></svg>
-
- <span class='op-merge-request--pipeline-label' [ngClass]="'op-merge-request--pipeline-label_' + mergeRequest.pipelines[0].status"> {{ mergeRequest.pipelines[0].status }} </span>
-</span>
+@if (mergeRequest.pipelines && mergeRequest.pipelines.length > 0) {
+ <span class='op-merge-request--pipeline-icon'
+ [ngClass]="'op-merge-request--pipeline-icon_bg_' + mergeRequest.pipelines[0].status">
+ @if (isCurrentPipelinestate('failed')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-failed-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('canceled')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-canceled-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('created')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-created-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('manual')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-manual-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('pending')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-pending-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('preparing')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-preparing-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('running')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-running-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('scheduled')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-scheduled-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('skipped')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-skipped-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('success')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-success-icon size="small"></svg>
+ }
+ @if (isCurrentPipelinestate('waiting')) {
+ <svg [ngClass]="pipelineIconClass" op-gitlab-pipeline-status-waiting-icon size="small"></svg>
+ }
+ <span class='op-merge-request--pipeline-label' [ngClass]="'op-merge-request--pipeline-label_' + mergeRequest.pipelines[0].status"> {{ mergeRequest.pipelines[0].status }} </span>
+ </span>
+}
<div class="op-merge-request--info_created">
{{ text.label_created_by }}
<!-- <img
- alt='MR author avatar'
- class='op-merge-request--avatar op-avatar op-avatar_mini'
- [src]="mergeRequest.gitlabUser.avatarUrl"
- *ngIf="mergeRequest.gitlabUser"
+ alt='MR author avatar'
+ class='op-merge-request--avatar op-avatar op-avatar_mini'
+ [src]="mergeRequest.gitlabUser.avatarUrl"
+ *ngIf="mergeRequest.gitlabUser"
/>&nbsp; -->
<span class='op-merge-request--user'>
- <a
- [href]="'mailto:' + mergeRequest.gitlabUser.email"
- class='op-merge-request--username'
- [textContent]="mergeRequest.gitlabUser.login"
- *ngIf="mergeRequest.gitlabUser"
- ></a>.
- </span>
- <span class='op-merge-request--date'>
- {{ text.label_last_updated_on }}
- <op-date-time [dateTimeValue]="mergeRequest.gitlabUpdatedAt"></op-date-time>
- </span>.
-</div>
-
-<div
- class="op-merge-request--labels"
- [ngClass]="'op-merge-request--labels-' + mergeRequest.number" style="display: none;">
- <span *ngFor="let label of mergeRequest.labels">
- <span class='op-merge-request--label' [ngStyle]="{'background-color': label.color}" >
- {{label.title}}
+ @if (mergeRequest.gitlabUser) {
+ <a
+ [href]="'mailto:' + mergeRequest.gitlabUser.email"
+ class='op-merge-request--username'
+ [textContent]="mergeRequest.gitlabUser.login"
+ ></a>
+ }.
</span>
- </span>
-</div>
+ <span class='op-merge-request--date'>
+ {{ text.label_last_updated_on }}
+ <op-date-time [dateTimeValue]="mergeRequest.gitlabUpdatedAt"></op-date-time>
+ </span>.
+ </div>
+
+ <div
+ class="op-merge-request--labels"
+ [ngClass]="'op-merge-request--labels-' + mergeRequest.number" style="display: none;">
+ @for (label of mergeRequest.labels; track label) {
+ <span>
+ <span class='op-merge-request--label' [ngStyle]="{'background-color': label.color}" >
+ {{label.title}}
+ </span>
+ </span>
+ }
+ </div>
diff --git a/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.template.html b/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.template.html
index 66a824dd67d..12e9a7cf5fa 100644
--- a/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.template.html
+++ b/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.template.html
@@ -1,8 +1,10 @@
-<ng-container *ngIf="gitlabIssues.length === 0">
+@if (gitlabIssues.length === 0) {
<p
class="op-tab-content--text-box"
[innerHTML]="getEmptyText()"
></p>
-</ng-container>
+}
-<gitlab-issue [gitlabIssue]="gitlabIssue" *ngFor="let gitlabIssue of gitlabIssues"></gitlab-issue>
+@for (gitlabIssue of gitlabIssues; track gitlabIssue) {
+ <gitlab-issue [gitlabIssue]="gitlabIssue"></gitlab-issue>
+}
diff --git a/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.template.html b/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.template.html
index 8405dc814b5..ec695e0792c 100644
--- a/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.template.html
+++ b/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.template.html
@@ -1,8 +1,10 @@
-<ng-container *ngIf="mergeRequests.length === 0">
+@if (mergeRequests.length === 0) {
<p
class="op-tab-content--text-box"
[innerHTML]="getEmptyText()"
></p>
-</ng-container>
+}
-<gitlab-merge-request [mergeRequest]="mergeRequest" *ngFor="let mergeRequest of mergeRequests"></gitlab-merge-request>
+@for (mergeRequest of mergeRequests; track mergeRequest) {
+ <gitlab-merge-request [mergeRequest]="mergeRequest"></gitlab-merge-request>
+}