[Library | Trunk]
Search: 1. advanced link in home and /search/find 2. DOI issue in /search/find/ 3. update of numbers in tabs when there is an error in /search/find/ 4. order of filters in search outcomes 5. In Landingpages: rename "Publication Summary" --> "Summary" kai "Related outcomes" --> "Related research" Linking: get communities but not hidden ones git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59003 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8cbb28284c
commit
1b576e5a40
|
@ -18,7 +18,7 @@ export class ContextsService {
|
||||||
public getPublicCommunities( apiUrl:string):any {
|
public getPublicCommunities( apiUrl:string):any {
|
||||||
let url = apiUrl + 's/';
|
let url = apiUrl + 's/';
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
.pipe(map(res => this.parseCommunities(res, true) ));
|
.pipe(map(res => this.parseCommunities(res, false) ));
|
||||||
}
|
}
|
||||||
parseCommunities(data, getall){
|
parseCommunities(data, getall){
|
||||||
var communities = [];
|
var communities = [];
|
||||||
|
|
|
@ -591,7 +591,7 @@
|
||||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||||
<!-- [class]="(firstTab === 'summary')?'uk-active':''">-->
|
<!-- [class]="(firstTab === 'summary')?'uk-active':''">-->
|
||||||
<my-tab
|
<my-tab
|
||||||
[tabTitle]="'Project Summary'" [tabId]="'summary'"
|
tabTitle="Summary" [tabId]="'summary'"
|
||||||
class="uk-active">
|
class="uk-active">
|
||||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||||
</my-tab>
|
</my-tab>
|
||||||
|
@ -637,7 +637,7 @@
|
||||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||||
<!-- [class]="(firstTab === 'summary')?'uk-active':''"-->
|
<!-- [class]="(firstTab === 'summary')?'uk-active':''"-->
|
||||||
<my-tab
|
<my-tab
|
||||||
[tabTitle]="'Project Summary'" [tabId]="'summary'"
|
tabTitle="Summary" [tabId]="'summary'"
|
||||||
class="uk-active">
|
class="uk-active">
|
||||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||||
</my-tab>
|
</my-tab>
|
||||||
|
@ -750,4 +750,4 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<modal-loading></modal-loading>
|
<modal-loading></modal-loading>
|
||||||
<modal-alert #AlertModalCsvError></modal-alert>
|
<modal-alert #AlertModalCsvError></modal-alert>
|
||||||
|
|
|
@ -314,7 +314,7 @@
|
||||||
<div
|
<div
|
||||||
*ngIf="resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0"
|
*ngIf="resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0"
|
||||||
class="uk-margin-bottom">
|
class="uk-margin-bottom">
|
||||||
<h5>Related Outcomes</h5>
|
<h5>Related research</h5>
|
||||||
<no-load-paging *ngIf="resultLandingInfo.relatedResearchResults.length > pageSize"
|
<no-load-paging *ngIf="resultLandingInfo.relatedResearchResults.length > pageSize"
|
||||||
[type]="'research outcomes'"
|
[type]="'research outcomes'"
|
||||||
(pageChange)="updateRelatedPage($event)"
|
(pageChange)="updateRelatedPage($event)"
|
||||||
|
@ -399,7 +399,7 @@
|
||||||
<my-tabs>
|
<my-tabs>
|
||||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||||
<!-- [class]="(activeTab === 'summary')?'uk-active':''"-->
|
<!-- [class]="(activeTab === 'summary')?'uk-active':''"-->
|
||||||
<my-tab [tabTitle]="getTypeName() + ' Summary'"
|
<my-tab tabTitle="Summary"
|
||||||
[tabId]="'summary'" class="uk-active">
|
[tabId]="'summary'" class="uk-active">
|
||||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||||
</my-tab>
|
</my-tab>
|
||||||
|
@ -419,7 +419,7 @@
|
||||||
<!-- [class]="(activeTab === 'related')?'uk-active':''"-->
|
<!-- [class]="(activeTab === 'related')?'uk-active':''"-->
|
||||||
<my-tab *ngIf="(resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0) ||
|
<my-tab *ngIf="(resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0) ||
|
||||||
(resultLandingInfo.similarResearchResults && resultLandingInfo.similarResearchResults.length > 0)"
|
(resultLandingInfo.similarResearchResults && resultLandingInfo.similarResearchResults.length > 0)"
|
||||||
[tabTitle]="'Related outcomes'" [tabId]="'related'"
|
[tabTitle]="'Related research'" [tabId]="'related'"
|
||||||
[tabNumber]="relatedResultsNum">
|
[tabNumber]="relatedResultsNum">
|
||||||
<ng-container *ngTemplateOutlet="related_tab;"></ng-container>
|
<ng-container *ngTemplateOutlet="related_tab;"></ng-container>
|
||||||
</my-tab>
|
</my-tab>
|
||||||
|
@ -432,7 +432,7 @@
|
||||||
<my-small-tabs>
|
<my-small-tabs>
|
||||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||||
<!-- [class]="(activeTab === 'summary')?'uk-active':''"-->
|
<!-- [class]="(activeTab === 'summary')?'uk-active':''"-->
|
||||||
<my-tab [tabTitle]="getTypeName() + ' Summary'"
|
<my-tab tabTitle="Summary"
|
||||||
[tabId]="'summary'" class="uk-active">
|
[tabId]="'summary'" class="uk-active">
|
||||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||||
</my-tab>
|
</my-tab>
|
||||||
|
@ -452,7 +452,7 @@
|
||||||
<!-- [class]="(activeTab === 'related')?'uk-active':''"-->
|
<!-- [class]="(activeTab === 'related')?'uk-active':''"-->
|
||||||
<my-tab *ngIf="(resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0) ||
|
<my-tab *ngIf="(resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0) ||
|
||||||
(resultLandingInfo.similarResearchResults && resultLandingInfo.similarResearchResults.length > 0)"
|
(resultLandingInfo.similarResearchResults && resultLandingInfo.similarResearchResults.length > 0)"
|
||||||
[tabTitle]="'Related outcomes'" [tabId]="'related'"
|
[tabTitle]="'Related research'" [tabId]="'related'"
|
||||||
[tabNumber]="relatedResultsNum">
|
[tabNumber]="relatedResultsNum">
|
||||||
<ng-container *ngTemplateOutlet="related_tab;"></ng-container>
|
<ng-container *ngTemplateOutlet="related_tab;"></ng-container>
|
||||||
</my-tab>
|
</my-tab>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
[isDisabled]="disableForms"
|
[isDisabled]="disableForms"
|
||||||
[simpleView]="true" [formPlaceholderText]="formPlaceholderText"
|
[simpleView]="true" [formPlaceholderText]="formPlaceholderText"
|
||||||
|
|
||||||
[selectedFields]="selectedFields"
|
[selectedFields]="selectedFields" [showAdvancedSearchLink]="true"
|
||||||
[fieldIdsMap]="fieldIdsMap" [fieldIds]="fieldIds" [entitiesSelection]="true" [customFilter]="customFilter"
|
[fieldIdsMap]="fieldIdsMap" [fieldIds]="fieldIds" [entitiesSelection]="true" [customFilter]="customFilter"
|
||||||
>
|
>
|
||||||
</advanced-search-form>
|
</advanced-search-form>
|
||||||
|
@ -79,17 +79,17 @@
|
||||||
(searchPageUpdates)="activeEntityUpdate($event)" [showAdvancedSearchLink]="false"
|
(searchPageUpdates)="activeEntityUpdate($event)" [showAdvancedSearchLink]="false"
|
||||||
simpleSearchLink="/search/find"></search-research-results>
|
simpleSearchLink="/search/find"></search-research-results>
|
||||||
|
|
||||||
<search-projects *ngIf="activeEntity == 'projects'" [includeOnlyResultsAndFilter]="true"
|
<search-projects *ngIf="activeEntity == 'projects'" [includeOnlyResultsAndFilter]="true" [showAdvancedSearchLink]="false"
|
||||||
(searchPageUpdates)="activeEntityUpdate($event)"
|
(searchPageUpdates)="activeEntityUpdate($event)"
|
||||||
simpleSearchLink="/search/find">
|
simpleSearchLink="/search/find">
|
||||||
</search-projects>
|
</search-projects>
|
||||||
|
|
||||||
<search-organizations *ngIf="activeEntity == 'organizations'" [includeOnlyResultsAndFilter]="true"
|
<search-organizations *ngIf="activeEntity == 'organizations'" [includeOnlyResultsAndFilter]="true" [showAdvancedSearchLink]="false"
|
||||||
(searchPageUpdates)="activeEntityUpdate($event)"
|
(searchPageUpdates)="activeEntityUpdate($event)"
|
||||||
simpleSearchLink="/search/find">
|
simpleSearchLink="/search/find">
|
||||||
</search-organizations>
|
</search-organizations>
|
||||||
|
|
||||||
<search-dataproviders *ngIf="activeEntity == 'datasources'" [includeOnlyResultsAndFilter]="true"
|
<search-dataproviders *ngIf="activeEntity == 'datasources'" [includeOnlyResultsAndFilter]="true" [showAdvancedSearchLink]="false"
|
||||||
(searchPageUpdates)="activeEntityUpdate($event)"
|
(searchPageUpdates)="activeEntityUpdate($event)"
|
||||||
simpleSearchLink="/search/find">
|
simpleSearchLink="/search/find">
|
||||||
</search-dataproviders>
|
</search-dataproviders>
|
||||||
|
|
|
@ -409,6 +409,7 @@ export class SearchAllComponent {
|
||||||
//console.log(err);
|
//console.log(err);
|
||||||
this.handleError("Error getting number of Projects", err);
|
this.handleError("Error getting number of Projects", err);
|
||||||
this.fetchProjects.searchUtils.status = this.errorCodes.ERROR;
|
this.fetchProjects.searchUtils.status = this.errorCodes.ERROR;
|
||||||
|
this.fetchProjects.searchUtils.totalResults = null;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -428,6 +429,7 @@ export class SearchAllComponent {
|
||||||
//console.log(err);
|
//console.log(err);
|
||||||
this.handleError("Error getting number of Projects", err);
|
this.handleError("Error getting number of Projects", err);
|
||||||
this.fetchDataproviders.searchUtils.status = this.errorCodes.ERROR;
|
this.fetchDataproviders.searchUtils.status = this.errorCodes.ERROR;
|
||||||
|
this.fetchDataproviders.searchUtils.totalResults = null;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -447,6 +449,7 @@ export class SearchAllComponent {
|
||||||
//console.log(err);
|
//console.log(err);
|
||||||
this.handleError("Error getting number of Organizations", err);
|
this.handleError("Error getting number of Organizations", err);
|
||||||
this.fetchOrganizations.searchUtils.status = this.errorCodes.ERROR;
|
this.fetchOrganizations.searchUtils.status = this.errorCodes.ERROR;
|
||||||
|
this.fetchOrganizations.searchUtils.totalResults = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -467,6 +470,7 @@ export class SearchAllComponent {
|
||||||
err => {
|
err => {
|
||||||
this.handleError("Error getting number of research results", err);
|
this.handleError("Error getting number of research results", err);
|
||||||
fetchClass.searchUtils.status = this.errorCodes.ERROR;
|
fetchClass.searchUtils.status = this.errorCodes.ERROR;
|
||||||
|
fetchClass.searchUtils.totalResults = null;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -488,7 +492,8 @@ export class SearchAllComponent {
|
||||||
|
|
||||||
activeEntityUpdate($event) {
|
activeEntityUpdate($event) {
|
||||||
this.disableForms = $event.disableForms;
|
this.disableForms = $event.disableForms;
|
||||||
let updated = true;
|
let updated = true
|
||||||
|
console.debug($event)
|
||||||
if (this.activeEntity == "result") {
|
if (this.activeEntity == "result") {
|
||||||
if($event.searchUtils.status!=this.errorCodes.LOADING) {
|
if($event.searchUtils.status!=this.errorCodes.LOADING) {
|
||||||
this.fetchPublications.searchUtils.totalResults = $event.searchUtils.totalResults;
|
this.fetchPublications.searchUtils.totalResults = $event.searchUtils.totalResults;
|
||||||
|
|
|
@ -32,7 +32,7 @@ import {DatasourcesHelperClass} from "./searchUtils/datasourcesHelper.class";
|
||||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
||||||
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
||||||
[searchFormClass]="type!='deposit'?'datasourcesSearchForm':''"
|
[searchFormClass]="type!='deposit'?'datasourcesSearchForm':''"
|
||||||
[entitiesSelection]="type=='all'" [showAdvancedSearchLink]="type=='all'"
|
[entitiesSelection]="type=='all'" [showAdvancedSearchLink]="showAdvancedSearchLink"
|
||||||
[filters]="filters"
|
[filters]="filters"
|
||||||
[simpleView]="simpleView" formPlaceholderText="Search by name, description, subject..."
|
[simpleView]="simpleView" formPlaceholderText="Search by name, description, subject..."
|
||||||
[showResultCount]="(type=='all' || type == 'deposit')" [showLastIndex]="type!='deposit'"
|
[showResultCount]="(type=='all' || type == 'deposit')" [showLastIndex]="type!='deposit'"
|
||||||
|
@ -79,6 +79,7 @@ export class SearchDataProvidersComponent {
|
||||||
@Input() openaireLink: string;
|
@Input() openaireLink: string;
|
||||||
@Input() includeOnlyResultsAndFilter: boolean = false;
|
@Input() includeOnlyResultsAndFilter: boolean = false;
|
||||||
@Output() searchPageUpdates = new EventEmitter();
|
@Output() searchPageUpdates = new EventEmitter();
|
||||||
|
@Input() showAdvancedSearchLink:boolean;
|
||||||
constructor (private route: ActivatedRoute, private _searchDataProvidersService: SearchDataprovidersService ) {
|
constructor (private route: ActivatedRoute, private _searchDataProvidersService: SearchDataprovidersService ) {
|
||||||
this.results =[];
|
this.results =[];
|
||||||
this.errorCodes = new ErrorCodes();
|
this.errorCodes = new ErrorCodes();
|
||||||
|
@ -88,6 +89,9 @@ export class SearchDataProvidersComponent {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.refineFields = DatasourcesHelperClass.getrefineFields(this.type);
|
this.refineFields = DatasourcesHelperClass.getrefineFields(this.type);
|
||||||
this.pageTitle = DatasourcesHelperClass.getTitle(this.type);
|
this.pageTitle = DatasourcesHelperClass.getTitle(this.type);
|
||||||
|
if(this.showAdvancedSearchLink == null){
|
||||||
|
this.showAdvancedSearchLink = (this.type == "all");
|
||||||
|
}
|
||||||
this.route.data
|
this.route.data
|
||||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||||
this.properties= data.envSpecific;
|
this.properties= data.envSpecific;
|
||||||
|
|
|
@ -31,7 +31,7 @@ import {NewSearchPageComponent} from "./searchUtils/newSearchPage.component";
|
||||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
||||||
[sort]="false"
|
[sort]="false"
|
||||||
[filters]="filters"
|
[filters]="filters"
|
||||||
[simpleView]="simpleView" formPlaceholderText="Search by organization name..."
|
[simpleView]="simpleView" formPlaceholderText="Search by organization name..." [showAdvancedSearchLink]="showAdvancedSearchLink"
|
||||||
>
|
>
|
||||||
</new-search-page>
|
</new-search-page>
|
||||||
`
|
`
|
||||||
|
@ -67,7 +67,9 @@ export class SearchOrganizationsComponent {
|
||||||
@Input() openaireLink: string;
|
@Input() openaireLink: string;
|
||||||
@Input() includeOnlyResultsAndFilter: boolean = false;
|
@Input() includeOnlyResultsAndFilter: boolean = false;
|
||||||
@Output() searchPageUpdates = new EventEmitter();
|
@Output() searchPageUpdates = new EventEmitter();
|
||||||
public resourcesQuery = "(oaftype exact organization)";
|
@Input() showAdvancedSearchLink:boolean = true;
|
||||||
|
|
||||||
|
public resourcesQuery = "(oaftype exact organization)";
|
||||||
constructor (private route: ActivatedRoute, private _searchOrganizationsService: SearchOrganizationsService ) {
|
constructor (private route: ActivatedRoute, private _searchOrganizationsService: SearchOrganizationsService ) {
|
||||||
this.results =[];
|
this.results =[];
|
||||||
this.errorCodes = new ErrorCodes();
|
this.errorCodes = new ErrorCodes();
|
||||||
|
@ -187,7 +189,7 @@ public resourcesQuery = "(oaftype exact organization)";
|
||||||
//console.log(err);
|
//console.log(err);
|
||||||
this.handleError("Error getting organizations", err);
|
this.handleError("Error getting organizations", err);
|
||||||
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
||||||
|
this.searchUtils.totalResults = 0;
|
||||||
//TODO check erros (service not available, bad request)
|
//TODO check erros (service not available, bad request)
|
||||||
// if( ){
|
// if( ){
|
||||||
// this.searchUtils.status = errorCodes.ERROR;
|
// this.searchUtils.status = errorCodes.ERROR;
|
||||||
|
|
|
@ -31,7 +31,7 @@ import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class";
|
||||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
||||||
[filters]="filters"
|
[filters]="filters"
|
||||||
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
||||||
[simpleView]="simpleView" formPlaceholderText="Search by title, acronym, project code..."
|
[simpleView]="simpleView" formPlaceholderText="Search by title, acronym, project code..." [showAdvancedSearchLink]="showAdvancedSearchLink"
|
||||||
[sort]="false"
|
[sort]="false"
|
||||||
>
|
>
|
||||||
</new-search-page>
|
</new-search-page>
|
||||||
|
@ -73,6 +73,8 @@ export class SearchProjectsComponent {
|
||||||
@Input() openaireLink: string;
|
@Input() openaireLink: string;
|
||||||
@Input() includeOnlyResultsAndFilter: boolean = false;
|
@Input() includeOnlyResultsAndFilter: boolean = false;
|
||||||
@Output() searchPageUpdates = new EventEmitter();
|
@Output() searchPageUpdates = new EventEmitter();
|
||||||
|
@Input() showAdvancedSearchLink:boolean = true;
|
||||||
|
|
||||||
constructor (private route: ActivatedRoute, private _searchProjectsService: SearchProjectsService ) {
|
constructor (private route: ActivatedRoute, private _searchProjectsService: SearchProjectsService ) {
|
||||||
|
|
||||||
this.results =[];
|
this.results =[];
|
||||||
|
@ -193,7 +195,7 @@ export class SearchProjectsComponent {
|
||||||
//console.log(err);
|
//console.log(err);
|
||||||
this.handleError("Error getting projects", err);
|
this.handleError("Error getting projects", err);
|
||||||
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
||||||
|
this.searchUtils.totalResults = null;
|
||||||
//TODO check erros (service not available, bad request)
|
//TODO check erros (service not available, bad request)
|
||||||
// if( ){
|
// if( ){
|
||||||
// this.searchUtils.status = errorCodes.ERROR;
|
// this.searchUtils.status = errorCodes.ERROR;
|
||||||
|
|
|
@ -195,7 +195,7 @@ export class SearchResearchResultsComponent {
|
||||||
err => {
|
err => {
|
||||||
this.handleError("Error getting " + this.getEntityName(this.resultType, true, true), err);
|
this.handleError("Error getting " + this.getEntityName(this.resultType, true, true), err);
|
||||||
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
||||||
|
this.searchUtils.totalResults = null;
|
||||||
//TODO check erros (service not available, bad request)
|
//TODO check erros (service not available, bad request)
|
||||||
// if( ){
|
// if( ){
|
||||||
// this.searchUtils.status = ErrorCodes.ERROR;
|
// this.searchUtils.status = ErrorCodes.ERROR;
|
||||||
|
@ -212,6 +212,7 @@ export class SearchResearchResultsComponent {
|
||||||
|
|
||||||
//this.searchPage.closeLoading();
|
//this.searchPage.closeLoading();
|
||||||
this.disableForms = false;
|
this.disableForms = false;
|
||||||
|
|
||||||
this.searchPageUpdates.emit({disableForms: this.disableForms, searchUtils: this.searchUtils})
|
this.searchPageUpdates.emit({disableForms: this.disableForms, searchUtils: this.searchUtils})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,15 +160,34 @@
|
||||||
Search
|
Search
|
||||||
</button>
|
</button>
|
||||||
<div class="uk-margin-small-top" *ngIf="showAdvancedSearchLink">
|
<div class="uk-margin-small-top" *ngIf="showAdvancedSearchLink">
|
||||||
<a *ngIf ="this.entityType == this.selectedEntity && advancedSearchLink" routerLinkActive="router-link-active"
|
<a *ngIf ="this.entityType !='all' && this.entityType == this.selectedEntity && advancedSearchLink" routerLinkActive="router-link-active"
|
||||||
[routerLink]="advancedSearchLink" style="z-index:1;" [queryParams]="advancedSearchLinkParameters"
|
[routerLink]="advancedSearchLink" style="z-index:1;" [queryParams]="advancedSearchLinkParameters"
|
||||||
[class]="(isDisabled)?' uk-disabled uk-link-muted portal-link uk-margin-left ':' portal-link uk-margin-left '">Advanced search
|
[class]="(isDisabled)?' uk-disabled uk-link-muted portal-link uk-margin-left ':' portal-link uk-margin-left '">Advanced search
|
||||||
</a>
|
</a>
|
||||||
<a *ngIf ="this.entityType != this.selectedEntity && selectedEntityAdvancedUrl " routerLinkActive="router-link-active"
|
<a *ngIf =" this.entityType !='all' && this.entityType != this.selectedEntity && selectedEntityAdvancedUrl "
|
||||||
|
routerLinkActive="router-link-active"
|
||||||
[routerLink]="selectedEntityAdvancedUrl" style="z-index:1;"
|
[routerLink]="selectedEntityAdvancedUrl" style="z-index:1;"
|
||||||
[queryParams]="{q:this.selectedFields[0].value,op:'and'}"
|
[queryParams]="{q:this.selectedFields[0].value,op:'and'}"
|
||||||
[class]="(isDisabled)?' uk-disabled uk-link-muted portal-link uk-margin-left ':' portal-link uk-margin-left '">Advanced search
|
[class]="(isDisabled)?' uk-disabled uk-link-muted portal-link uk-margin-left ':' portal-link uk-margin-left '">Advanced search
|
||||||
</a>
|
</a>
|
||||||
|
<a *ngIf="this.entityType=='all'" class="portal-link uk-margin-left">Advanced Search</a>
|
||||||
|
<div *ngIf="this.entityType =='all'" uk-dropdown class="uk-dropdown default-dropdown">
|
||||||
|
<ul class="uk-list uk-margin-remove-bottom">
|
||||||
|
<li><a
|
||||||
|
[routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="advancedSearchLinkParameters"
|
||||||
|
>Research
|
||||||
|
outcomes</a></li>
|
||||||
|
<li><a
|
||||||
|
[routerLink]="properties.searchLinkToAdvancedProjects" [queryParams]="advancedSearchLinkParameters" >
|
||||||
|
Projects</a></li>
|
||||||
|
<li><a
|
||||||
|
[routerLink]="properties.searchLinkToAdvancedDataProviders" [queryParams]="advancedSearchLinkParameters">
|
||||||
|
Content providers</a></li>
|
||||||
|
<li><a
|
||||||
|
[routerLink]="properties.searchLinkToAdvancedOrganizations" [queryParams]="advancedSearchLinkParameters">
|
||||||
|
Organizations</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -84,11 +84,21 @@
|
||||||
</div>
|
</div>
|
||||||
<ul *ngIf="!showUnknownFilters"
|
<ul *ngIf="!showUnknownFilters"
|
||||||
[class]="'uk-list uk-list-divider' + (selectedRangeFilters == 0 && selectedFilters == 0 ? ' uk-margin-small-top' : '')">
|
[class]="'uk-list uk-list-divider' + (selectedRangeFilters == 0 && selectedFilters == 0 ? ' uk-margin-small-top' : '')">
|
||||||
<quick-selections *ngIf="resultTypes" [resultTypes]="resultTypes" (typeChange)="queryChanged()"
|
<ng-container *ngIf="filters.length > 0 && filters[0].values.length >0 && filters[0].filterId ==
|
||||||
|
'resultbestaccessright'">
|
||||||
|
<li>
|
||||||
|
<search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline"
|
||||||
|
[isDisabled]="disableForms" [filter]="filters[0]" [showResultCount]=showResultCount
|
||||||
|
(onFilterChange)="filterChanged($event)"></search-filter>
|
||||||
|
</li>
|
||||||
|
</ng-container>
|
||||||
|
<li *ngIf="resultTypes && (filters.length > 0)">
|
||||||
|
<quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()"
|
||||||
[isDisabled]="disableForms"
|
[isDisabled]="disableForms"
|
||||||
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
|
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
|
||||||
[properties]="properties" [vertical]="true" [delayTime]="0">
|
[properties]="properties" [vertical]="true" [delayTime]="0">
|
||||||
</quick-selections>
|
</quick-selections>
|
||||||
|
</li>
|
||||||
<ng-container *ngFor="let filter of rangeFilters">
|
<ng-container *ngFor="let filter of rangeFilters">
|
||||||
<li>
|
<li>
|
||||||
<range-filter [isDisabled]="disableForms" [filter]="filter"
|
<range-filter [isDisabled]="disableForms" [filter]="filter"
|
||||||
|
@ -96,7 +106,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngFor="let filter of filters ">
|
<ng-container *ngFor="let filter of filters ">
|
||||||
<li *ngIf="filter.values.length >0">
|
<li *ngIf="filter.values.length >0 && filter.filterId != 'resultbestaccessright'">
|
||||||
<search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline"
|
<search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline"
|
||||||
[isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount
|
[isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount
|
||||||
(onFilterChange)="filterChanged($event)"></search-filter>
|
(onFilterChange)="filterChanged($event)"></search-filter>
|
||||||
|
|
|
@ -737,9 +737,6 @@ export class NewSearchPageComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.customFilter) {
|
|
||||||
params += (countParams == 0 ? "" : " and ") + this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId));
|
|
||||||
}
|
|
||||||
// console.log("ParameterS:")
|
// console.log("ParameterS:")
|
||||||
// console.log(params)
|
// console.log(params)
|
||||||
return params;
|
return params;
|
||||||
|
@ -747,8 +744,8 @@ export class NewSearchPageComponent {
|
||||||
public static createKeywordQuery(entityType:string, value:string, id, operatorId, countParams=0){
|
public static createKeywordQuery(entityType:string, value:string, id, operatorId, countParams=0){
|
||||||
let params = "";
|
let params = "";
|
||||||
let doisParams = "";
|
let doisParams = "";
|
||||||
|
var DOIs: Identifier[] = Identifier.getIdentifiersFromString(value);
|
||||||
if ((entityType == 'publication' || entityType == 'dataset' || entityType == 'software' || entityType == 'other' || entityType == "result")) {
|
if ((entityType == 'publication' || entityType == 'dataset' || entityType == 'software' || entityType == 'other' || entityType == "result")) {
|
||||||
var DOIs: Identifier[] = Identifier.getIdentifiersFromString(value);
|
|
||||||
for (let identifier of DOIs) {
|
for (let identifier of DOIs) {
|
||||||
// console.log(identifier)
|
// console.log(identifier)
|
||||||
// pidclassid exact \"doi\" and pid exact \"10.1016/j.nima.2015.11.134\"
|
// pidclassid exact \"doi\" and pid exact \"10.1016/j.nima.2015.11.134\"
|
||||||
|
@ -763,7 +760,9 @@ export class NewSearchPageComponent {
|
||||||
if (doisParams.length > 0) {
|
if (doisParams.length > 0) {
|
||||||
params += "(" + this.createQuotedKeywordQuery(value, id, operatorId ,countParams,true, true) + " or " + doisParams+")";
|
params += "(" + this.createQuotedKeywordQuery(value, id, operatorId ,countParams,true, true) + " or " + doisParams+")";
|
||||||
} else {
|
} else {
|
||||||
params += this.createQuotedKeywordQuery(value, id, operatorId,countParams,true);
|
//if it is PIDs but no doisquery produced, forced to use quotes as the query will fail due to special characters
|
||||||
|
params += this.createQuotedKeywordQuery(value, id, operatorId,countParams,true,
|
||||||
|
(DOIs.length > 0 && doisParams.length == 0) );
|
||||||
}
|
}
|
||||||
return params;
|
return params;
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,14 @@ import {debounceTime} from "rxjs/operators";
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<form *ngIf="vertical && (resultTypes || quickFilter)" [formGroup]="control" class="uk-margin-small-bottom uk-list uk-list-divider">
|
<form *ngIf="vertical && (resultTypes || quickFilter)" [formGroup]="control" class="uk-margin-small-bottom uk-list uk-list-divider">
|
||||||
<li *ngIf="quickFilter" class="uk-margin-small-bottom ">
|
<!-- <li *ngIf="quickFilter" class="uk-margin-small-bottom ">
|
||||||
<div class="uk-margin-small-top uk-padding-remove-left uk-margin-right ">
|
<div class="uk-margin-small-top uk-padding-remove-left uk-margin-right ">
|
||||||
<h5 class="">{{quickFilter.value}}</h5>
|
<h5 class="">{{quickFilter.value}}</h5>
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
class="uk-margin-small-left" formControlName="QFselected" (change)="quickFilterChanged()">
|
class="uk-margin-small-left" formControlName="QFselected" (change)="quickFilterChanged()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>-->
|
||||||
<li *ngIf="resultTypes && showEntities" class="uk-margin-small-bottom ng-star-inserted">
|
<li *ngIf="resultTypes && showEntities" class="uk-margin-small-bottom ng-star-inserted">
|
||||||
<div class="uk-margin-small-top uk-margin-bottom uk-grid uk-flex uk-flex-bottom">
|
<div class="uk-margin-small-top uk-margin-bottom uk-grid uk-flex uk-flex-bottom">
|
||||||
<h5 class="uk-margin-bottom-remove" title="Community">Research Type ({{(this.showPublications + this.showDatasets + this.showSoftware + this.showOrp)}})</h5>
|
<h5 class="uk-margin-bottom-remove" title="Community">Research Type ({{(this.showPublications + this.showDatasets + this.showSoftware + this.showOrp)}})</h5>
|
||||||
|
|
|
@ -11,10 +11,10 @@ export class SearchFields {
|
||||||
|
|
||||||
// Remove Collected From Filter "collectedfrom","collectedfrom"
|
// Remove Collected From Filter "collectedfrom","collectedfrom"
|
||||||
public RESULT_REFINE_FIELDS = [
|
public RESULT_REFINE_FIELDS = [
|
||||||
"relfunder",
|
"resultbestaccessright", "relfunder",
|
||||||
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
||||||
"relproject",
|
"relproject",
|
||||||
"resultbestaccessright", "instancetypename", "resultlanguagename", "community", "resulthostingdatasource"];
|
"instancetypename", "resultlanguagename", "community", "resulthostingdatasource"];
|
||||||
|
|
||||||
public RESULT_ADVANCED_FIELDS: string[] = ["q", "resulttitle", "resultauthor", "authorid", "resultdescription", "resultsubject", "resultpublisher",
|
public RESULT_ADVANCED_FIELDS: string[] = ["q", "resulttitle", "resultauthor", "authorid", "resultdescription", "resultsubject", "resultpublisher",
|
||||||
"resultbestaccessright", "community", "collectedfromdatasourceid", "resulthostingdatasourceid", "resultdateofacceptance",
|
"resultbestaccessright", "community", "collectedfromdatasourceid", "resulthostingdatasourceid", "resultdateofacceptance",
|
||||||
|
|
Loading…
Reference in New Issue