mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge pull request #932 from atmire/w2p-74356_Issue-867_Missing-labels-externalsources
Submission relationship lookup externalsources: Missing i18n labels & other issues
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ExternalSourceService } from './external-source.service';
|
||||
import { SearchService } from '../shared/search/search.service';
|
||||
import { concat, map, multicast, startWith, take, takeWhile } from 'rxjs/operators';
|
||||
import { concat, distinctUntilChanged, map, multicast, startWith, take, takeWhile } from 'rxjs/operators';
|
||||
import { PaginatedSearchOptions } from '../../shared/search/paginated-search-options.model';
|
||||
import { ReplaySubject } from 'rxjs/internal/ReplaySubject';
|
||||
import { RemoteData } from './remote-data';
|
||||
@@ -91,7 +91,8 @@ export class LookupRelationService {
|
||||
getAllSucceededRemoteData(),
|
||||
getRemoteDataPayload(),
|
||||
map((results: PaginatedList<ExternalSourceEntry>) => results.totalElements),
|
||||
startWith(0)
|
||||
startWith(0),
|
||||
distinctUntilChanged()
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -7,6 +7,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { Metadata } from '../../../../../core/shared/metadata.utils';
|
||||
import { MetadataValue } from '../../../../../core/shared/metadata.models';
|
||||
|
||||
@listableObjectComponent(ExternalSourceEntry, ViewMode.ListElement, Context.EntitySearchModal)
|
||||
@listableObjectComponent(ExternalSourceEntry, ViewMode.ListElement, Context.EntitySearchModalWithNameVariants)
|
||||
@Component({
|
||||
selector: 'ds-external-source-entry-list-submission-element',
|
||||
|
@@ -407,7 +407,7 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
||||
modalComp.repeatable = this.model.repeatable;
|
||||
modalComp.listId = this.listId;
|
||||
modalComp.relationshipOptions = this.model.relationship;
|
||||
modalComp.label = this.model.label;
|
||||
modalComp.label = this.model.relationship.relationshipType;
|
||||
modalComp.metadataFields = this.model.metadataFields;
|
||||
modalComp.item = this.item;
|
||||
modalComp.collection = this.collection;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, NgZone, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { combineLatest, Observable, Subscription, zip as observableZip } from 'rxjs';
|
||||
import { combineLatest as observableCombineLatest, Observable, Subscription } from 'rxjs';
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { hasValue } from '../../../../empty.util';
|
||||
import { map, skip, switchMap, take } from 'rxjs/operators';
|
||||
@@ -157,7 +157,7 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy
|
||||
select(...selectableObjects: Array<SearchResult<Item>>) {
|
||||
this.zone.runOutsideAngular(
|
||||
() => {
|
||||
const obs: Observable<any[]> = combineLatest(...selectableObjects.map((sri: SearchResult<Item>) => {
|
||||
const obs: Observable<any[]> = observableCombineLatest(...selectableObjects.map((sri: SearchResult<Item>) => {
|
||||
this.addNameVariantSubscription(sri);
|
||||
return this.relationshipService.getNameVariant(this.listId, sri.indexableObject.uuid)
|
||||
.pipe(
|
||||
@@ -223,7 +223,7 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy
|
||||
switchMap((options) => this.lookupRelationService.getTotalLocalResults(this.relationshipOptions, options))
|
||||
);
|
||||
|
||||
const externalSourcesAndOptions$ = combineLatest(
|
||||
const externalSourcesAndOptions$ = observableCombineLatest(
|
||||
this.externalSourcesRD$.pipe(
|
||||
getAllSucceededRemoteData(),
|
||||
getRemoteDataPayload()
|
||||
@@ -233,7 +233,7 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy
|
||||
|
||||
this.totalExternal$ = externalSourcesAndOptions$.pipe(
|
||||
switchMap(([sources, options]) =>
|
||||
observableZip(...sources.page.map((source: ExternalSource) => this.lookupRelationService.getTotalExternalResults(source, options))))
|
||||
observableCombineLatest(...sources.page.map((source: ExternalSource) => this.lookupRelationService.getTotalExternalResults(source, options))))
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<div class="d-inline-block mr-2">
|
||||
<div class="mr-2">
|
||||
<button (click)="importObject.emit(object)"
|
||||
class="btn btn-outline-primary btn-sm float-left"
|
||||
title="{{importConfig?.buttonLabel | translate}}">
|
||||
|
@@ -12,20 +12,16 @@
|
||||
(sortFieldChange)="onSortFieldChange($event)"
|
||||
(paginationChange)="onPaginationChange($event)">
|
||||
<ul *ngIf="objects?.hasSucceeded" class="list-unstyled" [ngClass]="{'ml-4': selectable}">
|
||||
<li *ngFor="let object of objects?.payload?.page; let i = index; let last = last" class="mt-4 mb-4" [class.border-bottom]="hasBorder && !last">
|
||||
<span *ngIf="selectable">
|
||||
<ds-selectable-list-item-control [index]="i"
|
||||
[object]="object"
|
||||
[selectionConfig]="selectionConfig"
|
||||
(deselectObject)="deselectObject.emit($event)"
|
||||
(selectObject)="selectObject.emit($event)"></ds-selectable-list-item-control>
|
||||
</span>
|
||||
<span *ngIf="importable">
|
||||
<ds-importable-list-item-control [object]="object"
|
||||
[importConfig]="importConfig"
|
||||
(importObject)="importObject.emit($event)"></ds-importable-list-item-control>
|
||||
</span>
|
||||
<ds-listable-object-component-loader [object]="object" [viewMode]="viewMode" [index]="i" [context]="context" [linkType]="linkType"
|
||||
<li *ngFor="let object of objects?.payload?.page; let i = index; let last = last" class="mt-4 mb-4 d-flex" [class.border-bottom]="hasBorder && !last">
|
||||
<ds-selectable-list-item-control *ngIf="selectable" [index]="i"
|
||||
[object]="object"
|
||||
[selectionConfig]="selectionConfig"
|
||||
(deselectObject)="deselectObject.emit($event)"
|
||||
(selectObject)="selectObject.emit($event)"></ds-selectable-list-item-control>
|
||||
<ds-importable-list-item-control *ngIf="importable" [object]="object"
|
||||
[importConfig]="importConfig"
|
||||
(importObject)="importObject.emit($event)"></ds-importable-list-item-control>
|
||||
<ds-listable-object-component-loader [object]="object" [viewMode]="viewMode" [index]="i" [context]="context" [linkType]="linkType"
|
||||
[listID]="selectionConfig?.listId"></ds-listable-object-component-loader>
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -2952,7 +2952,7 @@
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.added": "Successfully added local entry to the selection",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-button-title.Author": "Import remote author",
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-button-title.isAuthorOfPublication": "Import remote author",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal": "Import remote journal",
|
||||
|
||||
@@ -2960,11 +2960,11 @@
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal Volume": "Import remote journal volume",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.Author.title": "Import Remote Author",
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.isAuthorOfPublication.title": "Import Remote Author",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.Author.added.local-entity": "Successfully added local author to the selection",
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.isAuthorOfPublication.added.local-entity": "Successfully added local author to the selection",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.Author.added.new-entity": "Successfully imported and added external author to the selection",
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.isAuthorOfPublication.added.new-entity": "Successfully imported and added external author to the selection",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.authority": "Authority",
|
||||
|
||||
@@ -2986,6 +2986,10 @@
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.head.sherpaPublisher": "Importing from Sherpa Publisher",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.head.pubmed": "Importing from PubMed",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.head.arxiv": "Importing from arXiv",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.import": "Import",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.external-source.import-modal.Journal.title": "Import Remote Journal",
|
||||
@@ -3040,6 +3044,10 @@
|
||||
|
||||
"submission.sections.describe.relationship-lookup.search-tab.tab-title.lcname": "LC Names ({{ count }})",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.search-tab.tab-title.pubmed": "PubMed ({{ count }})",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.search-tab.tab-title.arxiv": "arXiv ({{ count }})",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.search-tab.tab-title.isFundingAgencyOfPublication": "Search for Funding Agencies",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.search-tab.tab-title.isFundingOfPublication": "Search for Funding",
|
||||
@@ -3094,6 +3102,8 @@
|
||||
|
||||
"submission.sections.describe.relationship-lookup.selection-tab.title.pubmed": "Search Results",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.selection-tab.title.arxiv": "Search Results",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.name-variant.notification.content": "Would you like to save \"{{ value }}\" as a name variant for this person so you and others can reuse it for future submissions? If you don\'t you can still use it for this submission.",
|
||||
|
||||
"submission.sections.describe.relationship-lookup.name-variant.notification.confirm": "Save a new name variant",
|
||||
|
Reference in New Issue
Block a user