Fix null/undefined incosistencies

- Introduced pipes for combined null/undefined checks: dsHasValue & dsHasNoValue
- Safer to async !== true than async === false
- Went over other instances of async === to confirm that they should be fine
This commit is contained in:
Yury Bondarenko
2024-03-06 17:04:54 +01:00
parent ebbbd64bae
commit 5edc689bc1
92 changed files with 210 additions and 154 deletions

View File

@@ -43,7 +43,7 @@
<ds-themed-loading *ngIf="searching$ | async"></ds-themed-loading> <ds-themed-loading *ngIf="searching$ | async"></ds-themed-loading>
<ds-pagination <ds-pagination
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && (searching$ | async) === false" *ngIf="(pageInfoState$ | async)?.totalElements > 0 && (searching$ | async) !== true"
[paginationOptions]="config" [paginationOptions]="config"
[pageInfoState]="pageInfoState$" [pageInfoState]="pageInfoState$"
[collectionSize]="(pageInfoState$ | async)?.totalElements" [collectionSize]="(pageInfoState$ | async)?.totalElements"

View File

@@ -25,7 +25,7 @@
</button> </button>
</div> </div>
<div *ngIf="displayResetPassword" between class="btn-group"> <div *ngIf="displayResetPassword" between class="btn-group">
<button class="btn btn-primary" [disabled]="(canReset$ | async) === false" type="button" (click)="resetPassword()"> <button class="btn btn-primary" [disabled]="(canReset$ | async) !== true" type="button" (click)="resetPassword()">
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}} <i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
</button> </button>
</div> </div>
@@ -47,7 +47,7 @@
<div *ngIf="epersonService.getActiveEPerson() | async"> <div *ngIf="epersonService.getActiveEPerson() | async">
<h2>{{messagePrefix + '.groupsEPersonIsMemberOf' | translate}}</h2> <h2>{{messagePrefix + '.groupsEPersonIsMemberOf' | translate}}</h2>
<ds-themed-loading [showMessage]="false" *ngIf="(groups$ | async) === undefined"></ds-themed-loading> <ds-themed-loading [showMessage]="false" *ngIf="groups$ | async | dsHasNoValue"></ds-themed-loading>
<ds-pagination <ds-pagination
*ngIf="(groups$ | async)?.payload?.totalElements > 0" *ngIf="(groups$ | async)?.payload?.totalElements > 0"

View File

