mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
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:
@@ -43,7 +43,7 @@
|
||||
|
||||
<ds-themed-loading *ngIf="searching$ | async"></ds-themed-loading>
|
||||
<ds-pagination
|
||||
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && (searching$ | async) === false"
|
||||
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && (searching$ | async) !== true"
|
||||
[paginationOptions]="config"
|
||||
[pageInfoState]="pageInfoState$"
|
||||
[collectionSize]="(pageInfoState$ | async)?.totalElements"
|
||||
|
@@ -25,7 +25,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<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}}
|
||||
</button>
|
||||
</div>
|
||||
@@ -47,7 +47,7 @@
|
||||
<div *ngIf="epersonService.getActiveEPerson() | async">
|
||||
<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
|
||||
*ngIf="(groups$ | async)?.payload?.totalElements > 0"
|
||||
|
@@ -61,6 +61,7 @@ import { PaginationServiceStub } from '../../../shared/testing/pagination-servic
|
||||
import { RouterStub } from '../../../shared/testing/router.stub';
|
||||
import { createPaginatedList } from '../../../shared/testing/utils.test';
|
||||
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 { EPersonFormComponent } from './eperson-form.component';
|
||||
import { ValidateEmailNotTaken } from './validators/email-taken.validator';
|
||||
@@ -231,7 +232,10 @@ describe('EPersonFormComponent', () => {
|
||||
},
|
||||
}),
|
||||
],
|
||||
declarations: [EPersonFormComponent],
|
||||
declarations: [
|
||||
EPersonFormComponent,
|
||||
HasNoValuePipe,
|
||||
],
|
||||
providers: [
|
||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||
{ provide: GroupDataService, useValue: groupsDataService },
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
<ds-alert *ngIf="groupBeingEdited?.permanent" [type]="AlertTypeEnum.Warning"
|
||||
[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) })">
|
||||
</ds-alert>
|
||||
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
<ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading>
|
||||
<ds-pagination
|
||||
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && (loading$ | async) === false"
|
||||
*ngIf="(pageInfoState$ | async)?.totalElements > 0 && (loading$ | async) !== true"
|
||||
[paginationOptions]="config"
|
||||
[pageInfoState]="pageInfoState$"
|
||||
[collectionSize]="(pageInfoState$ | async)?.totalElements"
|
||||
|
@@ -3,7 +3,7 @@
|
||||
[attr.aria-label]="'menu.header.nav.description' | translate"
|
||||
[ngClass]="{'expanded': sidebarOpen, 'collapsed': sidebarClosed, 'transitioning': sidebarTransitioning}"
|
||||
[@slideSidebar]="{
|
||||
value: ((sidebarExpanded | async) === false ? 'collapsed' : 'expanded'),
|
||||
value: ((sidebarExpanded | async) !== true ? 'collapsed' : 'expanded'),
|
||||
params: { collapsedWidth: (collapsedSidebarWidth$ | async), expandedWidth: (expandedSidebarWidth$ | async) }
|
||||
}" (@slideSidebar.done)="finishSlide($event)" (@slideSidebar.start)="startSlide($event)"
|
||||
*ngIf="menuVisible | async"
|
||||
@@ -49,7 +49,7 @@
|
||||
<div class="sidebar-fixed-element-wrapper">
|
||||
<i *ngIf="(menuCollapsed | async)" class="fas fa-fw fa-angle-double-right"
|
||||
[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>
|
||||
</div>
|
||||
<div class="sidebar-collapsible-element-outer-wrapper">
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<section class="comcol-page-browse-section">
|
||||
<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:{
|
||||
field: 'browse.metadata.' + browseId | translate,
|
||||
startsWith: (startsWith)? ('browse.startsWith' | translate: { startsWith: '"' + startsWith + '"' }) : '',
|
||||
|
@@ -11,7 +11,7 @@
|
||||
</button>
|
||||
<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) === 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>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<span>{{contentSource?.message ? contentSource?.message: 'collection.source.controls.harvest.no-information'|translate }}</span>
|
||||
</div>
|
||||
|
||||
<button *ngIf="(testConfigRunning$ |async) === false" class="btn btn-secondary"
|
||||
<button *ngIf="(testConfigRunning$ |async) !== true" class="btn btn-secondary"
|
||||
[disabled]="!(isEnabled)"
|
||||
(click)="testConfiguration(contentSource)">
|
||||
<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>{{'collection.source.controls.test.running' | translate}}</span>
|
||||
</button>
|
||||
<button *ngIf="(importRunning$ |async) === false" class="btn btn-primary"
|
||||
<button *ngIf="(importRunning$ |async) !== true" class="btn btn-primary"
|
||||
[disabled]="!(isEnabled)"
|
||||
(click)="importNow()">
|
||||
<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="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span>
|
||||
</button>
|
||||
<button *ngIf="(reImportRunning$ |async) === false" class="btn btn-primary"
|
||||
<button *ngIf="(reImportRunning$ |async) !== true" class="btn btn-primary"
|
||||
[disabled]="!(isEnabled)"
|
||||
(click)="resetAndReimport()">
|
||||
<span class="d-none d-sm-inline"> {{'collection.source.controls.reset.submit' | translate}}</span>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="d-inline-block float-right space-children-mr">
|
||||
<button class=" btn btn-danger" *ngIf="(isReinstatable() | async) === false"
|
||||
[disabled]="(hasChanges() | async) === false"
|
||||
<button class=" btn btn-danger" *ngIf="(isReinstatable() | async) !== true"
|
||||
[disabled]="(hasChanges() | async) !== true"
|
||||
(click)="discard()"><i
|
||||
class="fas fa-times"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||
@@ -12,7 +12,7 @@
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
||||
</button>
|
||||
<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
|
||||
class="fas fa-save"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
||||
@@ -44,8 +44,8 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="d-inline-block float-right ml-1 space-children-mr">
|
||||
<button class=" btn btn-danger" *ngIf="(isReinstatable() | async) === false"
|
||||
[disabled]="(hasChanges() | async) === false"
|
||||
<button class=" btn btn-danger" *ngIf="(isReinstatable() | async) !== true"
|
||||
[disabled]="(hasChanges() | async) !== true"
|
||||
(click)="discard()"><i
|
||||
class="fas fa-times"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||
@@ -56,7 +56,7 @@
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
||||
</button>
|
||||
<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
|
||||
class="fas fa-save"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
||||
@@ -66,7 +66,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<ds-collection-source-controls
|
||||
[isEnabled]="(hasChanges() | async) === false"
|
||||
[isEnabled]="(hasChanges() | async) !== true"
|
||||
[shouldShow]="contentSource?.harvestType !== harvestTypeNone"
|
||||
[collection]="(collectionRD$ |async)?.payload"
|
||||
>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<span class="fa fa-chevron-right"></span>
|
||||
</span>
|
||||
<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">
|
||||
<i class="fas fa-angle-down"></i> {{ 'communityList.showMore' | translate }}
|
||||
</button>
|
||||
@@ -33,7 +33,7 @@
|
||||
<span class="sr-only">{{ (node.isExpanded ? 'communityList.collapse' : 'communityList.expand') | translate:{ name: dsoNameService.getName(node.payload) } }}</span>
|
||||
</button>
|
||||
<!--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>
|
||||
<div class="d-flex flex-row">
|
||||
|
@@ -11,7 +11,7 @@
|
||||
</button>
|
||||
<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) === 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>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -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 }">
|
||||
<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>
|
||||
<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"
|
||||
[dsDebounce]="300" (onDebounce)="confirm.emit(false)"></textarea>
|
||||
<ds-dynamic-scrollable-dropdown *ngIf="mdValue.editing && (isScrollableVocabulary() | async)"
|
||||
|
@@ -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-navbar></ds-themed-navbar>
|
||||
</div>
|
||||
|
@@ -15,7 +15,7 @@
|
||||
{{'item.edit.tabs.' + page.page + '.head' | translate}}
|
||||
</a>
|
||||
<span [ngbTooltip]="'item.edit.tabs.disabled.tooltip' | translate">
|
||||
<button *ngIf="(page.enabled | async) === false"
|
||||
<button *ngIf="(page.enabled | async) !== true"
|
||||
class="nav-link disabled">
|
||||
{{'item.edit.tabs.' + page.page + '.head' | translate}}
|
||||
</button>
|
||||
|
@@ -12,15 +12,15 @@
|
||||
class="fas fa-undo-alt"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
||||
</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"
|
||||
(click)="submit()"><i
|
||||
class="fas fa-save"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.save-button" | translate}}</span>
|
||||
</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"
|
||||
[disabled]="(hasChanges() | async) === false || submitting"
|
||||
[disabled]="(hasChanges() | async) !== true || submitting"
|
||||
(click)="discard()"><i
|
||||
class="fas fa-times"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
||||
@@ -58,15 +58,15 @@
|
||||
class="fas fa-undo-alt"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
||||
</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"
|
||||
(click)="submit()"><i
|
||||
class="fas fa-save"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.save-button" | translate}}</span>
|
||||
</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"
|
||||
[disabled]="(hasChanges() | async) === false || submitting"
|
||||
[disabled]="(hasChanges() | async) !== true || submitting"
|
||||
(click)="discard()"><i
|
||||
class="fas fa-times"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
[paginationOptions]="options"
|
||||
[pageInfoState]="(objectsRD$ | async)?.payload"
|
||||
[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"
|
||||
[ngClass]="{'mb-3': (objectsRD$ | async)?.payload?.totalElements > pageSize}"
|
||||
*ngVar="(updates$ | async) as updates" cdkDropList (cdkDropListDropped)="drop($event)">
|
||||
|
@@ -6,7 +6,7 @@
|
||||
</button>
|
||||
</h2>
|
||||
<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">
|
||||
<ds-pagination
|
||||
[paginationOptions]="paginationConfig"
|
||||
|
@@ -2,8 +2,8 @@
|
||||
<ng-container *ngVar="entityType$ | async as entityType">
|
||||
<ng-container *ngIf="entityType">
|
||||
<div class="button-row top d-flex space-children-mr">
|
||||
<button class="btn btn-danger ml-auto" *ngIf="(isReinstatable() | async) === false"
|
||||
[disabled]="(hasChanges() | async) === false"
|
||||
<button class="btn btn-danger ml-auto" *ngIf="(isReinstatable() | async) !== true"
|
||||
[disabled]="(hasChanges() | async) !== true"
|
||||
(click)="discard()"><i
|
||||
class="fas fa-times"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||
@@ -13,7 +13,7 @@
|
||||
class="fas fa-undo-alt"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
||||
</button>
|
||||
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false"
|
||||
<button class="btn btn-primary" [disabled]="(hasChanges() | async) !== true"
|
||||
(click)="submit()"><i
|
||||
class="fas fa-save"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
||||
@@ -36,8 +36,8 @@
|
||||
</ng-container>
|
||||
<div class="button-row bottom">
|
||||
<div class="float-right space-children-mr ml-gap">
|
||||
<button class="btn btn-danger" *ngIf="(isReinstatable() | async) === false"
|
||||
[disabled]="(hasChanges() | async) === false"
|
||||
<button class="btn btn-danger" *ngIf="(isReinstatable() | async) !== true"
|
||||
[disabled]="(hasChanges() | async) !== true"
|
||||
(click)="discard()"><i
|
||||
class="fas fa-times"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||
@@ -47,7 +47,7 @@
|
||||
class="fas fa-undo-alt"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
||||
</button>
|
||||
<button class="btn btn-primary" [disabled]="(hasChanges() | async) === false"
|
||||
<button class="btn btn-primary" [disabled]="(hasChanges() | async) !== true"
|
||||
(click)="submit()"><i
|
||||
class="fas fa-save"></i>
|
||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
<a
|
||||
*ngIf="(isLoading$ | async) === false && (hasMore$ | async)"
|
||||
*ngIf="(isLoading$ | async) !== true && (hasMore$ | async)"
|
||||
(click)="$event.preventDefault(); handleLoadMore()"
|
||||
class="load-more-btn btn btn-sm btn-outline-secondary"
|
||||
role="button"
|
||||
|
@@ -25,7 +25,7 @@
|
||||
<div class="card-header">{{ 'person.page.orcid.missing-authorizations'| translate }}</div>
|
||||
<div class="card-body">
|
||||
<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}}
|
||||
</ds-alert>
|
||||
<ds-alert *ngIf="(hasMissingOrcidAuthorizations() | async)" [type]="'alert-warning'" data-test="missingOrcidAuthorizations">
|
||||
@@ -41,7 +41,7 @@
|
||||
</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">
|
||||
{{ 'person.page.orcid.remove-orcid-message' | translate}}
|
||||
</ds-alert>
|
||||
@@ -49,7 +49,7 @@
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-danger float-right" (click)="unlinkOrcid()"
|
||||
[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>
|
||||
<span *ngIf="(unlinkProcessing | async)"><i
|
||||
class='fas fa-circle-notch fa-spin'></i> {{'person.page.orcid.unlink.processing' | translate}}</span>
|
||||
|
@@ -1,14 +1,14 @@
|
||||
<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>
|
||||
</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-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>
|
||||
</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="text-right">
|
||||
<a [routerLink]="getItemPage()" role="button" class="btn btn-outline-secondary" data-test="back-button">
|
||||
|
@@ -3,11 +3,11 @@
|
||||
<div class="container">
|
||||
<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">
|
||||
{{ 'person.page.orcid.sync-queue.empty-message' | translate}}
|
||||
</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"
|
||||
[collectionSize]="(getList() | async)?.payload?.totalElements"
|
||||
[retainScrollPosition]="false" [hideGear]="true" (paginationChange)="updateList()">
|
||||
|
@@ -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}}
|
||||
<button type="button" class="close" (click)="onModalClose()" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
|
@@ -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"
|
||||
[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"
|
||||
title="{{'mydspace.new-submission-external' | translate}}">
|
||||
<i class="fa fa-file-import" aria-hidden="true"></i>
|
||||
@@ -10,7 +10,7 @@
|
||||
ngbDropdown
|
||||
*ngIf="(moreThanOne$ | async)">
|
||||
<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.data-test]="'import-dropdown' | dsBrowserOnly"
|
||||
title="{{'mydspace.new-submission-external' | translate}}">
|
||||
|
@@ -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"
|
||||
[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>
|
||||
</button>
|
||||
</div>
|
||||
@@ -8,7 +8,7 @@
|
||||
ngbDropdown
|
||||
*ngIf="(moreThanOne$ | async)">
|
||||
<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.data-test]="'submission-dropdown' | dsBrowserOnly"
|
||||
title="{{'mydspace.new-submission' | translate}}">
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<nav [ngClass]="{'open': (menuCollapsed | async) === false}"
|
||||
[@slideMobileNav]="(windowService.isXsOrSm() | async) === false ? 'default' : ((menuCollapsed | async) ? 'collapsed' : 'expanded')"
|
||||
<nav [ngClass]="{'open': (menuCollapsed | async) !== true}"
|
||||
[@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"
|
||||
[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 -->
|
||||
<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 id="collapsingNav">
|
||||
<ng-container *ngIf="(isMobile$ | async) && (isAuthenticated$ | async)">
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
<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"
|
||||
[collectionSize]="(totalElements$ | async)"
|
||||
[sortOptions]="paginationSortConfig"
|
||||
@@ -196,7 +196,7 @@
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>
|
||||
</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"
|
||||
ngbTooltip="{{'quality-assurance.event.action.undo' | translate}}"
|
||||
container="body"
|
||||
|
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
|
||||
<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)"
|
||||
[sortConfig]="this.searchOptions?.sort"
|
||||
[searchConfig]="this.searchOptions"
|
||||
@@ -53,7 +53,7 @@
|
||||
(selectObject)="selectEntity($event)">
|
||||
</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'">
|
||||
<p class="lead mb-0">{{(labelPrefix + label + '.notFound' | translate)}}</p>
|
||||
</ds-alert>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<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-pagination *ngIf="(isSourceLoading() | async) === false"
|
||||
<ds-pagination *ngIf="(isSourceLoading() | async) !== true"
|
||||
[paginationOptions]="paginationConfig"
|
||||
[collectionSize]="(totalElements$ | async)"
|
||||
[hideGear]="false"
|
||||
@@ -18,7 +18,7 @@
|
||||
(paginationChange)="getQualityAssuranceSource()">
|
||||
|
||||
<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">
|
||||
{{'quality-assurance.noSource' | translate}}
|
||||
</div>
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<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-pagination *ngIf="(isTopicsLoading() | async) === false"
|
||||
<ds-pagination *ngIf="(isTopicsLoading() | async) !== true"
|
||||
[paginationOptions]="paginationConfig"
|
||||
[collectionSize]="(totalElements$ | async)"
|
||||
[hideGear]="false"
|
||||
@@ -22,7 +22,7 @@
|
||||
(paginationChange)="getQualityAssuranceTopics(sourceId, targetId)">
|
||||
|
||||
<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">
|
||||
{{'quality-assurance.noTopics' | translate}}
|
||||
</div>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<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-pagination *ngIf="(isTargetsLoading() | async) === false"
|
||||
<ds-pagination *ngIf="(isTargetsLoading() | async) !== true"
|
||||
[paginationOptions]="paginationConfig"
|
||||
[collectionSize]="(totalElements$ | async)"
|
||||
[hideGear]="false"
|
||||
@@ -12,7 +12,7 @@
|
||||
(paginationChange)="getSuggestionTargets()">
|
||||
|
||||
<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">
|
||||
{{'suggestion.noTargets' | translate}}
|
||||
</div>
|
||||
|
@@ -55,8 +55,8 @@
|
||||
message="{{ 'process.detail.logs.loading' | translate }}"></ds-themed-loading>
|
||||
<pre class="font-weight-bold text-secondary bg-light p-3" tabindex="0"
|
||||
*ngIf="showOutputLogs && (outputLogs$ | async)?.length > 0">{{ (outputLogs$ | async) }}</pre>
|
||||
<p id="no-output-logs-message" *ngIf="((retrievingOutputLogs$ | async) === false && showOutputLogs)
|
||||
&& (outputLogs$ | async) === null || (outputLogs$ | async)?.length === 0 || !process._links.output">
|
||||
<p id="no-output-logs-message" *ngIf="((retrievingOutputLogs$ | async) !== true && showOutputLogs)
|
||||
&& (outputLogs$ | async | dsHasNoValue) || (outputLogs$ | async)?.length === 0 || !process._links.output">
|
||||
{{ 'process.detail.logs.none' | translate }}
|
||||
</p>
|
||||
</ds-process-detail-field>
|
||||
|
@@ -37,6 +37,7 @@ import { NotificationsServiceStub } from '../../shared/testing/notifications-ser
|
||||
import { RouterStub } from '../../shared/testing/router.stub';
|
||||
import { createPaginatedList } from '../../shared/testing/utils.test';
|
||||
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 { getProcessListRoute } from '../process-page-routing.paths';
|
||||
import { Process } from '../processes/process.model';
|
||||
@@ -147,7 +148,13 @@ describe('ProcessDetailComponent', () => {
|
||||
beforeEach(waitForAsync(() => {
|
||||
init();
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [ProcessDetailComponent, ProcessDetailFieldComponent, VarDirective, FileSizePipe],
|
||||
declarations: [
|
||||
ProcessDetailComponent,
|
||||
ProcessDetailFieldComponent,
|
||||
VarDirective,
|
||||
FileSizePipe,
|
||||
HasNoValuePipe,
|
||||
],
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: route },
|
||||
|
@@ -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>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!fromExisting$ || (fromExisting$ | async) === null">
|
||||
<ng-template #newProcess>
|
||||
<ds-process-form headerKey="process.new.header"></ds-process-form>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
|
@@ -19,6 +19,7 @@ import { RequestService } from '../../core/data/request.service';
|
||||
import { TranslateLoaderMock } from '../../shared/mocks/translate-loader.mock';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub';
|
||||
import { HasValuePipe } from '../../shared/utils/has-value.pipe';
|
||||
import { VarDirective } from '../../shared/utils/var.directive';
|
||||
import { ProcessParameter } from '../processes/process-parameter.model';
|
||||
import { Script } from '../scripts/script.model';
|
||||
@@ -65,7 +66,11 @@ describe('NewProcessComponent', () => {
|
||||
useClass: TranslateLoaderMock,
|
||||
},
|
||||
})],
|
||||
declarations: [NewProcessComponent, VarDirective],
|
||||
declarations: [
|
||||
NewProcessComponent,
|
||||
VarDirective,
|
||||
HasValuePipe,
|
||||
],
|
||||
providers: [
|
||||
{ provide: ScriptDataService, useValue: scriptService },
|
||||
{ provide: NotificationsService, useClass: NotificationsServiceStub },
|
||||
|
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<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>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<span *ngIf="(isProcessingCreate() | async)">
|
||||
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
||||
</span>
|
||||
<span *ngIf="(isProcessingCreate() | async) === false">
|
||||
<span *ngIf="(isProcessingCreate() | async) !== true">
|
||||
<i class="fas fa-plus"></i> {{'researcher.profile.create.new' | translate}}
|
||||
</span>
|
||||
</button>
|
||||
@@ -30,7 +30,7 @@
|
||||
<span *ngIf="(isProcessingDelete() | async)">
|
||||
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
||||
</span>
|
||||
<span *ngIf="(isProcessingDelete() | async) === false">
|
||||
<span *ngIf="(isProcessingDelete() | async) !== true">
|
||||
<i class="fas fa-trash-alt"></i> {{'researcher.profile.delete' | translate}}
|
||||
</span>
|
||||
</button>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
</button>
|
||||
|
||||
<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) }
|
||||
}">
|
||||
<ds-themed-admin-sidebar [expandedSidebarWidth$]="expandedSidebarWidth$" [collapsedSidebarWidth$]="collapsedSidebarWidth$"></ds-themed-admin-sidebar>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<div class="navbar-nav mr-auto" *ngIf="(isMobile$ | async) === false; else mobileButtons" data-test="auth-nav">
|
||||
<div *ngIf="(isAuthenticated | async) === false && (showAuth | async)"
|
||||
<div class="navbar-nav mr-auto" *ngIf="(isMobile$ | async) !== true; else mobileButtons" data-test="auth-nav">
|
||||
<div *ngIf="(isAuthenticated | async) !== true && (showAuth | async)"
|
||||
class="nav-item"
|
||||
(click)="$event.stopPropagation();">
|
||||
<div ngbDropdown #loginDrop="ngbDropdown" display="dynamic" placement="bottom-right" class="d-inline-block" @fadeInOut>
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<ng-template #mobileButtons>
|
||||
<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>
|
||||
</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">
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<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'"
|
||||
[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">
|
||||
|
@@ -18,7 +18,7 @@
|
||||
[scrollWindow]="false"
|
||||
(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}}
|
||||
</li>
|
||||
<ng-container *ngIf="searchListCollection?.length > 0">
|
||||
|
@@ -13,10 +13,10 @@
|
||||
|
||||
<div class="d-flex flex-md-row justify-content-between flex-column">
|
||||
<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">
|
||||
{{'comcol-role.edit.no-group' | translate}}
|
||||
</div>
|
||||
</div>V
|
||||
<div *ngIf="hasAnonymousGroup$ | async">
|
||||
{{'comcol-role.edit.' + (comcolRole$ | async)?.name + '.anonymous-group' | translate}}
|
||||
</div>
|
||||
|
@@ -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">
|
||||
{{ 'item.qa.withdrawn.modal.header' | translate }}
|
||||
<button type="button" class="close" (click)="onModalClose()" aria-label="Close">
|
||||
|
@@ -8,7 +8,7 @@
|
||||
[fromRoot]="true"
|
||||
[scrollWindow]="false"
|
||||
(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">
|
||||
{{'submission.sections.general.no-entity' | translate}}
|
||||
</button>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<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>
|
||||
</a>
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
</ul>
|
||||
</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"
|
||||
dsAuthorityConfidenceState
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<a *ngIf="(formCollapsed | async) === false"
|
||||
<a *ngIf="(formCollapsed | async) !== true"
|
||||
class="close position-relative"
|
||||
ngbTooltip="{{'form.group-collapse-help' | translate}}"
|
||||
placement="left">
|
||||
@@ -16,7 +16,7 @@
|
||||
</a>
|
||||
|
||||
<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"
|
||||
class="col-sm-12 col-md-8 col-lg-9 col-xl-10 pl-0"
|
||||
[formId]="formId"
|
||||
@@ -28,7 +28,7 @@
|
||||
(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"
|
||||
class="btn btn-link"
|
||||
|
@@ -22,7 +22,7 @@
|
||||
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. -->
|
||||
|
||||
<input *ngIf="!allSelected && (someSelected$ | async) === false"
|
||||
<input *ngIf="!allSelected && (someSelected$ | async) !== true"
|
||||
type="checkbox"
|
||||
[indeterminate]="false"
|
||||
(change)="selectAll()">
|
||||
|
@@ -62,7 +62,7 @@
|
||||
</button>
|
||||
<ng-content select="[between]"></ng-content>
|
||||
<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}}
|
||||
</button>
|
||||
<ng-content select="[after]"></ng-content>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="treeview-container">
|
||||
<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>
|
||||
</h2>
|
||||
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl">
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<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">
|
||||
<ds-log-in-container [authMethod]="authMethod" [isStandalonePage]="isStandalonePage"></ds-log-in-container>
|
||||
<div *ngIf="!last" class="dropdown-divider my-2"></div>
|
||||
|
@@ -4,5 +4,5 @@
|
||||
[disabled]="processing$ | async"
|
||||
(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) === 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>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<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">
|
||||
<span *ngIf="(processing$ | async) !== true">
|
||||
<i class="fa fa-ban"></i> {{'submission.workflow.tasks.claimed.decline' | translate}}
|
||||
</span>
|
||||
</button>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
[disabled]="processing$ | async"
|
||||
(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) === 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>
|
||||
|
||||
<ng-template #rejectModal let-c="close" let-d="dismiss">
|
||||
@@ -31,7 +31,7 @@
|
||||
[disabled]="!rejectForm.valid || (processing$ | async)"
|
||||
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) === 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>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -4,5 +4,5 @@
|
||||
[disabled]="processing$ | async"
|
||||
(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) === 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>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
(click)="claim()">
|
||||
<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="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>
|
||||
</button>
|
||||
<button class="btn btn-primary workflow-view ml-1 mt-1 mb-3" data-test="view-btn"
|
||||
|
@@ -22,7 +22,7 @@
|
||||
(click)="$event.preventDefault();confirmDiscard(content)">
|
||||
<span *ngIf="(processingDelete$ | async)"><i class='fas fa-circle-notch fa-spin'></i>
|
||||
{{'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>
|
||||
</button>
|
||||
</div>
|
||||
|
@@ -19,7 +19,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<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">
|
||||
<span *ngVar="(item.owningCollection | async)?.payload as collection">
|
||||
<a *ngIf="collection" [routerLink]="['/collections', collection?.id]">
|
||||
|
@@ -32,7 +32,7 @@
|
||||
(click)="redirectToResourcePolicyEditPage()">
|
||||
<i class="fas fa-edit fa-fw" aria-hidden="true"></i>
|
||||
</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"
|
||||
(click)="redirectToGroupEditPage()">
|
||||
<i class="fas fa-users fa-fw" aria-hidden="true"></i>
|
||||
|
@@ -29,6 +29,7 @@ import { createSuccessfulRemoteDataObject } from '../../remote-data.utils';
|
||||
import { EPersonMock } from '../../testing/eperson.mock';
|
||||
import { GroupMock } from '../../testing/group-mock';
|
||||
import { RouterStub } from '../../testing/router.stub';
|
||||
import { HasValuePipe } from '../../utils/has-value.pipe';
|
||||
import { ResourcePolicyEntryComponent } from './resource-policy-entry.component';
|
||||
import createSpyObj = jasmine.createSpyObj;
|
||||
|
||||
@@ -128,6 +129,7 @@ describe('ResourcePolicyEntryComponent', () => {
|
||||
],
|
||||
declarations: [
|
||||
ResourcePolicyEntryComponent,
|
||||
HasValuePipe,
|
||||
],
|
||||
providers: [
|
||||
{ provide: ActivatedRoute, useValue: routeStub },
|
||||
|
@@ -35,12 +35,12 @@
|
||||
(click)="onReset()">{{'form.cancel' | translate}}</button>
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
[disabled]="(isFormValid() | async) === false || (isProcessing | async)"
|
||||
[disabled]="(isFormValid() | async) !== true || (isProcessing | async)"
|
||||
(click)="onSubmit()">
|
||||
<span *ngIf="(isProcessing | async)">
|
||||
<i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}
|
||||
</span>
|
||||
<span *ngIf="(isProcessing | async) === false">
|
||||
<span *ngIf="(isProcessing | async) !== true">
|
||||
{{'form.submit' | translate}}
|
||||
</span>
|
||||
</button>
|
||||
|
@@ -13,13 +13,13 @@
|
||||
</span>
|
||||
<div class="space-children-mr flex-shrink-0">
|
||||
<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"
|
||||
(click)="deleteSelectedResourcePolicies()">
|
||||
<span *ngIf="(isProcessingDelete() | async)">
|
||||
<i class='fas fa-circle-notch fa-spin' aria-hidden="true"></i> {{'submission.workflow.tasks.generic.processing' | translate}}
|
||||
</span>
|
||||
<span *ngIf="(isProcessingDelete() | async) === false">
|
||||
<span *ngIf="(isProcessingDelete() | async) !== true">
|
||||
<i class='fas fa-trash-alt fa-fw' aria-hidden="true"></i>
|
||||
{{'resource-policies.delete.btn' | translate}}
|
||||
</span>
|
||||
|
@@ -57,6 +57,7 @@ import {
|
||||
createPaginatedList,
|
||||
createTestComponent,
|
||||
} from '../testing/utils.test';
|
||||
import { HasValuePipe } from '../utils/has-value.pipe';
|
||||
import { ResourcePolicyEntryComponent } from './entry/resource-policy-entry.component';
|
||||
import { ResourcePoliciesComponent } from './resource-policies.component';
|
||||
|
||||
@@ -230,6 +231,7 @@ describe('ResourcePoliciesComponent test suite', () => {
|
||||
ResourcePoliciesComponent,
|
||||
ResourcePolicyEntryComponent,
|
||||
TestComponent,
|
||||
HasValuePipe,
|
||||
],
|
||||
providers: [
|
||||
{ provide: LinkService, useValue: linkService },
|
||||
|
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
<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);">
|
||||
{{"search.filters.filter.show-more" | translate}}
|
||||
</a>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
<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);">
|
||||
{{"search.filters.filter.show-more" | translate}}
|
||||
</a>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
[id]="regionId" [attr.aria-labelledby]="toggleId" [ngClass]="{ 'focus': focusBox }" role="region">
|
||||
<button (click)="toggle()" (focusin)="focusBox = true" (focusout)="focusBox = false"
|
||||
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.data-test]="'filter-toggle' | dsBrowserOnly"
|
||||
>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
<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);">
|
||||
{{"search.filters.filter.show-more" | translate}}
|
||||
</a>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
<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);">
|
||||
{{"search.filters.filter.show-more" | translate}}
|
||||
</a>
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
<ng-template #searchContent>
|
||||
<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-content select="[additionalSearchOptions]"></ng-content>
|
||||
</div>
|
||||
@@ -50,7 +50,7 @@
|
||||
</ng-template>
|
||||
|
||||
<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"
|
||||
[configuration]="(currentConfiguration$ | async)"
|
||||
[currentScope]="(currentScope$ | async)"
|
||||
|
@@ -176,6 +176,8 @@ import { EmphasizePipe } from './utils/emphasize.pipe';
|
||||
import { EnumKeysPipe } from './utils/enum-keys-pipe';
|
||||
import { FileSizePipe } from './utils/file-size-pipe';
|
||||
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 { IpV4Validator } from './utils/ipV4.validator';
|
||||
import { MarkdownPipe } from './utils/markdown.pipe';
|
||||
@@ -231,6 +233,8 @@ const PIPES = [
|
||||
MarkdownPipe,
|
||||
ShortNumberPipe,
|
||||
SplitPipe,
|
||||
HasValuePipe,
|
||||
HasNoValuePipe,
|
||||
];
|
||||
|
||||
const COMPONENTS = [
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<ng-container *ngTemplateOutlet="sidebarContent"></ng-container>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -38,7 +38,7 @@
|
||||
<span *ngIf="(processing$ | async)">
|
||||
<i class='fas fa-circle-notch fa-spin'></i> {{'subscriptions.modal.new-subscription-form.processing' | translate}}
|
||||
</span>
|
||||
<span *ngIf="(processing$ | async) === false">
|
||||
<span *ngIf="(processing$ | async) !== true">
|
||||
{{'subscriptions.modal.new-subscription-form.submit' | translate}}
|
||||
</span>
|
||||
</button>
|
||||
|
16
src/app/shared/utils/has-no-value.pipe.ts
Normal file
16
src/app/shared/utils/has-no-value.pipe.ts
Normal 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);
|
||||
}
|
||||
}
|
16
src/app/shared/utils/has-value.pipe.ts
Normal file
16
src/app/shared/utils/has-value.pipe.ts
Normal 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);
|
||||
}
|
||||
}
|
@@ -19,7 +19,7 @@
|
||||
[report]="report"
|
||||
class="m-2 {{ report.id }}">
|
||||
</ds-statistics-table>
|
||||
<div *ngIf="(hasData$ | async) === false">
|
||||
<div *ngIf="(hasData$ | async) !== true">
|
||||
{{ 'statistics.page.no-data' | translate }}
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<div
|
||||
*ngIf="(available$ | async) === false"
|
||||
*ngIf="(available$ | async) !== true"
|
||||
class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">{{ 'submission.sections.general.collection' | translate }}</span>
|
||||
@@ -28,7 +28,7 @@
|
||||
[disabled]="(processingChange$ | async) || collectionModifiable === false || isReadonly"
|
||||
ngbDropdownToggle>
|
||||
<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>
|
||||
|
||||
<div ngbDropdownMenu
|
||||
|
@@ -11,10 +11,10 @@
|
||||
</button>
|
||||
</div>
|
||||
<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}}
|
||||
</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}}
|
||||
</span>
|
||||
<div *ngIf="(processingSaveStatus | async) || (processingDepositStatus | async)" class="col d-flex justify-content-end align-items-center">
|
||||
@@ -28,12 +28,12 @@
|
||||
class="btn btn-secondary"
|
||||
id="save"
|
||||
[attr.data-test]="'save' | dsBrowserOnly"
|
||||
[disabled]="(processingSaveStatus | async) || (hasUnsavedModification | async) === false"
|
||||
[disabled]="(processingSaveStatus | async) || (hasUnsavedModification | async) !== true"
|
||||
(click)="save($event)">
|
||||
<span><i class="fas fa-save"></i> {{'submission.general.save' | translate}}</span>
|
||||
</button>
|
||||
<button type="button"
|
||||
[class.btn-primary]="(showDepositAndDiscard | async) === false"
|
||||
[class.btn-primary]="(showDepositAndDiscard | async) !== true"
|
||||
[class.btn-secondary]="(showDepositAndDiscard | async)"
|
||||
class="btn"
|
||||
id="saveForLater"
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<ng-container *ngIf="hasSections$ | async">
|
||||
<button class="btn btn-outline-primary dropdown-toggle"
|
||||
id="sectionControls"
|
||||
[disabled]="(hasSections$ | async) === false"
|
||||
[disabled]="(hasSections$ | async) !== true"
|
||||
[ngClass]="{'w-100': (windowService.isXs() | async)}"
|
||||
ngbDropdownToggle>
|
||||
{{ 'submission.sections.general.add-more' | translate }} <i class="fa fa-plus" aria-hidden="true"></i>
|
||||
@@ -16,7 +16,7 @@
|
||||
class="sections-dropdown-menu"
|
||||
aria-labelledby="sectionControls"
|
||||
[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 }}
|
||||
</button>
|
||||
<button class="dropdown-item" *ngFor="let listItem of (sectionList$ | async)" (click)="addSection(listItem.id)">
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<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">
|
||||
<ds-submission-upload-files [submissionId]="submissionId"
|
||||
[collectionId]="collectionId"
|
||||
@@ -35,7 +35,7 @@
|
||||
</ds-submission-section-container>
|
||||
</ng-container>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -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">
|
||||
</div>
|
||||
<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">
|
||||
<div [ngClass]="{'input-group-append': (isXsOrSm$ | async) === false}" ngbDropdown role="group">
|
||||
<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) !== true}" ngbDropdown role="group">
|
||||
<button [attr.aria-label]="'submission.import-external.search.source.hint' |translate"
|
||||
class="btn btn-outline-secondary w-fx"
|
||||
title="{{'submission.import-external.search.source.hint' |translate}}"
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<div *ngIf="reload$.value.sourceId !== ''" class="col-md-12">
|
||||
<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>
|
||||
<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"
|
||||
[selectionConfig]="{ repeatable: repeatable, listId: listId }"
|
||||
[config]="initialPagination"
|
||||
@@ -24,10 +24,10 @@
|
||||
</ds-viewable-collection>
|
||||
<ds-themed-loading *ngIf="(isLoading$ | async)"
|
||||
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>
|
||||
</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>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
'submission.sections.'+sectionData.header | translate
|
||||
}}</span>
|
||||
<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"
|
||||
title="{{'submission.sections.status.warnings.title' | translate}}" role="img"
|
||||
[attr.aria-label]="'submission.sections.status.warnings.aria' | translate"></i>
|
||||
|
@@ -38,7 +38,7 @@
|
||||
[disabled]="(processingDelete$ | async)"
|
||||
(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) === 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>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<ds-themed-loading *ngIf="loading$ | async"></ds-themed-loading>
|
||||
<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"
|
||||
[collectionSize]="subscriptions?.pageInfo?.totalElements"
|
||||
[hideGear]="true"
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</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 }}
|
||||
</ds-alert>
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
<i class='fas fa-circle-notch fa-spin' *ngIf="isBulkOperationPending"></i>
|
||||
</div>
|
||||
<ds-loading *ngIf="(processing$ | async)"></ds-loading>
|
||||
<ds-pagination *ngIf="(processing$ | async) === false"
|
||||
<ds-pagination *ngIf="(processing$ | async) !== true"
|
||||
[paginationOptions]="paginationOptions"
|
||||
[sortOptions]="paginationSortConfig"
|
||||
[collectionSize]="suggestionsRD?.pageInfo?.totalElements" [hideGear]="false"
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<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"/>
|
||||
</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>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<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()"
|
||||
[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>
|
||||
</button>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user