[CST-4510] Remove check for entity type param in the import from external source page

This commit is contained in:
Giuseppe Digilio
2021-10-13 09:22:55 +02:00
parent 363e9b2dcb
commit 36be741eb3
3 changed files with 3 additions and 11 deletions

View File

@@ -3,7 +3,6 @@
<div class="col-md-12">
<h2 id="header" class="pb-2">{{'submission.import-external.title' + ((label) ? '.' + label : '') | translate}}</h2>
<ds-submission-import-external-searchbar
*ngIf="reload$.value.entity"
[initExternalSourceData]="reload$.value"
(externalSourceData) = "getExternalSourceData($event)">
</ds-submission-import-external-searchbar>
@@ -36,13 +35,7 @@
</ds-alert>
</div>
</div>
<div class="row" *ngIf="!reload$.value.entity">
<div class="col-md-12">
<ds-alert [type]="'alert-warning'">
<p class="lead mb-0">{{'submission.import-external.page.noentity' | translate}}</p>
</ds-alert>
</div>
</div>
<div class="row">
<div class="col-md-12">
<hr>

View File

@@ -20,6 +20,7 @@ import { fadeIn } from '../../shared/animations/fade';
import { PageInfo } from '../../core/shared/page-info.model';
import { hasValue, isNotEmpty } from '../../shared/empty.util';
import { getFinishedRemoteData } from '../../core/shared/operators';
import { NONE_ENTITY_TYPE } from '../../core/shared/item-relationships/item-type.resource-type';
/**
* This component allows to submit a new workspaceitem importing the data from an external source.
@@ -127,7 +128,7 @@ export class SubmissionImportExternalComponent implements OnInit, OnDestroy {
]).pipe(
take(1)
).subscribe(([entity, sourceId, query]: [string, string, string]) => {
this.reload$.next({entity: entity, query: query, sourceId: sourceId});
this.reload$.next({entity: entity || NONE_ENTITY_TYPE, query: query, sourceId: sourceId});
this.selectLabel(entity);
this.retrieveExternalSources();
}));

View File

@@ -3246,8 +3246,6 @@
"submission.import-external.page.hint": "Enter a query above to find items from the web to import in to DSpace.",
"submission.import-external.page.noentity": "An entity type must be selected in order to use this page. Select it using the 'Import metadata from an external source' button in 'MyDspace' page.",
"submission.import-external.back-to-my-dspace": "Back to MyDSpace",
"submission.import-external.search.placeholder": "Search the external source",