Skip to content

Commit

Permalink
Merge pull request DSpace#2373 from alexandrevryghem/w2p-102415_Remot…
Browse files Browse the repository at this point in the history
…e-lookup-entity-on-admin-edit_contribute-main

Added support to import from external source on Edit Item > Relationships
  • Loading branch information
tdonohue authored Feb 9, 2024
2 parents 44e84f8 + 7f842f1 commit cb7c2c9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import { RemoteDataBuildService } from '../../../../../core/cache/builders/remot
import { getAllSucceededRemoteDataPayload } from '../../../../../core/shared/operators';
import { followLink } from '../../../../utils/follow-link-config.model';
import { RelationshipType } from '../../../../../core/shared/item-relationships/relationship-type.model';
import { FindListOptions } from '../../../../../core/data/find-list-options.model';
import { RequestParam } from '../../../../../core/cache/models/request-param.model';
import { getFirstSucceededRemoteDataPayload } from '../../../../../core/shared/operators';
import { PaginatedList } from '../../../../../core/data/paginated-list.model';

@Component({
selector: 'ds-dynamic-lookup-relation-modal',
Expand Down Expand Up @@ -173,6 +177,7 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy
if (!!this.currentItemIsLeftItem$) {
this.currentItemIsLeftItem$.subscribe((isLeft) => {
this.isLeft = isLeft;
this.label = this.relationshipType.leftwardType;
});
}

Expand Down Expand Up @@ -201,6 +206,19 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy
).pipe(
getAllSucceededRemoteDataPayload()
);
} else {
const findListOptions = Object.assign({}, new FindListOptions(), {
elementsPerPage: 5,
currentPage: 1,
searchParams: [
new RequestParam('entityType', this.relationshipOptions.relationshipType)
]
});
this.externalSourcesRD$ = this.externalSourceService.searchBy('findByEntityType', findListOptions,
true, true, followLink('entityTypes'))
.pipe(getFirstSucceededRemoteDataPayload(), map((r: PaginatedList<ExternalSource>) => {
return r.page;
}));
}

this.setTotals();
Expand Down
22 changes: 22 additions & 0 deletions src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2766,6 +2766,8 @@

"journalissue.page.titleprefix": "Journal Issue: ",

"journalissue.search.results.head": "Journal Issue Search Results",

"journalvolume.listelement.badge": "Journal Volume",

"journalvolume.page.description": "Description",
Expand All @@ -2778,6 +2780,8 @@

"journalvolume.page.volume": "Volume",

"journalvolume.search.results.head": "Journal Volume Search Results",

"iiifsearchable.listelement.badge": "Document Media",

"iiifsearchable.page.titleprefix": "Document: ",
Expand Down Expand Up @@ -3686,10 +3690,14 @@

"relationships.isIssueOf": "Journal Issues",

"relationships.isIssueOf.JournalIssue": "Journal Issue",

"relationships.isJournalIssueOf": "Journal Issue",

"relationships.isJournalOf": "Journals",

"relationships.isJournalVolumeOf": "Journal Volume",

"relationships.isOrgUnitOf": "Organizational Units",

"relationships.isPersonOf": "Authors",
Expand All @@ -3706,6 +3714,8 @@

"relationships.isVolumeOf": "Journal Volumes",

"relationships.isVolumeOf.JournalVolume": "Journal Volume",

"relationships.isContributorOf": "Contributors",

"relationships.isContributorOf.OrgUnit": "Contributor (Organizational Unit)",
Expand Down Expand Up @@ -4436,6 +4446,16 @@

"submission.sections.describe.relationship-lookup.search-tab.tab-title.arxiv": "arXiv ({{ count }})",

"submission.sections.describe.relationship-lookup.search-tab.tab-title.orcidWorks": "ORCID ({{ count }})",

"submission.sections.describe.relationship-lookup.search-tab.tab-title.crossref": "CrossRef ({{ count }})",

"submission.sections.describe.relationship-lookup.search-tab.tab-title.scopus": "Scopus ({{ count }})",

"submission.sections.describe.relationship-lookup.search-tab.tab-title.openaireFunding": "Funding OpenAIRE ({{ count }})",

"submission.sections.describe.relationship-lookup.search-tab.tab-title.sherpaJournalIssn": "Sherpa Journals by ISSN ({{ 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",
Expand All @@ -4462,6 +4482,8 @@

"submission.sections.describe.relationship-lookup.selection-tab.tab-title": "Current Selection ({{ count }})",

"submission.sections.describe.relationship-lookup.title.Journal": "Journal",

"submission.sections.describe.relationship-lookup.title.isJournalIssueOfPublication": "Journal Issues",

"submission.sections.describe.relationship-lookup.title.JournalIssue": "Journal Issues",
Expand Down

0 comments on commit cb7c2c9

Please sign in to comment.