67611: Fixed radio button bug + hide pagintion details

This commit is contained in:
Kristof De Langhe
2019-12-05 10:58:38 +01:00
parent 0210be1a53
commit 6ada3fae5b
12 changed files with 36 additions and 5 deletions

View File

@@ -16,10 +16,13 @@
<div id="external-source-entry-entities" class="mb-2">
<h5 class="font-weight-bold">{{ ('submission.sections.describe.relationship-lookup.external-source.import-modal.entities' | translate) }}</h5>
<ds-search-results [searchResults]="(localEntitiesRD$ | async)"
<ds-search-results *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length > 0"
[searchResults]="(localEntitiesRD$ | async)"
[sortConfig]="this.lookupRelationService.searchConfig?.sort"
[searchConfig]="this.lookupRelationService.searchConfig"
[selectable]="true"
[disableHeader]="true"
[hidePaginationDetail]="true"
[selectionConfig]="{ repeatable: false, listId: entityListId }"
[linkType]="linkTypes.ExternalLink"
[context]="context"

View File

@@ -94,7 +94,7 @@ export class ExternalSourceEntryImportModalComponent implements OnInit {
ngOnInit(): void {
this.uri = Metadata.first(this.externalSourceEntry.metadata, 'dc.identifier.uri');
this.searchOptions = Object.assign(new PaginatedSearchOptions({ query: this.externalSourceEntry.value }));
this.searchOptions = Object.assign(new PaginatedSearchOptions({ query: 'sarah' }));
this.localEntitiesRD$ = this.lookupRelationService.getLocalResults(this.relationship, this.searchOptions);
}
@@ -117,7 +117,9 @@ export class ExternalSourceEntryImportModalComponent implements OnInit {
* @param event
*/
deselectEntity(event) {
this.selectedImportType = ImportType.None;
if (this.selectedImportType === ImportType.LocalEntity) {
this.selectedImportType = ImportType.None;
}
}
/**

View File

@@ -5,6 +5,7 @@
[hideGear]="hideGear"
[linkType]="linkType"
[context]="context"
[hidePaginationDetail]="hidePaginationDetail"
(paginationChange)="onPaginationChange($event)"
(pageChange)="onPageChange($event)"
(pageSizeChange)="onPageSizeChange($event)"
@@ -23,6 +24,7 @@
[hideGear]="hideGear"
[linkType]="linkType"
[context]="context"
[hidePaginationDetail]="hidePaginationDetail"
(paginationChange)="onPaginationChange($event)"
(pageChange)="onPageChange($event)"
(pageSizeChange)="onPageSizeChange($event)"
@@ -37,6 +39,7 @@
[hideGear]="hideGear"
[linkType]="linkType"
[context]="context"
[hidePaginationDetail]="hidePaginationDetail"
*ngIf="(currentMode$ | async) === viewModeEnum.DetailedListElement">
</ds-object-detail>

View File

@@ -63,6 +63,11 @@ export class ObjectCollectionComponent implements OnInit {
*/
@Input() context: Context;
/**
* Option for hiding the pagination detail
*/
@Input() hidePaginationDetail = false;
/**
* the page info of the list
*/

View File

@@ -89,7 +89,7 @@ export class ObjectDetailComponent {
/**
* Option for hiding the pagination detail
*/
public hidePaginationDetail = true;
@Input() hidePaginationDetail = true;
/**
* An event fired when the page is changed.

View File

@@ -5,6 +5,7 @@
[sortOptions]="sortConfig"
[hideGear]="hideGear"
[hidePagerWhenSinglePage]="hidePagerWhenSinglePage"
[hidePaginationDetail]="hidePaginationDetail"
(pageChange)="onPageChange($event)"
(pageSizeChange)="onPageSizeChange($event)"
(sortDirectionChange)="onSortDirectionChange($event)"

View File

@@ -69,6 +69,11 @@ export class ObjectGridComponent implements OnInit {
*/
@Input() context: Context;
/**
* Option for hiding the pagination detail
*/
@Input() hidePaginationDetail = false;
/**
* Behavior subject to output the current listable objects
*/

View File

@@ -5,6 +5,7 @@
[sortOptions]="sortConfig"
[hideGear]="hideGear"
[hidePagerWhenSinglePage]="hidePagerWhenSinglePage"
[hidePaginationDetail]="hidePaginationDetail"
(pageChange)="onPageChange($event)"
(pageSizeChange)="onPageSizeChange($event)"
(sortDirectionChange)="onSortDirectionChange($event)"

View File

@@ -74,6 +74,11 @@ export class ObjectListComponent {
*/
@Input() context: Context;
/**
* Option for hiding the pagination detail
*/
@Input() hidePaginationDetail = false;
/**
* The current listable objects
*/

View File

@@ -1,5 +1,5 @@
<div *ngIf="currentPageState == undefined || currentPageState == currentPage">
<div class="pagination-masked clearfix top">
<div *ngIf="(!hidePaginationDetail && collectionSize > 0) || !hideGear" class="pagination-masked clearfix top">
<div class="row">
<div *ngIf="!hidePaginationDetail && collectionSize > 0" class="col-auto pagination-info">
<span class="align-middle hidden-xs-down">{{ 'pagination.showing.label' | translate }}</span>

View File

@@ -8,6 +8,7 @@
[selectable]="selectable"
[selectionConfig]="selectionConfig"
[context]="context"
[hidePaginationDetail]="hidePaginationDetail"
(deselectObject)="deselectObject.emit($event)"
(selectObject)="selectObject.emit($event)"
>

View File

@@ -67,6 +67,11 @@ export class SearchResultsComponent {
@Input() context: Context;
/**
* Option for hiding the pagination detail
*/
@Input() hidePaginationDetail = false;
@Input() selectionConfig: {repeatable: boolean, listId: string};
@Output() deselectObject: EventEmitter<ListableObject> = new EventEmitter<ListableObject>();