[Aggregator | develop]: search.component.ts: Added in <search-all> input [openAccess]="false" | searchAll.component.ts: Added @Input() openAccess: boolean = true; and add "resultbestaccessright" parameter in queries if this is true | home.module.ts: Imported SearchInputModule | home.component: In search bar, remove 2 steps, go to search all page and add advanced search link.
This commit is contained in:
parent
110f07f7e3
commit
b61f42c532
|
@ -7,18 +7,25 @@
|
||||||
Discover open linked research<span class="uk-text-primary">.</span>
|
Discover open linked research<span class="uk-text-primary">.</span>
|
||||||
</h1>
|
</h1>
|
||||||
<numbers #numbersComponent [defaultInit]="false"></numbers>
|
<numbers #numbersComponent [defaultInit]="false"></numbers>
|
||||||
<div [class.uk-invisible]="disableSelect" class="uk-margin-medium-top uk-width-3-4@xl">
|
<div class="uk-margin-medium-top" style="max-width: 600px;" uk-scrollspy-class>
|
||||||
<advanced-search-input #advanced (searchEmitter)="goTo(true)">
|
<div class="uk-flex uk-flex-right uk-text-small">
|
||||||
<entities-selection [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"
|
<a [routerLink]="properties.searchLinkToAdvancedResults" class="uk-margin-small-bottom">
|
||||||
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"
|
Advanced search
|
||||||
[onChangeNavigate]="false" class="uk-width-2-5"></entities-selection>
|
</a>
|
||||||
<div class="uk-width-expand" input #input placeholder="Scholary works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
|
||||||
</advanced-search-input>
|
|
||||||
<div *ngIf="selectedEntity === 'result' && input.focused" (click)="$event.stopPropagation();advanced.focusNext(input, $event)" class="uk-dropdown uk-display-block uk-margin-small-top uk-width-auto">
|
|
||||||
<div class="uk-padding-small">
|
|
||||||
<quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div search-input [(value)]="keyword" [placeholder]="'Search in Explore'" (searchEmitter)="goTo(true)"
|
||||||
|
[searchInputClass]="'inner background'"></div>
|
||||||
|
<!-- <advanced-search-input #advanced (searchEmitter)="goTo(true)">-->
|
||||||
|
<!-- <entities-selection [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"-->
|
||||||
|
<!-- (selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"-->
|
||||||
|
<!-- [onChangeNavigate]="false" class="uk-width-2-5"></entities-selection>-->
|
||||||
|
<!-- <div class="uk-width-expand" input #input placeholder="Scholary works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>-->
|
||||||
|
<!-- </advanced-search-input>-->
|
||||||
|
<!-- <div *ngIf="selectedEntity === 'result' && input.focused" (click)="$event.stopPropagation();advanced.focusNext(input, $event)" class="uk-dropdown uk-display-block uk-margin-small-top uk-width-auto">-->
|
||||||
|
<!-- <div class="uk-padding-small">-->
|
||||||
|
<!-- <quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-padding-small uk-margin-small-top">
|
<div class="uk-padding-small uk-margin-small-top">
|
||||||
<div class="uk-text-meta">
|
<div class="uk-text-meta">
|
||||||
|
|
|
@ -189,32 +189,32 @@ export class HomeComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
goTo(simple: boolean) {
|
goTo(simple: boolean) {
|
||||||
let url = (simple) ? this.selectedEntitySimpleUrl : this.selectedEntityAdvancedUrl;
|
let url = this.properties.searchLinkToAll;
|
||||||
let parameterNames = [];
|
let parameterNames = [];
|
||||||
let parameterValues = [];
|
let parameterValues = [];
|
||||||
if (this.selectedEntity == "result") {
|
// if (this.selectedEntity == "result") {
|
||||||
if (this.resultTypes) {
|
// if (this.resultTypes) {
|
||||||
let values = [];
|
// let values = [];
|
||||||
for (let value of this.resultTypes.values) {
|
// for (let value of this.resultTypes.values) {
|
||||||
if (value.selected) {
|
// if (value.selected) {
|
||||||
values.push(value.id);
|
// values.push(value.id);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (values.length > 0 && values.length != 4) {
|
// if (values.length > 0 && values.length != 4) {
|
||||||
parameterNames.push("type");
|
// parameterNames.push("type");
|
||||||
parameterValues.push(values.join(","));
|
// parameterValues.push(values.join(","));
|
||||||
}
|
// }
|
||||||
if (this.resultsQuickFilter) {
|
// if (this.resultsQuickFilter) {
|
||||||
parameterNames.push("qf");
|
// parameterNames.push("qf");
|
||||||
parameterValues.push("" + this.resultsQuickFilter.selected);
|
// parameterValues.push("" + this.resultsQuickFilter.selected);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else if (this.selectedEntity == "all") {
|
// } else if (this.selectedEntity == "all") {
|
||||||
if (this.resultsQuickFilter) {
|
// if (this.resultsQuickFilter) {
|
||||||
parameterNames.push("qf");
|
// parameterNames.push("qf");
|
||||||
parameterValues.push("true");
|
// parameterValues.push("true");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (this.keyword.length > 0) {
|
if (this.keyword.length > 0) {
|
||||||
parameterNames.push("fv0");
|
parameterNames.push("fv0");
|
||||||
parameterValues.push(this.keyword);
|
parameterValues.push(this.keyword);
|
||||||
|
|
|
@ -28,6 +28,7 @@ import {book, cog, database, earth} from "../openaireLibrary/utils/icons/icons";
|
||||||
import {NumbersModule} from "../openaireLibrary/sharedComponents/numbers/numbers.module";
|
import {NumbersModule} from "../openaireLibrary/sharedComponents/numbers/numbers.module";
|
||||||
import {AdvancedSearchInputModule} from "../openaireLibrary/sharedComponents/advanced-search-input/advanced-search-input.module";
|
import {AdvancedSearchInputModule} from "../openaireLibrary/sharedComponents/advanced-search-input/advanced-search-input.module";
|
||||||
import {InputModule} from "../openaireLibrary/sharedComponents/input/input.module";
|
import {InputModule} from "../openaireLibrary/sharedComponents/input/input.module";
|
||||||
|
import {SearchInputModule} from "../openaireLibrary/sharedComponents/search-input/search-input.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -40,7 +41,7 @@ import {InputModule} from "../openaireLibrary/sharedComponents/input/input.modul
|
||||||
HomeRoutingModule,
|
HomeRoutingModule,
|
||||||
HelperModule,
|
HelperModule,
|
||||||
ErrorMessagesModule,
|
ErrorMessagesModule,
|
||||||
SEOServiceModule, EntitiesSelectionModule, QuickSelectionsModule, IconsModule, NumbersModule, AdvancedSearchInputModule, InputModule
|
SEOServiceModule, EntitiesSelectionModule, QuickSelectionsModule, IconsModule, NumbersModule, AdvancedSearchInputModule, InputModule, SearchInputModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
HomeComponent
|
HomeComponent
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 110c854523199f24143bb7d0e56e8815c6808319
|
Subproject commit 5f980c01bb4263b6d02d2f8c0c753395f54fe4a1
|
|
@ -9,7 +9,7 @@ import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearc
|
||||||
selector: 'openaire-search-find',
|
selector: 'openaire-search-find',
|
||||||
template: `
|
template: `
|
||||||
<search-all logoURL = "/assets/common-assets/logo-small-aggregator.png" name="OpenAIRE" [customFilter]="customFilter" [piwikSiteId]="piwikSiteId"
|
<search-all logoURL = "/assets/common-assets/logo-small-aggregator.png" name="OpenAIRE" [customFilter]="customFilter" [piwikSiteId]="piwikSiteId"
|
||||||
[searchForm]="searchForm"></search-all>
|
[searchForm]="searchForm" [openAccess]="false"></search-all>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
export class OpenaireSearchComponent{
|
export class OpenaireSearchComponent{
|
||||||
|
|
Loading…
Reference in New Issue