From ea05af74bd05a45ebfc794e2b396c32aa09d2b58 Mon Sep 17 00:00:00 2001 From: Kristof De Langhe <kristof.delanghe@atmire.com> Date: Thu, 19 Dec 2019 17:34:13 +0100 Subject: [PATCH] 67611: Import external source entry window layout changes --- ...rnal-source-entry-import-modal.component.html | 16 +++++++++------- ...ternal-source-entry-import-modal.component.ts | 5 +++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.html index b88fea8e41..a4fc356ef9 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.html @@ -13,15 +13,17 @@ </div> <h4>{{ (labelPrefix + 'select' | translate) }}</h4> - <div id="external-source-entry-collection" class="mb-3"> - <div class="form-group"> - <label for="collection">{{ (labelPrefix + 'collection' | translate) }}</label> - <input type="text" class="form-control" id="collection" placeholder="Enter collection ID" [(ngModel)]="collectionId"> - </div> - </div> + <div id="external-source-entry-entities" class="mb-3"> <h5 class="font-weight-bold">{{ (labelPrefix + 'entities' | translate) }}</h5> + <div id="external-source-entry-collection" class="mb-3"> + <div class="form-group"> + <label for="collection">{{ (labelPrefix + 'collection' | translate) }}</label> + <input type="text" class="form-control" id="collection" placeholder="Enter collection ID" [(ngModel)]="collectionId"> + </div> + </div> + <ds-search-results *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length > 0" [searchResults]="(localEntitiesRD$ | async)" [sortConfig]="this.lookupRelationService.searchConfig?.sort" @@ -40,7 +42,7 @@ <label class="form-check-label" for="new-entity">{{ (labelPrefix + 'entities.new' | translate) }}</label> </div> </div> - <div id="external-source-entry-authority"> + <div id="external-source-entry-authority" *ngIf="authorityEnabled"> <h5 class="font-weight-bold">{{ (labelPrefix + 'authority' | translate) }}</h5> <div class="ml-4"> diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts index 8ca8305085..7e0fe78717 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts @@ -142,6 +142,11 @@ export class ExternalSourceEntryImportModalComponent implements OnInit { */ importedObject: EventEmitter<ListableObject> = new EventEmitter<ListableObject>(); + /** + * Should it display the ability to import the entry as an authority? + */ + authorityEnabled = false; + constructor(public modal: NgbActiveModal, public lookupRelationService: LookupRelationService, private selectService: SelectableListService, -- GitLab