Skip to content

Commit

Permalink
Merged in DSC-1248 (pull request DSpace#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yevhenii-Lohatskyi authored and LucaGiamminonni committed Oct 11, 2023
2 parents 9080551 + c8a7e01 commit eba5a30
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ <h2 *ngIf="searchSection.displayTitle">{{ 'explore.search-section.' + sectionId

<div class="col-md-12 d-flex justify-content-center" *ngIf="searchSection.searchType === 'basic'">
<div class="col-md-8">
<ds-search-form *ngIf="searchSection.searchType === 'basic'" [inPlaceSearch]="false"
<ds-search-form *ngIf="searchSection.searchType === 'basic'"
[inPlaceSearch]="false"
[configuration]="searchSection.discoveryConfigurationName"
[searchPlaceholder]="'search.search-form.placeholder' | translate"> ></ds-search-form>
</div>
</div>
Expand Down
15 changes: 12 additions & 3 deletions src/app/shared/search-form/search-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ export class SearchFormComponent implements OnInit {
/**
* The currently selected scope object's UUID
*/
@Input()
scope = '';
@Input() scope = '';

/**
* Discovery configuration to be used in search
*/
@Input() configuration: string;

selectedScope: BehaviorSubject<DSpaceObject> = new BehaviorSubject<DSpaceObject>(undefined);

Expand Down Expand Up @@ -99,8 +103,13 @@ export class SearchFormComponent implements OnInit {
*/
onSubmit(data: any) {
if (isNotEmpty(this.scope)) {
data = Object.assign(data, { scope: this.scope });
data = { ...data, scope: this.scope };
}

if (isNotEmpty(this.configuration)) {
data = { ...data, configuration: this.configuration };
}

this.updateSearch(data);
this.submitSearch.emit(data);
}
Expand Down
4 changes: 4 additions & 0 deletions src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5097,6 +5097,8 @@

"search.filters.applied.charts.default.title": "Search Output",

"search.filters.applied.charts.site.title": "Search Output",

"search.filters.applied.charts.RELATION.Person.researchoutputs.title": "Research Output",

"search.filters.applied.charts.RELATION.Project.fundings.title": "Fundings",
Expand Down Expand Up @@ -5356,6 +5358,8 @@

"default.search.results.head": "Search Results",

"site.search.results.head": "Search Results",

"default-relationships.search.results.head": "Search Results",

"defaultConfiguration.search.results.head": "Search Results",
Expand Down

0 comments on commit eba5a30

Please sign in to comment.