@@ -61,6 +61,7 @@ import { PaginationServiceStub } from '../../../shared/testing/pagination-servic
import { RouterStub } from '../../../shared/testing/router.stub'; import { RouterStub } from '../../../shared/testing/router.stub';
import { createPaginatedList } from '../../../shared/testing/utils.test'; import { createPaginatedList } from '../../../shared/testing/utils.test';
import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model'; import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model';
import { HasNoValuePipe } from '../../../shared/utils/has-no-value.pipe';
import { EPeopleRegistryComponent } from '../epeople-registry.component'; import { EPeopleRegistryComponent } from '../epeople-registry.component';
import { EPersonFormComponent } from './eperson-form.component'; import { EPersonFormComponent } from './eperson-form.component';
import { ValidateEmailNotTaken } from './validators/email-taken.validator'; import { ValidateEmailNotTaken } from './validators/email-taken.validator';
@@ -231,7 +232,10 @@ describe('EPersonFormComponent', () => {
}, },
}), }),
], ],
declarations: [EPersonFormComponent], declarations: [
EPersonFormComponent,
HasNoValuePipe,
],
providers: [ providers: [
{ provide: EPersonDataService, useValue: ePersonDataServiceStub }, { provide: EPersonDataService, useValue: ePersonDataServiceStub },
{ provide: GroupDataService, useValue: groupsDataService }, { provide: GroupDataService, useValue: groupsDataService },

View File

@@ -25,7 +25,7 @@
<ds-alert *ngIf="groupBeingEdited?.permanent" [type]="AlertTypeEnum.Warning" <ds-alert *ngIf="groupBeingEdited?.permanent" [type]="AlertTypeEnum.Warning"
[content]="messagePrefix + '.alert.permanent'"></ds-alert> [content]="messagePrefix + '.alert.permanent'"></ds-alert>
<ds-alert *ngIf="(canEdit$ | async) === false && (groupDataService.getActiveGroup() | async)" [type]="AlertTypeEnum.Warning" <ds-alert *ngIf="(canEdit$ | async) !== true && (groupDataService.getActiveGroup() | async)" [type]="AlertTypeEnum.Warning"
[content]="(messagePrefix + '.alert.workflowGroup' | translate:{ name: dsoNameService.getName((getLinkedDSO(groupBeingEdited) | async)?.payload), comcol: (getLinkedDSO(groupBeingEdited) | async)?.payload?.type, comcolEditRolesRoute: (getLinkedEditRolesRoute(groupBeingEdited) | async) })"> [content]="(messagePrefix + '.alert.workflowGroup' | translate:{ name: dsoNameService.getName((getLinkedDSO(groupBeingEdited) | async)?.payload), comcol: (getLinkedDSO(groupBeingEdited) | async)?.payload?.type, comcolEditRolesRoute: (getLinkedEditRolesRoute(groupBeingEdited) | async) })">
</ds-alert> </ds-alert>

View File

@@ -35,7 +35,7 @@
<ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading> <ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading>
<ds-pagination <ds-pagination
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && (loading$ | async) === false" *ngIf="(pageInfoState$ | async)?.totalElements > 0 && (loading$ | async) !== true"
[paginationOptions]="config" [paginationOptions]="config"
[pageInfoState]="pageInfoState$" [pageInfoState]="pageInfoState$"
[collectionSize]="(pageInfoState$ | async)?.totalElements" [collectionSize]="(pageInfoState$ | async)?.totalElements"

View File

@@ -3,7 +3,7 @@
[attr.aria-label]="'menu.header.nav.description' | translate" [attr.aria-label]="'menu.header.nav.description' | translate"
[ngClass]="{'expanded': sidebarOpen, 'collapsed': sidebarClosed, 'transitioning': sidebarTransitioning}" [ngClass]="{'expanded': sidebarOpen, 'collapsed': sidebarClosed, 'transitioning': sidebarTransitioning}"
[@slideSidebar]="{ [@slideSidebar]="{
value: ((sidebarExpanded | async) === false ? 'collapsed' : 'expanded'), value: ((sidebarExpanded | async) !== true ? 'collapsed' : 'expanded'),
params: { collapsedWidth: (collapsedSidebarWidth$ | async), expandedWidth: (expandedSidebarWidth$ | async) } params: { collapsedWidth: (collapsedSidebarWidth$ | async), expandedWidth: (expandedSidebarWidth$ | async) }
}" (@slideSidebar.done)="finishSlide($event)" (@slideSidebar.start)="startSlide($event)" }" (@slideSidebar.done)="finishSlide($event)" (@slideSidebar.start)="startSlide($event)"
*ngIf="menuVisible | async" *ngIf="menuVisible | async"
@@ -49,7 +49,7 @@
<div class="sidebar-fixed-element-wrapper"> <div class="sidebar-fixed-element-wrapper">
<i *ngIf="(menuCollapsed | async)" class="fas fa-fw fa-angle-double-right" <i *ngIf="(menuCollapsed | async)" class="fas fa-fw fa-angle-double-right"
[title]="'menu.section.icon.pin' | translate"></i> [title]="'menu.section.icon.pin' | translate"></i>
<i *ngIf="(menuCollapsed | async) === false" class="fas fa-fw fa-angle-double-left" <i *ngIf="(menuCollapsed | async) !== true" class="fas fa-fw fa-angle-double-left"
[title]="'menu.section.icon.unpin' | translate"></i> [title]="'menu.section.icon.unpin' | translate"></i>
</div> </div>
<div class="sidebar-collapsible-element-outer-wrapper"> <div class="sidebar-collapsible-element-outer-wrapper">

View File

@@ -1,6 +1,6 @@
<section class="comcol-page-browse-section"> <section class="comcol-page-browse-section">
<div class="browse-by-metadata w-100"> <div class="browse-by-metadata w-100">
<ds-themed-browse-by *ngIf="(loading$ | async) === false" class="col-xs-12 w-100" <ds-themed-browse-by *ngIf="(loading$ | async) !== true" class="col-xs-12 w-100"
title="{{'browse.title' | translate:{ title="{{'browse.title' | translate:{
field: 'browse.metadata.' + browseId | translate, field: 'browse.metadata.' + browseId | translate,
startsWith: (startsWith)? ('browse.startsWith' | translate: { startsWith: '&quot;' + startsWith + '&quot;' }) : '', startsWith: (startsWith)? ('browse.startsWith' | translate: { startsWith: '&quot;' + startsWith + '&quot;' }) : '',

View File

@@ -11,7 +11,7 @@
</button> </button>
<button class="btn btn-danger" (click)="onConfirm(dso)" [disabled]="(processing$ | async)"> <button class="btn btn-danger" (click)="onConfirm(dso)" [disabled]="(processing$ | async)">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'collection.delete.processing' | translate}}</span> <span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'collection.delete.processing' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span> <span *ngIf="(processing$ | async) !== true"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span>
</button> </button>
</div> </div>
</div> </div>

View File

@@ -18,7 +18,7 @@
<span>{{contentSource?.message ? contentSource?.message: 'collection.source.controls.harvest.no-information'|translate }}</span> <span>{{contentSource?.message ? contentSource?.message: 'collection.source.controls.harvest.no-information'|translate }}</span>
</div> </div>
<button *ngIf="(testConfigRunning$ |async) === false" class="btn btn-secondary" <button *ngIf="(testConfigRunning$ |async) !== true" class="btn btn-secondary"
[disabled]="!(isEnabled)" [disabled]="!(isEnabled)"
(click)="testConfiguration(contentSource)"> (click)="testConfiguration(contentSource)">
<span>{{'collection.source.controls.test.submit' | translate}}</span> <span>{{'collection.source.controls.test.submit' | translate}}</span>
@@ -28,7 +28,7 @@
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span> <span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
<span>{{'collection.source.controls.test.running' | translate}}</span> <span>{{'collection.source.controls.test.running' | translate}}</span>
</button> </button>
<button *ngIf="(importRunning$ |async) === false" class="btn btn-primary" <button *ngIf="(importRunning$ |async) !== true" class="btn btn-primary"
[disabled]="!(isEnabled)" [disabled]="!(isEnabled)"
(click)="importNow()"> (click)="importNow()">
<span class="d-none d-sm-inline">{{'collection.source.controls.import.submit' | translate}}</span> <span class="d-none d-sm-inline">{{'collection.source.controls.import.submit' | translate}}</span>
@@ -38,7 +38,7 @@
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span> <span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
<span class="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span> <span class="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span>
</button> </button>
<button *ngIf="(reImportRunning$ |async) === false" class="btn btn-primary" <button *ngIf="(reImportRunning$ |async) !== true" class="btn btn-primary"
[disabled]="!(isEnabled)" [disabled]="!(isEnabled)"
(click)="resetAndReimport()"> (click)="resetAndReimport()">
<span class="d-none d-sm-inline">&nbsp;{{'collection.source.controls.reset.submit' | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{'collection.source.controls.reset.submit' | translate}}</span>

View File

@@ -1,7 +1,7 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="d-inline-block float-right space-children-mr"> <div class="d-inline-block float-right space-children-mr">
<button class=" btn btn-danger" *ngIf="(isReinstatable() | async) === false" <button class=" btn btn-danger" *ngIf="(isReinstatable() | async) !== true"
[disabled]="(hasChanges() | async) === false" [disabled]="(hasChanges() | async) !== true"
(click)="discard()"><i (click)="discard()"><i
class="fas fa-times"></i> class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -12,7 +12,7 @@
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
</button> </button>
<button class="btn btn-primary" <button class="btn btn-primary"
[disabled]="(hasChanges() | async) === false || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)" [disabled]="(hasChanges() | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
(click)="onSubmit()"><i (click)="onSubmit()"><i
class="fas fa-save"></i> class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>
@@ -44,8 +44,8 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="d-inline-block float-right ml-1 space-children-mr"> <div class="d-inline-block float-right ml-1 space-children-mr">
<button class=" btn btn-danger" *ngIf="(isReinstatable() | async) === false" <button class=" btn btn-danger" *ngIf="(isReinstatable() | async) !== true"
[disabled]="(hasChanges() | async) === false" [disabled]="(hasChanges() | async) !== true"
(click)="discard()"><i (click)="discard()"><i
class="fas fa-times"></i> class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -56,7 +56,7 @@
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
</button> </button>
<button class="btn btn-primary" <button class="btn btn-primary"
[disabled]="(hasChanges() | async) === false || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)" [disabled]="(hasChanges() | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
(click)="onSubmit()"><i (click)="onSubmit()"><i
class="fas fa-save"></i> class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>
@@ -66,7 +66,7 @@
</div> </div>
</div> </div>
<ds-collection-source-controls <ds-collection-source-controls
[isEnabled]="(hasChanges() | async) === false" [isEnabled]="(hasChanges() | async) !== true"
[shouldShow]="contentSource?.harvestType !== harvestTypeNone" [shouldShow]="contentSource?.harvestType !== harvestTypeNone"
[collection]="(collectionRD$ |async)?.payload" [collection]="(collectionRD$ |async)?.payload"
> >

View File

@@ -8,7 +8,7 @@
<span class="fa fa-chevron-right"></span> <span class="fa fa-chevron-right"></span>
</span> </span>
<div class="align-middle pt-2"> <div class="align-middle pt-2">
<button *ngIf="(dataSource.loading$ | async) === false" (click)="getNextPage(node)" <button *ngIf="(dataSource.loading$ | async) !== true" (click)="getNextPage(node)"
class="btn btn-outline-primary btn-sm" role="button"> class="btn btn-outline-primary btn-sm" role="button">
<i class="fas fa-angle-down"></i> {{ 'communityList.showMore' | translate }} <i class="fas fa-angle-down"></i> {{ 'communityList.showMore' | translate }}
</button> </button>
@@ -33,7 +33,7 @@
<span class="sr-only">{{ (node.isExpanded ? 'communityList.collapse' : 'communityList.expand') | translate:{ name: dsoNameService.getName(node.payload) } }}</span> <span class="sr-only">{{ (node.isExpanded ? 'communityList.collapse' : 'communityList.expand') | translate:{ name: dsoNameService.getName(node.payload) } }}</span>
</button> </button>
<!--Don't render the button when non-expandable otherwise it's still accessible, instead render this placeholder--> <!--Don't render the button when non-expandable otherwise it's still accessible, instead render this placeholder-->
<span *ngIf="(hasChild(null, node) | async) === false" aria-hidden="true" class="btn btn-default invisible"> <span *ngIf="(hasChild(null, node) | async) !== true" aria-hidden="true" class="btn btn-default invisible">
<span class="fa fa-chevron-right"></span> <span class="fa fa-chevron-right"></span>
</span> </span>
<div class="d-flex flex-row"> <div class="d-flex flex-row">

View File

@@ -11,7 +11,7 @@
</button> </button>
<button class="btn btn-danger" (click)="onConfirm(dso)" [disabled]="(processing$ | async)"> <button class="btn btn-danger" (click)="onConfirm(dso)" [disabled]="(processing$ | async)">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin' aria-hidden="true"></i> {{'community.delete.processing' | translate}}</span> <span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin' aria-hidden="true"></i> {{'community.delete.processing' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fas fa-trash" aria-hidden="true"></i> {{'community.delete.confirm' | translate}}</span> <span *ngIf="(processing$ | async) !== true"><i class="fas fa-trash" aria-hidden="true"></i> {{'community.delete.confirm' | translate}}</span>
</button> </button>
</div> </div>
</div> </div>

View File

@@ -3,7 +3,7 @@
[ngClass]="{ 'ds-warning': mdValue.reordered || mdValue.change === DsoEditMetadataChangeTypeEnum.UPDATE, 'ds-danger': mdValue.change === DsoEditMetadataChangeTypeEnum.REMOVE, 'ds-success': mdValue.change === DsoEditMetadataChangeTypeEnum.ADD, 'h-100': isOnlyValue }"> [ngClass]="{ 'ds-warning': mdValue.reordered || mdValue.change === DsoEditMetadataChangeTypeEnum.UPDATE, 'ds-danger': mdValue.change === DsoEditMetadataChangeTypeEnum.REMOVE, 'ds-success': mdValue.change === DsoEditMetadataChangeTypeEnum.ADD, 'h-100': isOnlyValue }">
<div class="flex-grow-1 ds-flex-cell ds-value-cell d-flex flex-column" *ngVar="(mdRepresentation$ | async) as mdRepresentation" role="cell"> <div class="flex-grow-1 ds-flex-cell ds-value-cell d-flex flex-column" *ngVar="(mdRepresentation$ | async) as mdRepresentation" role="cell">
<div class="dont-break-out preserve-line-breaks" *ngIf="!mdValue.editing && !mdRepresentation">{{ mdValue.newValue.value }}</div> <div class="dont-break-out preserve-line-breaks" *ngIf="!mdValue.editing && !mdRepresentation">{{ mdValue.newValue.value }}</div>
<textarea class="form-control" rows="5" *ngIf="mdValue.editing && !mdRepresentation && (isAuthorityControlled() | async) === false" [(ngModel)]="mdValue.newValue.value" <textarea class="form-control" rows="5" *ngIf="mdValue.editing && !mdRepresentation && (isAuthorityControlled() | async) !== true" [(ngModel)]="mdValue.newValue.value"
[attr.aria-label]="(dsoType + '.edit.metadata.edit.value') | translate" [attr.aria-label]="(dsoType + '.edit.metadata.edit.value') | translate"
[dsDebounce]="300" (onDebounce)="confirm.emit(false)"></textarea> [dsDebounce]="300" (onDebounce)="confirm.emit(false)"></textarea>
<ds-dynamic-scrollable-dropdown *ngIf="mdValue.editing && (isScrollableVocabulary() | async)" <ds-dynamic-scrollable-dropdown *ngIf="mdValue.editing && (isScrollableVocabulary() | async)"

View File

@@ -1,4 +1,4 @@
<div [ngClass]="{'open': (isNavBarCollapsed$ | async) === false}" id="header-navbar-wrapper"> <div [ngClass]="{'open': (isNavBarCollapsed$ | async) !== true}" id="header-navbar-wrapper">
<ds-themed-header></ds-themed-header> <ds-themed-header></ds-themed-header>
<ds-themed-navbar></ds-themed-navbar> <ds-themed-navbar></ds-themed-navbar>
</div> </div>

View File

@@ -15,7 +15,7 @@
{{'item.edit.tabs.' + page.page + '.head' | translate}} {{'item.edit.tabs.' + page.page + '.head' | translate}}
</a> </a>
<span [ngbTooltip]="'item.edit.tabs.disabled.tooltip' | translate"> <span [ngbTooltip]="'item.edit.tabs.disabled.tooltip' | translate">
<button *ngIf="(page.enabled | async) === false" <button *ngIf="(page.enabled | async) !== true"
class="nav-link disabled"> class="nav-link disabled">
{{'item.edit.tabs.' + page.page + '.head' | translate}} {{'item.edit.tabs.' + page.page + '.head' | translate}}
</button> </button>

View File

@@ -12,15 +12,15 @@
class="fas fa-undo-alt"></i> class="fas fa-undo-alt"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.reinstate-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.reinstate-button" | translate}}</span>
</button> </button>
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false || submitting" <button class="btn btn-primary" [disabled]="(hasChanges() | async) !== true || submitting"
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate" [attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
(click)="submit()"><i (click)="submit()"><i
class="fas fa-save"></i> class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.save-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.save-button" | translate}}</span>
</button> </button>
<button class="btn btn-danger" *ngIf="(isReinstatable() | async) === false" <button class="btn btn-danger" *ngIf="(isReinstatable() | async) !== true"
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate" [attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
[disabled]="(hasChanges() | async) === false || submitting" [disabled]="(hasChanges() | async) !== true || submitting"
(click)="discard()"><i (click)="discard()"><i
class="fas fa-times"></i> class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.discard-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.discard-button" | translate}}</span>
@@ -58,15 +58,15 @@
class="fas fa-undo-alt"></i> class="fas fa-undo-alt"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.reinstate-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.reinstate-button" | translate}}</span>
</button> </button>
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false || submitting" <button class="btn btn-primary" [disabled]="(hasChanges() | async) !== true || submitting"
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate" [attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
(click)="submit()"><i (click)="submit()"><i
class="fas fa-save"></i> class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.save-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.save-button" | translate}}</span>
</button> </button>
<button class="btn btn-danger" *ngIf="(isReinstatable() | async) === false" <button class="btn btn-danger" *ngIf="(isReinstatable() | async) !== true"
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate" [attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
[disabled]="(hasChanges() | async) === false || submitting" [disabled]="(hasChanges() | async) !== true || submitting"
(click)="discard()"><i (click)="discard()"><i
class="fas fa-times"></i> class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.discard-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.bitstreams.discard-button" | translate}}</span>

View File

@@ -5,7 +5,7 @@
[paginationOptions]="options" [paginationOptions]="options"
[pageInfoState]="(objectsRD$ | async)?.payload" [pageInfoState]="(objectsRD$ | async)?.payload"
[collectionSize]="(objectsRD$ | async)?.payload?.totalElements"> [collectionSize]="(objectsRD$ | async)?.payload?.totalElements">
<ng-container *ngIf="(loading$ | async) === false"> <ng-container *ngIf="(loading$ | async) !== true">
<div [id]="bundle.id" class="bundle-bitstreams-list" <div [id]="bundle.id" class="bundle-bitstreams-list"
[ngClass]="{'mb-3': (objectsRD$ | async)?.payload?.totalElements > pageSize}" [ngClass]="{'mb-3': (objectsRD$ | async)?.payload?.totalElements > pageSize}"
*ngVar="(updates$ | async) as updates" cdkDropList (cdkDropListDropped)="drop($event)"> *ngVar="(updates$ | async) as updates" cdkDropList (cdkDropListDropped)="drop($event)">

View File

@@ -6,7 +6,7 @@
</button> </button>
</h2> </h2>
<ng-container *ngVar="updates$ | async as updates"> <ng-container *ngVar="updates$ | async as updates">
<ng-container *ngIf="updates && (loading$ | async) === false"> <ng-container *ngIf="updates && (loading$ | async) !== true">
<ng-container *ngVar="updates | dsObjectValues as updateValues"> <ng-container *ngVar="updates | dsObjectValues as updateValues">
<ds-pagination <ds-pagination
[paginationOptions]="paginationConfig" [paginationOptions]="paginationConfig"

View File

@@ -2,8 +2,8 @@
<ng-container *ngVar="entityType$ | async as entityType"> <ng-container *ngVar="entityType$ | async as entityType">
<ng-container *ngIf="entityType"> <ng-container *ngIf="entityType">
<div class="button-row top d-flex space-children-mr"> <div class="button-row top d-flex space-children-mr">
<button class="btn btn-danger ml-auto" *ngIf="(isReinstatable() | async) === false" <button class="btn btn-danger ml-auto" *ngIf="(isReinstatable() | async) !== true"
[disabled]="(hasChanges() | async) === false" [disabled]="(hasChanges() | async) !== true"
(click)="discard()"><i (click)="discard()"><i
class="fas fa-times"></i> class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -13,7 +13,7 @@
class="fas fa-undo-alt"></i> class="fas fa-undo-alt"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
</button> </button>
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false" <button class="btn btn-primary" [disabled]="(hasChanges() | async) !== true"
(click)="submit()"><i (click)="submit()"><i
class="fas fa-save"></i> class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>
@@ -36,8 +36,8 @@
</ng-container> </ng-container>
<div class="button-row bottom"> <div class="button-row bottom">
<div class="float-right space-children-mr ml-gap"> <div class="float-right space-children-mr ml-gap">
<button class="btn btn-danger" *ngIf="(isReinstatable() | async) === false" <button class="btn btn-danger" *ngIf="(isReinstatable() | async) !== true"
[disabled]="(hasChanges() | async) === false" [disabled]="(hasChanges() | async) !== true"
(click)="discard()"><i (click)="discard()"><i
class="fas fa-times"></i> class="fas fa-times"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -47,7 +47,7 @@
class="fas fa-undo-alt"></i> class="fas fa-undo-alt"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
</button> </button>
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false" <button class="btn btn-primary" [disabled]="(hasChanges() | async) !== true"
(click)="submit()"><i (click)="submit()"><i
class="fas fa-save"></i> class="fas fa-save"></i>
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span> <span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>

View File

@@ -10,7 +10,7 @@
</div> </div>
<a <a
*ngIf="(isLoading$ | async) === false && (hasMore$ | async)" *ngIf="(isLoading$ | async) !== true && (hasMore$ | async)"
(click)="$event.preventDefault(); handleLoadMore()" (click)="$event.preventDefault(); handleLoadMore()"
class="load-more-btn btn btn-sm btn-outline-secondary" class="load-more-btn btn btn-sm btn-outline-secondary"
role="button" role="button"

View File

@@ -25,7 +25,7 @@
<div class="card-header">{{ 'person.page.orcid.missing-authorizations'| translate }}</div> <div class="card-header">{{ 'person.page.orcid.missing-authorizations'| translate }}</div>
<div class="card-body"> <div class="card-body">
<div class="container"> <div class="container">
<ds-alert *ngIf="(hasMissingOrcidAuthorizations() | async) === false" [type]="'alert-success'" data-test="noMissingOrcidAuthorizations"> <ds-alert *ngIf="(hasMissingOrcidAuthorizations() | async) !== true" [type]="'alert-success'" data-test="noMissingOrcidAuthorizations">
{{'person.page.orcid.no-missing-authorizations-message' | translate}} {{'person.page.orcid.no-missing-authorizations-message' | translate}}
</ds-alert> </ds-alert>
<ds-alert *ngIf="(hasMissingOrcidAuthorizations() | async)" [type]="'alert-warning'" data-test="missingOrcidAuthorizations"> <ds-alert *ngIf="(hasMissingOrcidAuthorizations() | async)" [type]="'alert-warning'" data-test="missingOrcidAuthorizations">
@@ -41,7 +41,7 @@
</div> </div>
</div> </div>
</div> </div>
<ds-alert *ngIf="(onlyAdminCanDisconnectProfileFromOrcid() | async) && (ownerCanDisconnectProfileFromOrcid() | async) === false" <ds-alert *ngIf="(onlyAdminCanDisconnectProfileFromOrcid() | async) && (ownerCanDisconnectProfileFromOrcid() | async) !== true"
[type]="'alert-warning'" data-test="unlinkOnlyAdmin"> [type]="'alert-warning'" data-test="unlinkOnlyAdmin">
{{ 'person.page.orcid.remove-orcid-message' | translate}} {{ 'person.page.orcid.remove-orcid-message' | translate}}
</ds-alert> </ds-alert>
@@ -49,7 +49,7 @@
<div class="col"> <div class="col">
<button type="submit" class="btn btn-danger float-right" (click)="unlinkOrcid()" <button type="submit" class="btn btn-danger float-right" (click)="unlinkOrcid()"
[disabled]="(unlinkProcessing | async)"> [disabled]="(unlinkProcessing | async)">
<span *ngIf="(unlinkProcessing | async) === false"><i <span *ngIf="(unlinkProcessing | async) !== true"><i
class="fas fa-unlink"></i> {{ 'person.page.orcid.unlink' | translate }}</span> class="fas fa-unlink"></i> {{ 'person.page.orcid.unlink' | translate }}</span>
<span *ngIf="(unlinkProcessing | async)"><i <span *ngIf="(unlinkProcessing | async)"><i
class='fas fa-circle-notch fa-spin'></i> {{'person.page.orcid.unlink.processing' | translate}}</span> class='fas fa-circle-notch fa-spin'></i> {{'person.page.orcid.unlink.processing' | translate}}</span>

View File

@@ -1,14 +1,14 @@
<ds-loading *ngIf="(processingConnection | async)" [message]="'person.page.orcid.link.processing' | translate"></ds-loading> <ds-loading *ngIf="(processingConnection | async)" [message]="'person.page.orcid.link.processing' | translate"></ds-loading>
<div class="container" *ngIf="(processingConnection | async) === false && (connectionStatus | async) === false" data-test="error-box"> <div class="container" *ngIf="(processingConnection | async) !== true && (connectionStatus | async) !== true" data-test="error-box">
<ds-alert [type]="'alert-danger'">{{'person.page.orcid.link.error.message' | translate}}</ds-alert> <ds-alert [type]="'alert-danger'">{{'person.page.orcid.link.error.message' | translate}}</ds-alert>
</div> </div>
<ng-container *ngIf="(processingConnection | async) === false && (item | async) && (connectionStatus | async)" > <ng-container *ngIf="(processingConnection | async) !== true && (item | async) && (connectionStatus | async)" >
<ds-orcid-auth [item]="(item | async)" (unlink)="updateItem()" data-test="orcid-auth"></ds-orcid-auth> <ds-orcid-auth [item]="(item | async)" (unlink)="updateItem()" data-test="orcid-auth"></ds-orcid-auth>
<ds-orcid-sync-setting *ngIf="isLinkedToOrcid()" [item]="(item | async)" (settingsUpdated)="updateItem()" data-test="orcid-sync-setting"></ds-orcid-sync-setting> <ds-orcid-sync-setting *ngIf="isLinkedToOrcid()" [item]="(item | async)" (settingsUpdated)="updateItem()" data-test="orcid-sync-setting"></ds-orcid-sync-setting>
<ds-orcid-queue *ngIf="isLinkedToOrcid()" [item]="(item | async)"></ds-orcid-queue> <ds-orcid-queue *ngIf="isLinkedToOrcid()" [item]="(item | async)"></ds-orcid-queue>
</ng-container> </ng-container>
<div *ngIf="(processingConnection | async) === false && (item | async)" class="container"> <div *ngIf="(processingConnection | async) !== true && (item | async)" class="container">
<div class="button-row bottom mb-3"> <div class="button-row bottom mb-3">
<div class="text-right"> <div class="text-right">
<a [routerLink]="getItemPage()" role="button" class="btn btn-outline-secondary" data-test="back-button"> <a [routerLink]="getItemPage()" role="button" class="btn btn-outline-secondary" data-test="back-button">

View File

@@ -3,11 +3,11 @@
<div class="container"> <div class="container">
<h2>{{ 'person.orcid.registry.queue' | translate }}</h2> <h2>{{ 'person.orcid.registry.queue' | translate }}</h2>
<ds-alert *ngIf="(processing$ | async) === false && (getList() | async)?.payload?.totalElements === 0" <ds-alert *ngIf="(processing$ | async) !== true && (getList() | async)?.payload?.totalElements === 0"
[type]="AlertTypeEnum.Info"> [type]="AlertTypeEnum.Info">
{{ 'person.page.orcid.sync-queue.empty-message' | translate}} {{ 'person.page.orcid.sync-queue.empty-message' | translate}}
</ds-alert> </ds-alert>
<ds-pagination *ngIf="(processing$ | async) === false && (getList() | async)?.payload?.totalElements > 0" <ds-pagination *ngIf="(processing$ | async) !== true && (getList() | async)?.payload?.totalElements > 0"
[paginationOptions]="paginationOptions" [paginationOptions]="paginationOptions"
[collectionSize]="(getList() | async)?.payload?.totalElements" [collectionSize]="(getList() | async)?.payload?.totalElements"
[retainScrollPosition]="false" [hideGear]="true" (paginationChange)="updateList()"> [retainScrollPosition]="false" [hideGear]="true" (paginationChange)="updateList()">

View File

@@ -1,4 +1,4 @@
<div *ngIf="(this.submitted$ | async) === false; else waiting"> <div *ngIf="(this.submitted$ | async) !== true; else waiting">
<div class="modal-header">{{'item.version.create.modal.header' | translate}} <div class="modal-header">{{'item.version.create.modal.header' | translate}}
<button type="button" class="close" (click)="onModalClose()" aria-label="Close"> <button type="button" class="close" (click)="onModalClose()" aria-label="Close">
<span aria-hidden="true">×</span> <span aria-hidden="true">×</span>

View File

@@ -1,6 +1,6 @@
<div class="add" *ngIf="(moreThanOne$ | async) === false"> <div class="add" *ngIf="(moreThanOne$ | async) !== true">
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" <button class="btn btn-lg btn-outline-primary mt-1 ml-2"
[attr.aria-label]="'mydspace.new-submission-external' | translate" [disabled]="(initialized$ | async) === false" [attr.aria-label]="'mydspace.new-submission-external' | translate" [disabled]="(initialized$ | async) !== true"
(click)="openPage(singleEntity)" role="button" (click)="openPage(singleEntity)" role="button"
title="{{'mydspace.new-submission-external' | translate}}"> title="{{'mydspace.new-submission-external' | translate}}">
<i class="fa fa-file-import" aria-hidden="true"></i> <i class="fa fa-file-import" aria-hidden="true"></i>
@@ -10,7 +10,7 @@
ngbDropdown ngbDropdown
*ngIf="(moreThanOne$ | async)"> *ngIf="(moreThanOne$ | async)">
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" id="dropdownImport" ngbDropdownToggle <button class="btn btn-lg btn-outline-primary mt-1 ml-2" id="dropdownImport" ngbDropdownToggle
type="button" [disabled]="(initialized$ | async) === false" type="button" [disabled]="(initialized$ | async) !== true"
[attr.aria-label]="'mydspace.new-submission-external' | translate" [attr.aria-label]="'mydspace.new-submission-external' | translate"
[attr.data-test]="'import-dropdown' | dsBrowserOnly" [attr.data-test]="'import-dropdown' | dsBrowserOnly"
title="{{'mydspace.new-submission-external' | translate}}"> title="{{'mydspace.new-submission-external' | translate}}">

View File

@@ -1,6 +1,6 @@
<div class="add" *ngIf="(moreThanOne$ | async) === false"> <div class="add" *ngIf="(moreThanOne$ | async) !== true">
<button class="btn btn-lg btn-primary mt-1 ml-2" [attr.aria-label]="'mydspace.new-submission' | translate" <button class="btn btn-lg btn-primary mt-1 ml-2" [attr.aria-label]="'mydspace.new-submission' | translate"
[disabled]="(initialized$ | async) === false" (click)="openDialog(singleEntity)" role="button"> [disabled]="(initialized$ | async) !== true" (click)="openDialog(singleEntity)" role="button">
<i class="fa fa-plus-circle" aria-hidden="true"></i> <i class="fa fa-plus-circle" aria-hidden="true"></i>
</button> </button>
</div> </div>
@@ -8,7 +8,7 @@
ngbDropdown ngbDropdown
*ngIf="(moreThanOne$ | async)"> *ngIf="(moreThanOne$ | async)">
<button class="btn btn-lg btn-primary mt-1 ml-2" id="dropdownSubmission" ngbDropdownToggle <button class="btn btn-lg btn-primary mt-1 ml-2" id="dropdownSubmission" ngbDropdownToggle
type="button" [disabled]="(initialized$ | async) === false" type="button" [disabled]="(initialized$ | async) !== true"
[attr.aria-label]="'mydspace.new-submission' | translate" [attr.aria-label]="'mydspace.new-submission' | translate"
[attr.data-test]="'submission-dropdown' | dsBrowserOnly" [attr.data-test]="'submission-dropdown' | dsBrowserOnly"
title="{{'mydspace.new-submission' | translate}}"> title="{{'mydspace.new-submission' | translate}}">

View File

@@ -1,9 +1,9 @@
<nav [ngClass]="{'open': (menuCollapsed | async) === false}" <nav [ngClass]="{'open': (menuCollapsed | async) !== true}"
[@slideMobileNav]="(windowService.isXsOrSm() | async) === false ? 'default' : ((menuCollapsed | async) ? 'collapsed' : 'expanded')" [@slideMobileNav]="(windowService.isXsOrSm() | async) !== true ? 'default' : ((menuCollapsed | async) ? 'collapsed' : 'expanded')"
class="navbar navbar-light navbar-expand-md px-md-0 pt-md-0 pt-3 navbar-container" role="navigation" class="navbar navbar-light navbar-expand-md px-md-0 pt-md-0 pt-3 navbar-container" role="navigation"
[attr.aria-label]="'nav.main.description' | translate" id="main-navbar"> [attr.aria-label]="'nav.main.description' | translate" id="main-navbar">
<!-- TODO remove navbar-container class when https://github.com/twbs/bootstrap/issues/24726 is fixed --> <!-- TODO remove navbar-container class when https://github.com/twbs/bootstrap/issues/24726 is fixed -->
<div class="navbar-inner-container w-100" [class.container]="(isMobile$ | async) === false"> <div class="navbar-inner-container w-100" [class.container]="(isMobile$ | async) !== true">
<div class="w-100"> <div class="w-100">
<div id="collapsingNav"> <div id="collapsingNav">
<ng-container *ngIf="(isMobile$ | async) && (isAuthenticated$ | async)"> <ng-container *ngIf="(isMobile$ | async) && (isAuthenticated$ | async)">

View File

@@ -23,7 +23,7 @@
<ds-loading class="container" *ngIf="(isEventPageLoading | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading> <ds-loading class="container" *ngIf="(isEventPageLoading | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>
<ds-pagination *ngIf="(isEventPageLoading | async) === false" <ds-pagination *ngIf="(isEventPageLoading | async) !== true"
[paginationOptions]="paginationConfig" [paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)" [collectionSize]="(totalElements$ | async)"
[sortOptions]="paginationSortConfig" [sortOptions]="paginationSortConfig"
@@ -196,7 +196,7 @@
<i class="fas fa-trash-alt"></i> <i class="fas fa-trash-alt"></i>
</button> </button>
</div> </div>
<div *ngIf="(isAdmin$ | async) === false" class="btn-group button-width"> <div *ngIf="(isAdmin$ | async) !== true" class="btn-group button-width">
<button class="btn btn-outline-danger btn-sm button-width" <button class="btn btn-outline-danger btn-sm button-width"
ngbTooltip="{{'quality-assurance.event.action.undo' | translate}}" ngbTooltip="{{'quality-assurance.event.action.undo' | translate}}"
container="body" container="body"

View File

@@ -38,7 +38,7 @@
</div> </div>
<ds-loading *ngIf="(isLoading$ | async)" message="{{'loading.search-results' | translate}}"></ds-loading> <ds-loading *ngIf="(isLoading$ | async)" message="{{'loading.search-results' | translate}}"></ds-loading>
<ds-themed-search-results *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length > 0 && (isLoading$ | async) === false" <ds-themed-search-results *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length > 0 && (isLoading$ | async) !== true"
[searchResults]="(localEntitiesRD$ | async)" [searchResults]="(localEntitiesRD$ | async)"
[sortConfig]="this.searchOptions?.sort" [sortConfig]="this.searchOptions?.sort"
[searchConfig]="this.searchOptions" [searchConfig]="this.searchOptions"
@@ -53,7 +53,7 @@
(selectObject)="selectEntity($event)"> (selectObject)="selectEntity($event)">
</ds-themed-search-results> </ds-themed-search-results>
<div *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length < 1 && (isLoading$ | async) === false"> <div *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length < 1 && (isLoading$ | async) !== true">
<ds-alert [type]="'alert-info'"> <ds-alert [type]="'alert-info'">
<p class="lead mb-0">{{(labelPrefix + label + '.notFound' | translate)}}</p> <p class="lead mb-0">{{(labelPrefix + label + '.notFound' | translate)}}</p>
</ds-alert> </ds-alert>

View File

@@ -10,7 +10,7 @@
<h4 class="border-bottom pb-2">{{'quality-assurance.source'| translate}}</h4> <h4 class="border-bottom pb-2">{{'quality-assurance.source'| translate}}</h4>
<ds-loading class="container" *ngIf="(isSourceLoading() | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading> <ds-loading class="container" *ngIf="(isSourceLoading() | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>
<ds-pagination *ngIf="(isSourceLoading() | async) === false" <ds-pagination *ngIf="(isSourceLoading() | async) !== true"
[paginationOptions]="paginationConfig" [paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)" [collectionSize]="(totalElements$ | async)"
[hideGear]="false" [hideGear]="false"
@@ -18,7 +18,7 @@
(paginationChange)="getQualityAssuranceSource()"> (paginationChange)="getQualityAssuranceSource()">
<ds-loading class="container" *ngIf="(isSourceProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading> <ds-loading class="container" *ngIf="(isSourceProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading>
<ng-container *ngIf="(isSourceProcessing() | async) === false"> <ng-container *ngIf="(isSourceProcessing() | async) !== true">
<div *ngIf="(sources$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert"> <div *ngIf="(sources$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
{{'quality-assurance.noSource' | translate}} {{'quality-assurance.noSource' | translate}}
</div> </div>

View File

@@ -14,7 +14,7 @@
<h4 class="border-bottom pb-2">{{'quality-assurance.topics'| translate}}</h4> <h4 class="border-bottom pb-2">{{'quality-assurance.topics'| translate}}</h4>
<ds-loading class="container" *ngIf="(isTopicsLoading() | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading> <ds-loading class="container" *ngIf="(isTopicsLoading() | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>
<ds-pagination *ngIf="(isTopicsLoading() | async) === false" <ds-pagination *ngIf="(isTopicsLoading() | async) !== true"
[paginationOptions]="paginationConfig" [paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)" [collectionSize]="(totalElements$ | async)"
[hideGear]="false" [hideGear]="false"
@@ -22,7 +22,7 @@
(paginationChange)="getQualityAssuranceTopics(sourceId, targetId)"> (paginationChange)="getQualityAssuranceTopics(sourceId, targetId)">
<ds-loading class="container" *ngIf="(isTopicsProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading> <ds-loading class="container" *ngIf="(isTopicsProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading>
<ng-container *ngIf="(isTopicsProcessing() | async) === false"> <ng-container *ngIf="(isTopicsProcessing() | async) !== true">
<div *ngIf="(topics$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert"> <div *ngIf="(topics$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
{{'quality-assurance.noTopics' | translate}} {{'quality-assurance.noTopics' | translate}}
</div> </div>

View File

@@ -4,7 +4,7 @@
<h1 id="header" class="border-bottom pb-2">{{'suggestion.title'| translate}}</h1> <h1 id="header" class="border-bottom pb-2">{{'suggestion.title'| translate}}</h1>
<ds-loading class="container" *ngIf="(isTargetsLoading() | async)" message="{{'suggestion.loading' | translate}}"></ds-loading> <ds-loading class="container" *ngIf="(isTargetsLoading() | async)" message="{{'suggestion.loading' | translate}}"></ds-loading>
<ds-pagination *ngIf="(isTargetsLoading() | async) === false" <ds-pagination *ngIf="(isTargetsLoading() | async) !== true"
[paginationOptions]="paginationConfig" [paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)" [collectionSize]="(totalElements$ | async)"
[hideGear]="false" [hideGear]="false"
@@ -12,7 +12,7 @@
(paginationChange)="getSuggestionTargets()"> (paginationChange)="getSuggestionTargets()">
<ds-loading class="container" *ngIf="(isTargetsProcessing() | async)" message="'suggestion.loading' | translate"></ds-loading> <ds-loading class="container" *ngIf="(isTargetsProcessing() | async)" message="'suggestion.loading' | translate"></ds-loading>
<ng-container *ngIf="(isTargetsProcessing() | async) === false"> <ng-container *ngIf="(isTargetsProcessing() | async) !== true">
<div *ngIf="(targets$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert"> <div *ngIf="(targets$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
{{'suggestion.noTargets' | translate}} {{'suggestion.noTargets' | translate}}
</div> </div>

View File

@@ -55,8 +55,8 @@
message="{{ 'process.detail.logs.loading' | translate }}"></ds-themed-loading> message="{{ 'process.detail.logs.loading' | translate }}"></ds-themed-loading>
<pre class="font-weight-bold text-secondary bg-light p-3" tabindex="0" <pre class="font-weight-bold text-secondary bg-light p-3" tabindex="0"
*ngIf="showOutputLogs && (outputLogs$ | async)?.length > 0">{{ (outputLogs$ | async) }}</pre> *ngIf="showOutputLogs && (outputLogs$ | async)?.length > 0">{{ (outputLogs$ | async) }}</pre>
<p id="no-output-logs-message" *ngIf="((retrievingOutputLogs$ | async) === false && showOutputLogs) <p id="no-output-logs-message" *ngIf="((retrievingOutputLogs$ | async) !== true && showOutputLogs)
&& (outputLogs$ | async) === null || (outputLogs$ | async)?.length === 0 || !process._links.output"> && (outputLogs$ | async | dsHasNoValue) || (outputLogs$ | async)?.length === 0 || !process._links.output">
{{ 'process.detail.logs.none' | translate }} {{ 'process.detail.logs.none' | translate }}
</p> </p>
</ds-process-detail-field> </ds-process-detail-field>

View File

@@ -37,6 +37,7 @@ import { NotificationsServiceStub } from '../../shared/testing/notifications-ser
import { RouterStub } from '../../shared/testing/router.stub'; import { RouterStub } from '../../shared/testing/router.stub';
import { createPaginatedList } from '../../shared/testing/utils.test'; import { createPaginatedList } from '../../shared/testing/utils.test';
import { FileSizePipe } from '../../shared/utils/file-size-pipe'; import { FileSizePipe } from '../../shared/utils/file-size-pipe';
import { HasNoValuePipe } from '../../shared/utils/has-no-value.pipe';
import { VarDirective } from '../../shared/utils/var.directive'; import { VarDirective } from '../../shared/utils/var.directive';
import { getProcessListRoute } from '../process-page-routing.paths'; import { getProcessListRoute } from '../process-page-routing.paths';
import { Process } from '../processes/process.model'; import { Process } from '../processes/process.model';
@@ -147,7 +148,13 @@ describe('ProcessDetailComponent', () => {
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
init(); init();
void TestBed.configureTestingModule({ void TestBed.configureTestingModule({
declarations: [ProcessDetailComponent, ProcessDetailFieldComponent, VarDirective, FileSizePipe], declarations: [
ProcessDetailComponent,
ProcessDetailFieldComponent,
VarDirective,
FileSizePipe,
HasNoValuePipe,
],
imports: [TranslateModule.forRoot(), RouterTestingModule], imports: [TranslateModule.forRoot(), RouterTestingModule],
providers: [ providers: [
{ provide: ActivatedRoute, useValue: route }, { provide: ActivatedRoute, useValue: route },

View File

@@ -1,6 +1,6 @@
<ng-container *ngIf="fromExisting$ && (fromExisting$ | async)"> <ng-container *ngIf="fromExisting$ | async | dsHasValue; else newProcess">
<ds-process-form *ngVar="fromExisting$ | async as process" headerKey="process.new.header" [selectedScript]="script$ | async" [parameters]="process.parameters"></ds-process-form> <ds-process-form *ngVar="fromExisting$ | async as process" headerKey="process.new.header" [selectedScript]="script$ | async" [parameters]="process.parameters"></ds-process-form>
</ng-container> </ng-container>
<ng-container *ngIf="!fromExisting$ || (fromExisting$ | async) === null"> <ng-template #newProcess>
<ds-process-form headerKey="process.new.header"></ds-process-form> <ds-process-form headerKey="process.new.header"></ds-process-form>
</ng-container> </ng-template>

View File

@@ -19,6 +19,7 @@ import { RequestService } from '../../core/data/request.service';
import { TranslateLoaderMock } from '../../shared/mocks/translate-loader.mock'; import { TranslateLoaderMock } from '../../shared/mocks/translate-loader.mock';
import { NotificationsService } from '../../shared/notifications/notifications.service'; import { NotificationsService } from '../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub'; import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub';
import { HasValuePipe } from '../../shared/utils/has-value.pipe';
import { VarDirective } from '../../shared/utils/var.directive'; import { VarDirective } from '../../shared/utils/var.directive';
import { ProcessParameter } from '../processes/process-parameter.model'; import { ProcessParameter } from '../processes/process-parameter.model';
import { Script } from '../scripts/script.model'; import { Script } from '../scripts/script.model';
@@ -65,7 +66,11 @@ describe('NewProcessComponent', () => {
useClass: TranslateLoaderMock, useClass: TranslateLoaderMock,
}, },
})], })],
declarations: [NewProcessComponent, VarDirective], declarations: [
NewProcessComponent,
VarDirective,
HasValuePipe,
],
providers: [ providers: [
{ provide: ScriptDataService, useValue: scriptService }, { provide: ScriptDataService, useValue: scriptService },
{ provide: NotificationsService, useClass: NotificationsServiceStub }, { provide: NotificationsService, useClass: NotificationsServiceStub },

View File

@@ -58,7 +58,7 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div *ngIf="(processBulkDeleteService.isProcessing$() | async) === false">{{'process.overview.delete.body' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</div> <div *ngIf="(processBulkDeleteService.isProcessing$() | async) !== true">{{'process.overview.delete.body' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</div>
<div *ngIf="processBulkDeleteService.isProcessing$() |async" class="alert alert-info"> <div *ngIf="processBulkDeleteService.isProcessing$() |async" class="alert alert-info">
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span> <span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
<span> {{ 'process.overview.delete.processing' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</span> <span> {{ 'process.overview.delete.processing' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</span>

View File

@@ -18,7 +18,7 @@
<span *ngIf="(isProcessingCreate() | async)"> <span *ngIf="(isProcessingCreate() | async)">
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}} <i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
</span> </span>
<span *ngIf="(isProcessingCreate() | async) === false"> <span *ngIf="(isProcessingCreate() | async) !== true">
<i class="fas fa-plus"></i> &nbsp;{{'researcher.profile.create.new' | translate}} <i class="fas fa-plus"></i> &nbsp;{{'researcher.profile.create.new' | translate}}
</span> </span>
</button> </button>
@@ -30,7 +30,7 @@
<span *ngIf="(isProcessingDelete() | async)"> <span *ngIf="(isProcessingDelete() | async)">
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}} <i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
</span> </span>
<span *ngIf="(isProcessingDelete() | async) === false"> <span *ngIf="(isProcessingDelete() | async) !== true">
<i class="fas fa-trash-alt"></i> &nbsp;{{'researcher.profile.delete' | translate}} <i class="fas fa-trash-alt"></i> &nbsp;{{'researcher.profile.delete' | translate}}
</span> </span>
</button> </button>

View File

@@ -3,7 +3,7 @@
</button> </button>
<div class="outer-wrapper" [class.d-none]="shouldShowFullscreenLoader" [@slideSidebarPadding]="{ <div class="outer-wrapper" [class.d-none]="shouldShowFullscreenLoader" [@slideSidebarPadding]="{
value: ((isSidebarVisible$ | async) === false ? 'hidden' : (slideSidebarOver$ | async) ? 'unpinned' : 'pinned'), value: ((isSidebarVisible$ | async) !== true ? 'hidden' : (slideSidebarOver$ | async) ? 'unpinned' : 'pinned'),
params: { collapsedWidth: (collapsedSidebarWidth$ | async), expandedWidth: (expandedSidebarWidth$ | async) } params: { collapsedWidth: (collapsedSidebarWidth$ | async), expandedWidth: (expandedSidebarWidth$ | async) }
}"> }">
<ds-themed-admin-sidebar [expandedSidebarWidth$]="expandedSidebarWidth$" [collapsedSidebarWidth$]="collapsedSidebarWidth$"></ds-themed-admin-sidebar> <ds-themed-admin-sidebar [expandedSidebarWidth$]="expandedSidebarWidth$" [collapsedSidebarWidth$]="collapsedSidebarWidth$"></ds-themed-admin-sidebar>

View File

@@ -1,5 +1,5 @@
<div class="navbar-nav mr-auto" *ngIf="(isMobile$ | async) === false; else mobileButtons" data-test="auth-nav"> <div class="navbar-nav mr-auto" *ngIf="(isMobile$ | async) !== true; else mobileButtons" data-test="auth-nav">
<div *ngIf="(isAuthenticated | async) === false && (showAuth | async)" <div *ngIf="(isAuthenticated | async) !== true && (showAuth | async)"
class="nav-item" class="nav-item"
(click)="$event.stopPropagation();"> (click)="$event.stopPropagation();">
<div ngbDropdown #loginDrop="ngbDropdown" display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut> <div ngbDropdown #loginDrop="ngbDropdown" display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
@@ -39,7 +39,7 @@
<ng-template #mobileButtons> <ng-template #mobileButtons>
<div data-test="auth-nav"> <div data-test="auth-nav">
<a *ngIf="(isAuthenticated | async) === false" routerLink="/login" routerLinkActive="active" class="loginLink px-0.5" role="button"> <a *ngIf="(isAuthenticated | async) !== true" routerLink="/login" routerLinkActive="active" class="loginLink px-0.5" role="button">
{{ 'nav.login' | translate }}<span class="sr-only">(current)</span> {{ 'nav.login' | translate }}<span class="sr-only">(current)</span>
</a> </a>
<a *ngIf="(isAuthenticated | async)" role="button" [attr.aria-label]="'nav.logout' |translate" [title]="'nav.logout' | translate" routerLink="/logout" routerLinkActive="active" class="logoutLink px-1"> <a *ngIf="(isAuthenticated | async)" role="button" [attr.aria-label]="'nav.logout' |translate" [title]="'nav.logout' | translate" routerLink="/logout" routerLinkActive="active" class="logoutLink px-1">

View File

@@ -1,5 +1,5 @@
<ds-themed-loading *ngIf="(loading$ | async)"></ds-themed-loading> <ds-themed-loading *ngIf="(loading$ | async)"></ds-themed-loading>
<ul *ngIf="(loading$ | async) === false" class="user-menu" role="menu" <ul *ngIf="(loading$ | async) !== true" class="user-menu" role="menu"
[ngClass]="inExpandableNavbar ? 'user-menu-mobile pb-2 mb-2 border-bottom' : 'user-menu-dropdown'" [ngClass]="inExpandableNavbar ? 'user-menu-mobile pb-2 mb-2 border-bottom' : 'user-menu-dropdown'"
[attr.aria-label]="'nav.user-profile-menu-and-logout' |translate" id="user-menu-dropdown"> [attr.aria-label]="'nav.user-profile-menu-and-logout' |translate" id="user-menu-dropdown">
<li class="ds-menu-item-wrapper username-email-wrapper" role="presentation"> <li class="ds-menu-item-wrapper username-email-wrapper" role="presentation">

View File

@@ -18,7 +18,7 @@
[scrollWindow]="false" [scrollWindow]="false"
(scrolled)="onScrollDown()"> (scrolled)="onScrollDown()">
<li class="dropdown-item disabled" role="menuitem" *ngIf="searchListCollection?.length === 0 && (isLoading | async) === false"> <li class="dropdown-item disabled" role="menuitem" *ngIf="searchListCollection?.length === 0 && (isLoading | async) !== true">
{{'submission.sections.general.no-collection' | translate}} {{'submission.sections.general.no-collection' | translate}}
</li> </li>
<ng-container *ngIf="searchListCollection?.length > 0"> <ng-container *ngIf="searchListCollection?.length > 0">

View File

@@ -13,10 +13,10 @@
<div class="d-flex flex-md-row justify-content-between flex-column"> <div class="d-flex flex-md-row justify-content-between flex-column">
<div class="w-100 d-flex align-items-center"> <div class="w-100 d-flex align-items-center">
<ds-themed-loading *ngIf="(groupRD$ | async) === null"></ds-themed-loading> <ds-themed-loading *ngIf="groupRD$ | async | dsHasNoValue"></ds-themed-loading>
<div *ngIf="hasNoGroup$ | async"> <div *ngIf="hasNoGroup$ | async">
{{'comcol-role.edit.no-group' | translate}} {{'comcol-role.edit.no-group' | translate}}
</div> </div>V
<div *ngIf="hasAnonymousGroup$ | async"> <div *ngIf="hasAnonymousGroup$ | async">
{{'comcol-role.edit.' + (comcolRole$ | async)?.name + '.anonymous-group' | translate}} {{'comcol-role.edit.' + (comcolRole$ | async)?.name + '.anonymous-group' | translate}}
</div> </div>

View File

@@ -1,4 +1,4 @@
<div *ngIf="(this.submitted$ | async) === false; else waiting"> <div *ngIf="(this.submitted$ | async) !== true; else waiting">
<div *ngIf="this.canWithdraw; else reinstateHeader" class="modal-header"> <div *ngIf="this.canWithdraw; else reinstateHeader" class="modal-header">
{{ 'item.qa.withdrawn.modal.header' | translate }} {{ 'item.qa.withdrawn.modal.header' | translate }}
<button type="button" class="close" (click)="onModalClose()" aria-label="Close"> <button type="button" class="close" (click)="onModalClose()" aria-label="Close">

View File

@@ -8,7 +8,7 @@
[fromRoot]="true" [fromRoot]="true"
[scrollWindow]="false" [scrollWindow]="false"
(scrolled)="onScrollDown()"> (scrolled)="onScrollDown()">
<li *ngIf="searchListEntity?.length === 0 && (isLoadingList | async) === false"> <li *ngIf="searchListEntity?.length === 0 && (isLoadingList | async) !== true">
<button class="dropdown-item disabled" role="menuitem"> <button class="dropdown-item disabled" role="menuitem">
{{'submission.sections.general.no-entity' | translate}} {{'submission.sections.general.no-entity' | translate}}
</button> </button>

View File

@@ -1,5 +1,5 @@
<a [routerLink]="(bitstreamPath$| async)?.routerLink" class="dont-break-out" [queryParams]="(bitstreamPath$| async)?.queryParams" [target]="isBlank ? '_blank': '_self'" [ngClass]="cssClasses"> <a [routerLink]="(bitstreamPath$| async)?.routerLink" class="dont-break-out" [queryParams]="(bitstreamPath$| async)?.queryParams" [target]="isBlank ? '_blank': '_self'" [ngClass]="cssClasses">
<span role="img" *ngIf="(canDownload$ |async) === false" [attr.aria-label]="'file-download-link.restricted' | translate" class="pr-1"><i class="fas fa-lock"></i></span> <span role="img" *ngIf="(canDownload$ |async) !== true" [attr.aria-label]="'file-download-link.restricted' | translate" class="pr-1"><i class="fas fa-lock"></i></span>
<ng-container *ngTemplateOutlet="content"></ng-container> <ng-container *ngTemplateOutlet="content"></ng-container>
</a> </a>

View File

@@ -20,7 +20,7 @@
</ul> </ul>
</ng-template> </ng-template>
<div *ngIf="(isHierarchicalVocabulary() | async) === false" class="position-relative right-addon"> <div *ngIf="(isHierarchicalVocabulary() | async) !== true" class="position-relative right-addon">
<i *ngIf="searching || loadingInitialValue" class="fas fa-circle-notch fa-spin fa-2x fa-fw text-primary position-absolute mt-1 p-0" aria-hidden="true"></i> <i *ngIf="searching || loadingInitialValue" class="fas fa-circle-notch fa-spin fa-2x fa-fw text-primary position-absolute mt-1 p-0" aria-hidden="true"></i>
<i *ngIf="!searching && !loadingInitialValue" <i *ngIf="!searching && !loadingInitialValue"
dsAuthorityConfidenceState dsAuthorityConfidenceState

View File

@@ -1,4 +1,4 @@
<a *ngIf="(formCollapsed | async) === false" <a *ngIf="(formCollapsed | async) !== true"
class="close position-relative" class="close position-relative"
ngbTooltip="{{'form.group-collapse-help' | translate}}" ngbTooltip="{{'form.group-collapse-help' | translate}}"
placement="left"> placement="left">
@@ -16,7 +16,7 @@
</a> </a>
<div class="pt-2" [ngClass]="{'border-top': !showErrorMessages, 'border border-danger': showErrorMessages}"> <div class="pt-2" [ngClass]="{'border-top': !showErrorMessages, 'border border-danger': showErrorMessages}">
<div *ngIf="(formCollapsed | async) === false" class="pl-2 row" @shrinkInOut> <div *ngIf="(formCollapsed | async) !== true" class="pl-2 row" @shrinkInOut>
<ds-form #formRef="formComponent" <ds-form #formRef="formComponent"
class="col-sm-12 col-md-8 col-lg-9 col-xl-10 pl-0" class="col-sm-12 col-md-8 col-lg-9 col-xl-10 pl-0"
[formId]="formId" [formId]="formId"
@@ -28,7 +28,7 @@
(dfFocus)="onFocus($event)"></ds-form> (dfFocus)="onFocus($event)"></ds-form>
<div *ngIf="(formCollapsed | async) === false" class="col p-0 m-0 d-flex justify-content-center align-items-center"> <div *ngIf="(formCollapsed | async) !== true" class="col p-0 m-0 d-flex justify-content-center align-items-center">
<button type="button" <button type="button"
class="btn btn-link" class="btn btn-link"

View File

@@ -22,7 +22,7 @@
Checkboxes that are in the indeterminate state always switch to checked when clicked Checkboxes that are in the indeterminate state always switch to checked when clicked
This seemed like the cleanest and clearest solution to solve this issue for now. --> This seemed like the cleanest and clearest solution to solve this issue for now. -->
<input *ngIf="!allSelected && (someSelected$ | async) === false" <input *ngIf="!allSelected && (someSelected$ | async) !== true"
type="checkbox" type="checkbox"
[indeterminate]="false" [indeterminate]="false"
(change)="selectAll()"> (change)="selectAll()">

View File

@@ -62,7 +62,7 @@
</button> </button>
<ng-content select="[between]"></ng-content> <ng-content select="[between]"></ng-content>
<button *ngIf="displaySubmit" type="submit" class="btn btn-primary" (click)="onSubmit()" <button *ngIf="displaySubmit" type="submit" class="btn btn-primary" (click)="onSubmit()"
[disabled]="(isValid() | async) === false"> [disabled]="(isValid() | async) !== true">
<i class="fas fa-save" aria-hidden="true"></i> {{submitLabel | translate}} <i class="fas fa-save" aria-hidden="true"></i> {{submitLabel | translate}}
</button> </button>
<ng-content select="[after]"></ng-content> <ng-content select="[after]"></ng-content>

View File

@@ -20,7 +20,7 @@
</div> </div>
<div class="treeview-container"> <div class="treeview-container">
<ds-themed-loading *ngIf="loading | async" [showMessage]="false"></ds-themed-loading> <ds-themed-loading *ngIf="loading | async" [showMessage]="false"></ds-themed-loading>
<h2 *ngIf="(loading | async) === false && dataSource.data.length === 0" class="h4 text-center text-muted mt-4" > <h2 *ngIf="(loading | async) !== true && dataSource.data.length === 0" class="h4 text-center text-muted mt-4" >
<span>{{'vocabulary-treeview.search.no-result' | translate}}</span> <span>{{'vocabulary-treeview.search.no-result' | translate}}</span>
</h2> </h2>
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl"> <cdk-tree [dataSource]="dataSource" [treeControl]="treeControl">

View File

@@ -1,5 +1,5 @@
<ds-themed-loading *ngIf="(loading | async) || (isAuthenticated | async)" class="m-5"></ds-themed-loading> <ds-themed-loading *ngIf="(loading | async) || (isAuthenticated | async)" class="m-5"></ds-themed-loading>
<div *ngIf="(loading | async) === false && (isAuthenticated | async) === false" class="px-4 py-3 mx-auto login-container"> <div *ngIf="(loading | async) !== true && (isAuthenticated | async) !== true" class="px-4 py-3 mx-auto login-container">
<ng-container *ngFor="let authMethod of (authMethods | async); let last = last"> <ng-container *ngFor="let authMethod of (authMethods | async); let last = last">
<ds-log-in-container [authMethod]="authMethod" [isStandalonePage]="isStandalonePage"></ds-log-in-container> <ds-log-in-container [authMethod]="authMethod" [isStandalonePage]="isStandalonePage"></ds-log-in-container>
<div *ngIf="!last" class="dropdown-divider my-2"></div> <div *ngIf="!last" class="dropdown-divider my-2"></div>

View File

@@ -4,5 +4,5 @@
[disabled]="processing$ | async" [disabled]="processing$ | async"
(click)="submitTask()"> (click)="submitTask()">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span> <span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fa fa-thumbs-up"></i> {{'submission.workflow.tasks.claimed.approve' | translate}}</span> <span *ngIf="(processing$ | async) !== true"><i class="fa fa-thumbs-up"></i> {{'submission.workflow.tasks.claimed.approve' | translate}}</span>
</button> </button>

View File

@@ -6,7 +6,7 @@
<span *ngIf="processing$ | async"> <span *ngIf="processing$ | async">
<i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}} <i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}
</span> </span>
<span *ngIf="(processing$ | async) === false"> <span *ngIf="(processing$ | async) !== true">
<i class="fa fa-ban"></i> {{'submission.workflow.tasks.claimed.decline' | translate}} <i class="fa fa-ban"></i> {{'submission.workflow.tasks.claimed.decline' | translate}}
</span> </span>
</button> </button>

View File

@@ -4,7 +4,7 @@
[disabled]="processing$ | async" [disabled]="processing$ | async"
(click)="openRejectModal(rejectModal)" > (click)="openRejectModal(rejectModal)" >
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span> <span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fa fa-trash"></i> {{'submission.workflow.tasks.claimed.reject.submit' | translate}}</span> <span *ngIf="(processing$ | async) !== true"><i class="fa fa-trash"></i> {{'submission.workflow.tasks.claimed.reject.submit' | translate}}</span>
</button> </button>
<ng-template #rejectModal let-c="close" let-d="dismiss"> <ng-template #rejectModal let-c="close" let-d="dismiss">
@@ -31,7 +31,7 @@
[disabled]="!rejectForm.valid || (processing$ | async)" [disabled]="!rejectForm.valid || (processing$ | async)"
type="submit"> type="submit">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span> <span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="(processing$ | async) === false">{{'submission.workflow.tasks.claimed.reject.reason.submit' | translate}}</span> <span *ngIf="(processing$ | async) !== true">{{'submission.workflow.tasks.claimed.reject.reason.submit' | translate}}</span>
</button> </button>
</form> </form>
</div> </div>

View File

@@ -4,5 +4,5 @@
[disabled]="processing$ | async" [disabled]="processing$ | async"
(click)="submitTask()"> (click)="submitTask()">
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span> <span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fa fa-undo"></i> {{'submission.workflow.tasks.claimed.return' | translate}}</span> <span *ngIf="(processing$ | async) !== true"><i class="fa fa-undo"></i> {{'submission.workflow.tasks.claimed.return' | translate}}</span>
</button> </button>

View File

@@ -3,7 +3,7 @@
(click)="claim()"> (click)="claim()">
<span *ngIf="(processing$ | async)"><i class='fas fa-circle-notch fa-spin'></i> <span *ngIf="(processing$ | async)"><i class='fas fa-circle-notch fa-spin'></i>
{{'submission.workflow.tasks.generic.processing' | translate}}</span> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="(processing$ | async) === false"><i class="fas fa-hand-paper"></i> {{'submission.workflow.tasks.pool.claim' | <span *ngIf="(processing$ | async) !== true"><i class="fas fa-hand-paper"></i> {{'submission.workflow.tasks.pool.claim' |
translate}}</span> translate}}</span>
</button> </button>
<button class="btn btn-primary workflow-view ml-1 mt-1 mb-3" data-test="view-btn" <button class="btn btn-primary workflow-view ml-1 mt-1 mb-3" data-test="view-btn"

View File

@@ -22,7 +22,7 @@
(click)="$event.preventDefault();confirmDiscard(content)"> (click)="$event.preventDefault();confirmDiscard(content)">
<span *ngIf="(processingDelete$ | async)"><i class='fas fa-circle-notch fa-spin'></i> <span *ngIf="(processingDelete$ | async)"><i class='fas fa-circle-notch fa-spin'></i>
{{'submission.workflow.tasks.generic.processing' | translate}}</span> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
<span *ngIf="(processingDelete$ | async) === false"><i class="fa fa-trash"></i> {{'submission.workflow.generic.delete' | <span *ngIf="(processingDelete$ | async) !== true"><i class="fa fa-trash"></i> {{'submission.workflow.generic.delete' |
translate}}</span> translate}}</span>
</button> </button>
</div> </div>

View File

@@ -19,7 +19,7 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let item of itemsRD?.payload?.page"> <tr *ngFor="let item of itemsRD?.payload?.page">
<td><input #selectItemBtn [attr.aria-label]="(selectItemBtn.checked ? 'item.select.table.deselect' : 'item.select.table.select') | translate" [disabled]="(canSelect(item) | async) === false" class="item-checkbox" [ngModel]="getSelected(item.id) | async" (change)="switch(item.id)" type="checkbox" name="{{item.id}}"></td> <td><input #selectItemBtn [attr.aria-label]="(selectItemBtn.checked ? 'item.select.table.deselect' : 'item.select.table.select') | translate" [disabled]="(canSelect(item) | async) !== true" class="item-checkbox" [ngModel]="getSelected(item.id) | async" (change)="switch(item.id)" type="checkbox" name="{{item.id}}"></td>
<td *ngIf="!hideCollection"> <td *ngIf="!hideCollection">
<span *ngVar="(item.owningCollection | async)?.payload as collection"> <span *ngVar="(item.owningCollection | async)?.payload as collection">
<a *ngIf="collection" [routerLink]="['/collections', collection?.id]"> <a *ngIf="collection" [routerLink]="['/collections', collection?.id]">

View File

@@ -32,7 +32,7 @@
(click)="redirectToResourcePolicyEditPage()"> (click)="redirectToResourcePolicyEditPage()">
<i class="fas fa-edit fa-fw" aria-hidden="true"></i> <i class="fas fa-edit fa-fw" aria-hidden="true"></i>
</button> </button>
<button *ngIf="(groupName$ | async) !== undefined" class="btn btn-outline-primary btn-sm" <button *ngIf="groupName$ | async | dsHasValue" class="btn btn-outline-primary btn-sm"
[title]="'resource-policies.table.headers.edit.group' | translate" [title]="'resource-policies.table.headers.edit.group' | translate"
(click)="redirectToGroupEditPage()"> (click)="redirectToGroupEditPage()">
<i class="fas fa-users fa-fw" aria-hidden="true"></i> <i class="fas fa-users fa-fw" aria-hidden="true"></i>

View File

@@ -29,6 +29,7 @@ import { createSuccessfulRemoteDataObject } from '../../remote-data.utils';
import { EPersonMock } from '../../testing/eperson.mock'; import { EPersonMock } from '../../testing/eperson.mock';
import { GroupMock } from '../../testing/group-mock'; import { GroupMock } from '../../testing/group-mock';
import { RouterStub } from '../../testing/router.stub'; import { RouterStub } from '../../testing/router.stub';
import { HasValuePipe } from '../../utils/has-value.pipe';
import { ResourcePolicyEntryComponent } from './resource-policy-entry.component'; import { ResourcePolicyEntryComponent } from './resource-policy-entry.component';
import createSpyObj = jasmine.createSpyObj; import createSpyObj = jasmine.createSpyObj;
@@ -128,6 +129,7 @@ describe('ResourcePolicyEntryComponent', () => {
], ],
declarations: [ declarations: [
ResourcePolicyEntryComponent, ResourcePolicyEntryComponent,
HasValuePipe,
], ],
providers: [ providers: [
{ provide: ActivatedRoute, useValue: routeStub }, { provide: ActivatedRoute, useValue: routeStub },

View File

@@ -35,12 +35,12 @@
(click)="onReset()">{{'form.cancel' | translate}}</button> (click)="onReset()">{{'form.cancel' | translate}}</button>
<button type="button" <button type="button"
class="btn btn-primary" class="btn btn-primary"
[disabled]="(isFormValid() | async) === false || (isProcessing | async)" [disabled]="(isFormValid() | async) !== true || (isProcessing | async)"
(click)="onSubmit()"> (click)="onSubmit()">
<span *ngIf="(isProcessing | async)"> <span *ngIf="(isProcessing | async)">
<i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}} <i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}
</span> </span>
<span *ngIf="(isProcessing | async) === false"> <span *ngIf="(isProcessing | async) !== true">
{{'form.submit' | translate}} {{'form.submit' | translate}}
</span> </span>
</button> </button>

View File

@@ -13,13 +13,13 @@
</span> </span>
<div class="space-children-mr flex-shrink-0"> <div class="space-children-mr flex-shrink-0">
<button class="btn btn-danger p-1" <button class="btn btn-danger p-1"
[disabled]="((canDelete() | async) === false) || (isProcessingDelete() | async)" [disabled]="((canDelete() | async) !== true) || (isProcessingDelete() | async)"
[title]="'resource-policies.delete.btn.title' | translate" [title]="'resource-policies.delete.btn.title' | translate"
(click)="deleteSelectedResourcePolicies()"> (click)="deleteSelectedResourcePolicies()">
<span *ngIf="(isProcessingDelete() | async)"> <span *ngIf="(isProcessingDelete() | async)">
<i class='fas fa-circle-notch fa-spin' aria-hidden="true"></i> {{'submission.workflow.tasks.generic.processing' | translate}} <i class='fas fa-circle-notch fa-spin' aria-hidden="true"></i> {{'submission.workflow.tasks.generic.processing' | translate}}
</span> </span>
<span *ngIf="(isProcessingDelete() | async) === false"> <span *ngIf="(isProcessingDelete() | async) !== true">
<i class='fas fa-trash-alt fa-fw' aria-hidden="true"></i> <i class='fas fa-trash-alt fa-fw' aria-hidden="true"></i>
{{'resource-policies.delete.btn' | translate}} {{'resource-policies.delete.btn' | translate}}
</span> </span>

View File

@@ -57,6 +57,7 @@ import {
createPaginatedList, createPaginatedList,
createTestComponent, createTestComponent,
} from '../testing/utils.test'; } from '../testing/utils.test';
import { HasValuePipe } from '../utils/has-value.pipe';
import { ResourcePolicyEntryComponent } from './entry/resource-policy-entry.component'; import { ResourcePolicyEntryComponent } from './entry/resource-policy-entry.component';
import { ResourcePoliciesComponent } from './resource-policies.component'; import { ResourcePoliciesComponent } from './resource-policies.component';
@@ -230,6 +231,7 @@ describe('ResourcePoliciesComponent test suite', () => {
ResourcePoliciesComponent, ResourcePoliciesComponent,
ResourcePolicyEntryComponent, ResourcePolicyEntryComponent,
TestComponent, TestComponent,
HasValuePipe,
], ],
providers: [ providers: [
{ provide: LinkService, useValue: linkService }, { provide: LinkService, useValue: linkService },

View File

@@ -7,7 +7,7 @@
</div> </div>
</ng-container> </ng-container>
<div class="clearfix toggle-more-filters"> <div class="clearfix toggle-more-filters">
<a class="float-left" *ngIf="(isLastPage$ | async) === false" <a class="float-left" *ngIf="(isLastPage$ | async) !== true"
(click)="showMore()" href="javascript:void(0);"> (click)="showMore()" href="javascript:void(0);">
{{"search.filters.filter.show-more" | translate}} {{"search.filters.filter.show-more" | translate}}
</a> </a>

View File

@@ -7,7 +7,7 @@
</div> </div>
</ng-container> </ng-container>
<div class="clearfix toggle-more-filters"> <div class="clearfix toggle-more-filters">
<a class="float-left" *ngIf="(isLastPage$ | async) === false" <a class="float-left" *ngIf="(isLastPage$ | async) !== true"
(click)="showMore()" href="javascript:void(0);"> (click)="showMore()" href="javascript:void(0);">
{{"search.filters.filter.show-more" | translate}} {{"search.filters.filter.show-more" | translate}}
</a> </a>

View File

@@ -2,7 +2,7 @@
[id]="regionId" [attr.aria-labelledby]="toggleId" [ngClass]="{ 'focus': focusBox }" role="region"> [id]="regionId" [attr.aria-labelledby]="toggleId" [ngClass]="{ 'focus': focusBox }" role="region">
<button (click)="toggle()" (focusin)="focusBox = true" (focusout)="focusBox = false" <button (click)="toggle()" (focusin)="focusBox = true" (focusout)="focusBox = false"
class="filter-name d-flex" [attr.aria-controls]="regionId" [id]="toggleId" class="filter-name d-flex" [attr.aria-controls]="regionId" [id]="toggleId"
[attr.aria-expanded]="(collapsed$ | async) === false" [attr.aria-expanded]="(collapsed$ | async) !== true"
[attr.aria-label]="(((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate) + ' ' + (('search.filters.filter.' + filter.name + '.head') | translate | lowercase)" [attr.aria-label]="(((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate) + ' ' + (('search.filters.filter.' + filter.name + '.head') | translate | lowercase)"
[attr.data-test]="'filter-toggle' | dsBrowserOnly" [attr.data-test]="'filter-toggle' | dsBrowserOnly"
> >

View File

@@ -7,7 +7,7 @@
</div> </div>
</ng-container> </ng-container>
<div class="clearfix toggle-more-filters"> <div class="clearfix toggle-more-filters">
<a class="float-left" *ngIf="(isLastPage$ | async) === false" <a class="float-left" *ngIf="(isLastPage$ | async) !== true"
(click)="showMore()" href="javascript:void(0);"> (click)="showMore()" href="javascript:void(0);">
{{"search.filters.filter.show-more" | translate}} {{"search.filters.filter.show-more" | translate}}
</a> </a>

View File

@@ -7,7 +7,7 @@
</div> </div>
</ng-container> </ng-container>
<div class="clearfix toggle-more-filters"> <div class="clearfix toggle-more-filters">
<a class="float-left" *ngIf="(isLastPage$ | async) === false" <a class="float-left" *ngIf="(isLastPage$ | async) !== true"
(click)="showMore()" href="javascript:void(0);"> (click)="showMore()" href="javascript:void(0);">
{{"search.filters.filter.show-more" | translate}} {{"search.filters.filter.show-more" | translate}}
</a> </a>

View File

@@ -17,7 +17,7 @@
<ng-template #searchContent> <ng-template #searchContent>
<div class="row"> <div class="row">
<div class="col-12" *ngIf="(isXsOrSm$ | async) === false"> <div class="col-12" *ngIf="(isXsOrSm$ | async) !== true">
<ng-template *ngTemplateOutlet="searchForm"></ng-template> <ng-template *ngTemplateOutlet="searchForm"></ng-template>
<ng-content select="[additionalSearchOptions]"></ng-content> <ng-content select="[additionalSearchOptions]"></ng-content>
</div> </div>
@@ -50,7 +50,7 @@
</ng-template> </ng-template>
<ng-template #sidebarContent> <ng-template #sidebarContent>
<ds-themed-search-sidebar id="search-sidebar" *ngIf="(isXsOrSm$ | async) === false" <ds-themed-search-sidebar id="search-sidebar" *ngIf="(isXsOrSm$ | async) !== true"
[configurationList]="configurationList" [configurationList]="configurationList"
[configuration]="(currentConfiguration$ | async)" [configuration]="(currentConfiguration$ | async)"
[currentScope]="(currentScope$ | async)" [currentScope]="(currentScope$ | async)"

View File

@@ -176,6 +176,8 @@ import { EmphasizePipe } from './utils/emphasize.pipe';
import { EnumKeysPipe } from './utils/enum-keys-pipe'; import { EnumKeysPipe } from './utils/enum-keys-pipe';
import { FileSizePipe } from './utils/file-size-pipe'; import { FileSizePipe } from './utils/file-size-pipe';
import { FileValueAccessorDirective } from './utils/file-value-accessor.directive'; import { FileValueAccessorDirective } from './utils/file-value-accessor.directive';
import { HasNoValuePipe } from './utils/has-no-value.pipe';
import { HasValuePipe } from './utils/has-value.pipe';
import { InListValidator } from './utils/in-list-validator.directive'; import { InListValidator } from './utils/in-list-validator.directive';
import { IpV4Validator } from './utils/ipV4.validator'; import { IpV4Validator } from './utils/ipV4.validator';
import { MarkdownPipe } from './utils/markdown.pipe'; import { MarkdownPipe } from './utils/markdown.pipe';
@@ -231,6 +233,8 @@ const PIPES = [
MarkdownPipe, MarkdownPipe,
ShortNumberPipe, ShortNumberPipe,
SplitPipe, SplitPipe,
HasValuePipe,
HasNoValuePipe,
]; ];
const COMPONENTS = [ const COMPONENTS = [

View File

@@ -8,7 +8,7 @@
<ng-container *ngTemplateOutlet="sidebarContent"></ng-container> <ng-container *ngTemplateOutlet="sidebarContent"></ng-container>
</div> </div>
<div class="col-12 col-md-{{12 - sideBarWidth}}" <div class="col-12 col-md-{{12 - sideBarWidth}}"
[class.invisible]="(isSidebarCollapsed$ | async) === false && (isXsOrSm$ | async) === true"> [class.invisible]="(isSidebarCollapsed$ | async) !== true && (isXsOrSm$ | async) === true">
<ng-content></ng-content> <ng-content></ng-content>
</div> </div>
</div> </div>

View File

@@ -38,7 +38,7 @@
<span *ngIf="(processing$ | async)"> <span *ngIf="(processing$ | async)">
<i class='fas fa-circle-notch fa-spin'></i> {{'subscriptions.modal.new-subscription-form.processing' | translate}} <i class='fas fa-circle-notch fa-spin'></i> {{'subscriptions.modal.new-subscription-form.processing' | translate}}
</span> </span>
<span *ngIf="(processing$ | async) === false"> <span *ngIf="(processing$ | async) !== true">
{{'subscriptions.modal.new-subscription-form.submit' | translate}} {{'subscriptions.modal.new-subscription-form.submit' | translate}}
</span> </span>
</button> </button>

View File

@@ -0,0 +1,16 @@
import {
Pipe,
PipeTransform,
} from '@angular/core';
import { hasNoValue } from '../empty.util';
/**
* Returns true if the passed value is null or undefined.
*/
@Pipe({ name: 'dsHasNoValue' })
export class HasNoValuePipe implements PipeTransform {
transform(value: any): boolean {
return hasNoValue(value);
}
}

View File

@@ -0,0 +1,16 @@
import {
Pipe,
PipeTransform,
} from '@angular/core';
import { hasValue } from '../empty.util';
/**
* Returns true if the passed value is not null or undefined.
*/
@Pipe({ name: 'dsHasValue' })
export class HasValuePipe implements PipeTransform {
transform(value: any): boolean {
return hasValue(value);
}
}

View File

@@ -19,7 +19,7 @@
[report]="report" [report]="report"
class="m-2 {{ report.id }}"> class="m-2 {{ report.id }}">
</ds-statistics-table> </ds-statistics-table>
<div *ngIf="(hasData$ | async) === false"> <div *ngIf="(hasData$ | async) !== true">
{{ 'statistics.page.no-data' | translate }} {{ 'statistics.page.no-data' | translate }}
</div> </div>
</ng-container> </ng-container>

View File

@@ -1,6 +1,6 @@
<div> <div>
<div <div
*ngIf="(available$ | async) === false" *ngIf="(available$ | async) !== true"
class="input-group mb-3"> class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text">{{ 'submission.sections.general.collection' | translate }}</span> <span class="input-group-text">{{ 'submission.sections.general.collection' | translate }}</span>
@@ -28,7 +28,7 @@
[disabled]="(processingChange$ | async) || collectionModifiable === false || isReadonly" [disabled]="(processingChange$ | async) || collectionModifiable === false || isReadonly"
ngbDropdownToggle> ngbDropdownToggle>
<span *ngIf="(processingChange$ | async)"><i class='fas fa-circle-notch fa-spin'></i></span> <span *ngIf="(processingChange$ | async)"><i class='fas fa-circle-notch fa-spin'></i></span>
<span *ngIf="(processingChange$ | async) === false">{{ selectedCollectionName$ | async }}</span> <span *ngIf="(processingChange$ | async) !== true">{{ selectedCollectionName$ | async }}</span>
</button> </button>
<div ngbDropdownMenu <div ngbDropdownMenu

View File

@@ -11,10 +11,10 @@
</button> </button>
</div> </div>
<div class="col text-right d-flex justify-content-end align-items-center"> <div class="col text-right d-flex justify-content-end align-items-center">
<span *ngIf="(hasUnsavedModification | async) === false && (processingSaveStatus | async) === false && (processingDepositStatus | async) === false"> <span *ngIf="(hasUnsavedModification | async) !== true && (processingSaveStatus | async) !== true && (processingDepositStatus | async) !== true">
<i class="fas fa-check-circle"></i> {{'submission.general.info.saved' | translate}} <i class="fas fa-check-circle"></i> {{'submission.general.info.saved' | translate}}
</span> </span>
<span *ngIf="(hasUnsavedModification | async) && (processingSaveStatus | async) === false && (processingDepositStatus | async) === false"> <span *ngIf="(hasUnsavedModification | async) && (processingSaveStatus | async) !== true && (processingDepositStatus | async) !== true">
<i class="fas fa-exclamation-circle"></i> {{'submission.general.info.pending-changes' | translate}} <i class="fas fa-exclamation-circle"></i> {{'submission.general.info.pending-changes' | translate}}
</span> </span>
<div *ngIf="(processingSaveStatus | async) || (processingDepositStatus | async)" class="col d-flex justify-content-end align-items-center"> <div *ngIf="(processingSaveStatus | async) || (processingDepositStatus | async)" class="col d-flex justify-content-end align-items-center">
@@ -28,12 +28,12 @@
class="btn btn-secondary" class="btn btn-secondary"
id="save" id="save"
[attr.data-test]="'save' | dsBrowserOnly" [attr.data-test]="'save' | dsBrowserOnly"
[disabled]="(processingSaveStatus | async) || (hasUnsavedModification | async) === false" [disabled]="(processingSaveStatus | async) || (hasUnsavedModification | async) !== true"
(click)="save($event)"> (click)="save($event)">
<span><i class="fas fa-save"></i> {{'submission.general.save' | translate}}</span> <span><i class="fas fa-save"></i> {{'submission.general.save' | translate}}</span>
</button> </button>
<button type="button" <button type="button"
[class.btn-primary]="(showDepositAndDiscard | async) === false" [class.btn-primary]="(showDepositAndDiscard | async) !== true"
[class.btn-secondary]="(showDepositAndDiscard | async)" [class.btn-secondary]="(showDepositAndDiscard | async)"
class="btn" class="btn"
id="saveForLater" id="saveForLater"

View File

@@ -6,7 +6,7 @@
<ng-container *ngIf="hasSections$ | async"> <ng-container *ngIf="hasSections$ | async">
<button class="btn btn-outline-primary dropdown-toggle" <button class="btn btn-outline-primary dropdown-toggle"
id="sectionControls" id="sectionControls"
[disabled]="(hasSections$ | async) === false" [disabled]="(hasSections$ | async) !== true"
[ngClass]="{'w-100': (windowService.isXs() | async)}" [ngClass]="{'w-100': (windowService.isXs() | async)}"
ngbDropdownToggle> ngbDropdownToggle>
{{ 'submission.sections.general.add-more' | translate }} <i class="fa fa-plus" aria-hidden="true"></i> {{ 'submission.sections.general.add-more' | translate }} <i class="fa fa-plus" aria-hidden="true"></i>
@@ -16,7 +16,7 @@
class="sections-dropdown-menu" class="sections-dropdown-menu"
aria-labelledby="sectionControls" aria-labelledby="sectionControls"
[ngClass]="{'w-100': (windowService.isXs() | async)}"> [ngClass]="{'w-100': (windowService.isXs() | async)}">
<button class="dropdown-item disabled" *ngIf="(hasSections$ | async) === false"> <button class="dropdown-item disabled" *ngIf="(hasSections$ | async) !== true">
{{ 'submission.sections.general.no-sections' | translate }} {{ 'submission.sections.general.no-sections' | translate }}
</button> </button>
<button class="dropdown-item" *ngFor="let listItem of (sectionList$ | async)" (click)="addSection(listItem.id)"> <button class="dropdown-item" *ngFor="let listItem of (sectionList$ | async)" (click)="addSection(listItem.id)">

View File

@@ -1,5 +1,5 @@
<div class="container-fluid"> <div class="container-fluid">
<div *ngIf="(isLoading() | async) === false" class="submission-form-header mb-3 d-flex flex-wrap position-sticky"> <div *ngIf="(isLoading() | async) !== true" class="submission-form-header mb-3 d-flex flex-wrap position-sticky">
<div *ngIf="(uploadEnabled$ | async)" class="w-100"> <div *ngIf="(uploadEnabled$ | async)" class="w-100">
<ds-submission-upload-files [submissionId]="submissionId" <ds-submission-upload-files [submissionId]="submissionId"
[collectionId]="collectionId" [collectionId]="collectionId"
@@ -35,7 +35,7 @@
</ds-submission-section-container> </ds-submission-section-container>
</ng-container> </ng-container>
</div> </div>
<div *ngIf="(isLoading() | async) === false" class="submission-form-footer mt-3 mb-3 position-sticky"> <div *ngIf="(isLoading() | async) !== true" class="submission-form-footer mt-3 mb-3 position-sticky">
<ds-submission-form-footer [submissionId]="submissionId"></ds-submission-form-footer> <ds-submission-form-footer [submissionId]="submissionId"></ds-submission-form-footer>
</div> </div>
</div> </div>

View File

@@ -2,8 +2,8 @@
<input type="text" class="form-control" (keyup.enter)="(searchString === '')?null:search()" [(ngModel)]="searchString" placeholder="{{'submission.import-external.search.placeholder' | translate}}" [attr.aria-label]="'submission.import-external.search.placeholder' | translate"> <input type="text" class="form-control" (keyup.enter)="(searchString === '')?null:search()" [(ngModel)]="searchString" placeholder="{{'submission.import-external.search.placeholder' | translate}}" [attr.aria-label]="'submission.import-external.search.placeholder' | translate">
</div> </div>
<div class="input-group mb-5"> <div class="input-group mb-5">
<input *ngIf="(isXsOrSm$ | async) === false" type="text" class="form-control" (keyup.enter)="(searchString === '')?null:search()" [(ngModel)]="searchString" placeholder="{{'submission.import-external.search.placeholder' | translate}}" [attr.aria-label]="'submission.import-external.search.placeholder' | translate"> <input *ngIf="(isXsOrSm$ | async) !== true" type="text" class="form-control" (keyup.enter)="(searchString === '')?null:search()" [(ngModel)]="searchString" placeholder="{{'submission.import-external.search.placeholder' | translate}}" [attr.aria-label]="'submission.import-external.search.placeholder' | translate">
<div [ngClass]="{'input-group-append': (isXsOrSm$ | async) === false}" ngbDropdown role="group"> <div [ngClass]="{'input-group-append': (isXsOrSm$ | async) !== true}" ngbDropdown role="group">
<button [attr.aria-label]="'submission.import-external.search.source.hint' |translate" <button [attr.aria-label]="'submission.import-external.search.source.hint' |translate"
class="btn btn-outline-secondary w-fx" class="btn btn-outline-secondary w-fx"
title="{{'submission.import-external.search.source.hint' |translate}}" title="{{'submission.import-external.search.source.hint' |translate}}"

View File

@@ -12,7 +12,7 @@
<div *ngIf="reload$.value.sourceId !== ''" class="col-md-12"> <div *ngIf="reload$.value.sourceId !== ''" class="col-md-12">
<ng-container *ngVar="(entriesRD$ | async) as entriesRD"> <ng-container *ngVar="(entriesRD$ | async) as entriesRD">
<h2 *ngIf="entriesRD && entriesRD?.payload?.page?.length !== 0">{{ 'submission.sections.describe.relationship-lookup.selection-tab.title' | translate}}</h2> <h2 *ngIf="entriesRD && entriesRD?.payload?.page?.length !== 0">{{ 'submission.sections.describe.relationship-lookup.selection-tab.title' | translate}}</h2>
<ds-viewable-collection *ngIf="entriesRD?.hasSucceeded && (isLoading$ | async) === false && entriesRD?.payload?.page?.length > 0" @fadeIn <ds-viewable-collection *ngIf="entriesRD?.hasSucceeded && (isLoading$ | async) !== true && entriesRD?.payload?.page?.length > 0" @fadeIn
[objects]="entriesRD" [objects]="entriesRD"
[selectionConfig]="{ repeatable: repeatable, listId: listId }" [selectionConfig]="{ repeatable: repeatable, listId: listId }"
[config]="initialPagination" [config]="initialPagination"
@@ -24,10 +24,10 @@
</ds-viewable-collection> </ds-viewable-collection>
<ds-themed-loading *ngIf="(isLoading$ | async)" <ds-themed-loading *ngIf="(isLoading$ | async)"
message="{{'loading.search-results' | translate}}"></ds-themed-loading> message="{{'loading.search-results' | translate}}"></ds-themed-loading>
<div *ngIf="(isLoading$ | async) === false && entriesRD?.payload?.page?.length === 0" data-test="empty-external-entry-list"> <div *ngIf="(isLoading$ | async) !== true && entriesRD?.payload?.page?.length === 0" data-test="empty-external-entry-list">
<ds-alert [type]="AlertType.Info">{{ 'search.results.empty' | translate }}</ds-alert> <ds-alert [type]="AlertType.Info">{{ 'search.results.empty' | translate }}</ds-alert>
</div> </div>
<div *ngIf="(isLoading$ | async) === false && entriesRD.statusCode === 500" data-test="empty-external-error-500"> <div *ngIf="(isLoading$ | async) !== true && entriesRD.statusCode === 500" data-test="empty-external-error-500">
<ds-alert [type]="AlertType.Info">{{ 'search.results.response.500' | translate }}</ds-alert> <ds-alert [type]="AlertType.Info">{{ 'search.results.response.500' | translate }}</ds-alert>
</div> </div>
</ng-container> </ng-container>

View File

@@ -9,7 +9,7 @@
'submission.sections.'+sectionData.header | translate 'submission.sections.'+sectionData.header | translate
}}</span> }}</span>
<div class="d-inline-block float-right"> <div class="d-inline-block float-right">
<i *ngIf="(sectionRef.isValid() | async) === false && !(sectionRef.hasErrors()) && !(sectionRef.isInfo())" <i *ngIf="(sectionRef.isValid() | async) !== true && !(sectionRef.hasErrors()) && !(sectionRef.isInfo())"
class="fas fa-exclamation-circle text-warning mr-3" class="fas fa-exclamation-circle text-warning mr-3"
title="{{'submission.sections.status.warnings.title' | translate}}" role="img" title="{{'submission.sections.status.warnings.title' | translate}}" role="img"
[attr.aria-label]="'submission.sections.status.warnings.aria' | translate"></i> [attr.aria-label]="'submission.sections.status.warnings.aria' | translate"></i>

View File

@@ -38,7 +38,7 @@
[disabled]="(processingDelete$ | async)" [disabled]="(processingDelete$ | async)"
(click)="$event.preventDefault();confirmDelete(content);"> (click)="$event.preventDefault();confirmDelete(content);">
<i *ngIf="(processingDelete$ | async)" class="fas fa-circle-notch fa-spin fa-2x text-danger"></i> <i *ngIf="(processingDelete$ | async)" class="fas fa-circle-notch fa-spin fa-2x text-danger"></i>
<i *ngIf="(processingDelete$ | async) === false" class="fa fa-trash fa-2x text-danger"></i> <i *ngIf="(processingDelete$ | async) !== true" class="fa fa-trash fa-2x text-danger"></i>
</button> </button>
</ng-container> </ng-container>
</div> </div>

View File

@@ -7,7 +7,7 @@
<ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading> <ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading>
<ng-container *ngVar="(subscriptions$ | async) as subscriptions"> <ng-container *ngVar="(subscriptions$ | async) as subscriptions">
<ds-pagination *ngIf="subscriptions?.pageInfo?.totalElements > 0 && (loading$ | async) === false" <ds-pagination *ngIf="subscriptions?.pageInfo?.totalElements > 0 && (loading$ | async) !== true"
[paginationOptions]="config" [paginationOptions]="config"
[collectionSize]="subscriptions?.pageInfo?.totalElements" [collectionSize]="subscriptions?.pageInfo?.totalElements"
[hideGear]="true" [hideGear]="true"
@@ -34,7 +34,7 @@
</div> </div>
</ds-pagination> </ds-pagination>
<ds-alert *ngIf="subscriptions?.pageInfo?.totalElements === 0 && (loading$ | async) === false" [type]="AlertType.Info" data-test="empty-alert"> <ds-alert *ngIf="subscriptions?.pageInfo?.totalElements === 0 && (loading$ | async) !== true" [type]="AlertType.Info" data-test="empty-alert">
{{ 'subscriptions.table.empty.message' | translate }} {{ 'subscriptions.table.empty.message' | translate }}
</ds-alert> </ds-alert>

View File

@@ -22,7 +22,7 @@
<i class='fas fa-circle-notch fa-spin' *ngIf="isBulkOperationPending"></i> <i class='fas fa-circle-notch fa-spin' *ngIf="isBulkOperationPending"></i>
</div> </div>
<ds-loading *ngIf="(processing$ | async)"></ds-loading> <ds-loading *ngIf="(processing$ | async)"></ds-loading>
<ds-pagination *ngIf="(processing$ | async) === false" <ds-pagination *ngIf="(processing$ | async) !== true"
[paginationOptions]="paginationOptions" [paginationOptions]="paginationOptions"
[sortOptions]="paginationSortConfig" [sortOptions]="paginationSortConfig"
[collectionSize]="suggestionsRD?.pageInfo?.totalElements" [hideGear]="false" [collectionSize]="suggestionsRD?.pageInfo?.totalElements" [hideGear]="false"

View File

@@ -8,7 +8,7 @@
<a class="d-block my-2 my-md-0" routerLink="/home" [attr.aria-label]="'home.title' | translate"> <a class="d-block my-2 my-md-0" routerLink="/home" [attr.aria-label]="'home.title' | translate">
<img id="header-logo" src="assets/images/dspace-logo.svg" [attr.alt]="'menu.header.image.logo' | translate"/> <img id="header-logo" src="assets/images/dspace-logo.svg" [attr.alt]="'menu.header.image.logo' | translate"/>
</a> </a>
<nav *ngIf="(isMobile$ | async) === false" class="navbar navbar-expand p-0 align-items-stretch align-self-stretch" id="desktop-navbar" [attr.aria-label]="'nav.main.description' | translate"> <nav *ngIf="(isMobile$ | async) !== true" class="navbar navbar-expand p-0 align-items-stretch align-self-stretch" id="desktop-navbar" [attr.aria-label]="'nav.main.description' | translate">
<ds-themed-navbar></ds-themed-navbar> <ds-themed-navbar></ds-themed-navbar>
</nav> </nav>
</div> </div>
@@ -24,7 +24,7 @@
<div id="mobile-navbar-toggler" class="d-block d-lg-none ml-3" *ngIf="(isMobile$ | async)"> <div id="mobile-navbar-toggler" class="d-block d-lg-none ml-3" *ngIf="(isMobile$ | async)">
<button id="navbar-toggler" class="btn" type="button" (click)="toggleNavbar()" <button id="navbar-toggler" class="btn" type="button" (click)="toggleNavbar()"
[attr.aria-label]="'nav.toggle' | translate" aria-controls="collapsible-mobile-navbar" [attr.aria-expanded]="(isNavBarCollapsed$ | async) === false"> [attr.aria-label]="'nav.toggle' | translate" aria-controls="collapsible-mobile-navbar" [attr.aria-expanded]="(isNavBarCollapsed$ | async) !== true">
<span class="fas fa-bars fa-fw fa-xl toggler-icon" aria-hidden="true"></span> <span class="fas fa-bars fa-fw fa-xl toggler-icon" aria-hidden="true"></span>
</button> </button>
</div> </div>