[Library|Trunk]
For connect search pages, replace community Id with customFilter git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56070 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
c30ccd8ce3
commit
f1a97a93a4
|
@ -24,7 +24,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[csvParams]="csvParams" csvPath="datasets" simpleSearchLink="/search/find/datasets"
|
||||
[disableForms]="disableForms"
|
||||
[loadPaging]="loadPaging"
|
||||
[oldTotalResults]="oldTotalResults" [(connectCommunityId)]=connectCommunityId [piwikSiteId]=piwikSiteId
|
||||
[oldTotalResults]="oldTotalResults" [piwikSiteId]=piwikSiteId
|
||||
searchFormClass="datasetsSearchForm"
|
||||
[(sort)]=sort >
|
||||
</advanced-search-page>
|
||||
|
@ -37,7 +37,6 @@ export class AdvancedSearchDatasetsComponent {
|
|||
private errorMessages: ErrorMessagesComponent;
|
||||
properties:EnvProperties;
|
||||
@Input() piwikSiteId = null;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
|
||||
public results =[];
|
||||
|
@ -101,7 +100,6 @@ export class AdvancedSearchDatasetsComponent {
|
|||
this.selectedFields =[];
|
||||
this.searchPage.selectedFields = this.selectedFields;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
this.searchPage.connectCommunityId = this.connectCommunityId;
|
||||
this.searchPage.customFilter = this.customFilter;
|
||||
this.searchPage.getSelectedFiltersFromUrl(params);
|
||||
this.getResults(this.searchPage.createQueryParameters(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
|
||||
|
|
|
@ -24,7 +24,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[csvParams]="csvParams" csvPath="other" simpleSearchLink="/search/find/other"
|
||||
[disableForms]="disableForms"
|
||||
[loadPaging]="loadPaging"
|
||||
[oldTotalResults]="oldTotalResults" [(connectCommunityId)]=connectCommunityId [piwikSiteId]=piwikSiteId
|
||||
[oldTotalResults]="oldTotalResults" [piwikSiteId]=piwikSiteId
|
||||
searchFormClass="orpsSearchForm"
|
||||
[(sort)]=sort >
|
||||
</advanced-search-page>
|
||||
|
@ -37,7 +37,6 @@ export class AdvancedSearchOrpsComponent {
|
|||
private errorMessages: ErrorMessagesComponent;
|
||||
properties:EnvProperties;
|
||||
@Input() piwikSiteId = null;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
|
||||
public results =[];
|
||||
|
@ -101,7 +100,6 @@ export class AdvancedSearchOrpsComponent {
|
|||
this.selectedFields =[];
|
||||
this.searchPage.selectedFields = this.selectedFields;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
this.searchPage.connectCommunityId = this.connectCommunityId;
|
||||
this.searchPage.customFilter = this.customFilter;
|
||||
this.searchPage.getSelectedFiltersFromUrl(params);
|
||||
this.getResults(this.searchPage.createQueryParameters(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
|
||||
|
|
|
@ -26,7 +26,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[loadPaging]="loadPaging"
|
||||
[oldTotalResults]="oldTotalResults"
|
||||
[(openaireLink)]=openaireLink
|
||||
[(connectCommunityId)]=connectCommunityId [piwikSiteId]=piwikSiteId
|
||||
[piwikSiteId]=piwikSiteId
|
||||
searchFormClass="publicationsSearchForm"
|
||||
[(sort)]=sort >
|
||||
</advanced-search-page>
|
||||
|
@ -52,7 +52,6 @@ export class AdvancedSearchPublicationsComponent {
|
|||
public loadPaging: boolean = true;
|
||||
public oldTotalResults: number = 0;
|
||||
@Input() openaireLink: string ;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
public pagingLimit: number = 0;
|
||||
public isPiwikEnabled;
|
||||
|
@ -105,7 +104,6 @@ export class AdvancedSearchPublicationsComponent {
|
|||
this.selectedFields =[];
|
||||
this.searchPage.selectedFields = this.selectedFields;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
this.searchPage.connectCommunityId = this.connectCommunityId;
|
||||
this.searchPage.customFilter = this.customFilter;
|
||||
this.searchPage.getSelectedFiltersFromUrl(params);
|
||||
this.getResults(this.searchPage.createQueryParameters(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
|
||||
|
|
|
@ -24,7 +24,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[csvParams]="csvParams" csvPath="software" simpleSearchLink="/search/find/software"
|
||||
[disableForms]="disableForms"
|
||||
[loadPaging]="loadPaging"
|
||||
[oldTotalResults]="oldTotalResults" [(connectCommunityId)]=connectCommunityId [piwikSiteId]=piwikSiteId
|
||||
[oldTotalResults]="oldTotalResults" [piwikSiteId]=piwikSiteId
|
||||
searchFormClass="softwareSearchForm"
|
||||
[(sort)]=sort >
|
||||
</advanced-search-page>
|
||||
|
@ -36,7 +36,6 @@ export class AdvancedSearchSoftwareComponent {
|
|||
private errorCodes: ErrorCodes;
|
||||
private errorMessages: ErrorMessagesComponent;
|
||||
@Input() piwikSiteId = null;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
public results =[];
|
||||
public filters =[];
|
||||
|
@ -101,7 +100,6 @@ export class AdvancedSearchSoftwareComponent {
|
|||
this.selectedFields =[];
|
||||
this.searchPage.selectedFields = this.selectedFields;
|
||||
this.searchPage.fieldIdsMap = this.fieldIdsMap;
|
||||
this.searchPage.connectCommunityId = this.connectCommunityId;
|
||||
this.searchPage.customFilter = this.customFilter;
|
||||
this.searchPage.getSelectedFiltersFromUrl(params);
|
||||
this.getResults(this.searchPage.createQueryParameters(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
|
||||
|
|
|
@ -155,7 +155,8 @@
|
|||
</search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='publications'" class ="uk-animation-fade" >
|
||||
<browse-entities [(properties)]=properties entityName="publication" baseUrl="/search/find/publications" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId [customFilter]="customFilter"></browse-entities>
|
||||
<browse-entities [(properties)]=properties entityName="publication"
|
||||
baseUrl="/search/find/publications" [refineFields]=searchFields.RESULT_REFINE_FIELDS [customFilter]="customFilter"></browse-entities>
|
||||
</div>
|
||||
<!--/li>
|
||||
<li-->
|
||||
|
@ -175,7 +176,7 @@
|
|||
</search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='research data'" class ="uk-animation-fade">
|
||||
<browse-entities [(properties)]=properties entityName="dataset" baseUrl="/search/find/datasets" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId [customFilter]="customFilter"></browse-entities>
|
||||
<browse-entities [(properties)]=properties entityName="dataset" baseUrl="/search/find/datasets" [refineFields]=searchFields.RESULT_REFINE_FIELDS [customFilter]="customFilter"></browse-entities>
|
||||
</div>
|
||||
<!--/li>
|
||||
<li-->
|
||||
|
@ -194,7 +195,7 @@
|
|||
</search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='software'" class ="uk-animation-fade">
|
||||
<browse-entities [(properties)]=properties entityName="software" baseUrl="/search/find/software" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId [customFilter]="customFilter"></browse-entities>
|
||||
<browse-entities [(properties)]=properties entityName="software" baseUrl="/search/find/software" [refineFields]=searchFields.RESULT_REFINE_FIELDS [customFilter]="customFilter"></browse-entities>
|
||||
</div>
|
||||
<!--/li>
|
||||
<li-->
|
||||
|
@ -213,7 +214,7 @@
|
|||
</search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='other research products'" class ="uk-animation-fade">
|
||||
<browse-entities [(properties)]=properties entityName="other" baseUrl="/search/find/other" [refineFields]=searchFields.RESULT_REFINE_FIELDS [connectCommunityId]=connectCommunityId [customFilter]="customFilter"></browse-entities>
|
||||
<browse-entities [(properties)]=properties entityName="other" baseUrl="/search/find/other" [refineFields]=searchFields.RESULT_REFINE_FIELDS [customFilter]="customFilter"></browse-entities>
|
||||
</div>
|
||||
<!--/li>
|
||||
<li-->
|
||||
|
|
|
@ -101,7 +101,6 @@ export class SearchComponent {
|
|||
properties: EnvProperties;
|
||||
@Input() logoURL;
|
||||
@Input() name;
|
||||
@Input() connectCommunityId =null;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
@Input() piwikSiteId = null;
|
||||
@Input() formPlaceholderText = "Search for research results, projects, content providers & organizations in OpenAIRE";
|
||||
|
@ -155,7 +154,7 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
|
|||
|
||||
|
||||
|
||||
this.config.getCommunityInformation(this.properties, (this.connectCommunityId)?this.connectCommunityId:this.properties.adminToolsCommunity ).subscribe(data => {
|
||||
this.config.getCommunityInformation(this.properties, (this.customFilter)?this.customFilter.valueId :this.properties.adminToolsCommunity ).subscribe(data => {
|
||||
var showEntity = {};
|
||||
for(var i=0; i< data['entities'].length; i++){
|
||||
|
||||
|
@ -168,7 +167,8 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
|
|||
this.showDataProviders = showEntity["datasource"];
|
||||
this.showSoftware = showEntity["software"];
|
||||
this.showOrps = showEntity["orp"];
|
||||
if(this.connectCommunityId){
|
||||
console.log(this.customFilter)
|
||||
if(this.customFilter && this.customFilter.queryFieldName=="communityId"){
|
||||
this.showProjects = false;
|
||||
this.showOrganizations = false;
|
||||
this.showDataProviders = false;
|
||||
|
@ -256,7 +256,7 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
|
|||
this.fetchPublications.searchUtils.status != this.errorCodes.NONE /*&&
|
||||
this.fetchPublications.searchUtils.status != this.errorCodes.ERROR*/) {
|
||||
this.reloadPublications = false;
|
||||
this.fetchPublications.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId, this.customFilter);
|
||||
this.fetchPublications.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.customFilter);
|
||||
this.linkToSearchPublications = this.properties.searchLinkToPublications;// + "?keyword=" + this.keyword;
|
||||
}
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
|
|||
this.fetchDatasets.searchUtils.status != this.errorCodes.NONE /*&&
|
||||
this.fetchDatasets.searchUtils.status != this.errorCodes.ERROR*/) {
|
||||
this.reloadDatasets = false;
|
||||
this.fetchDatasets.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId, this.customFilter);
|
||||
this.fetchDatasets.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.customFilter);
|
||||
this.linkToSearchDatasets =this.properties.searchLinkToDatasets;// + "?keyword=" + this.keyword;
|
||||
}
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
|
|||
( this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING ||
|
||||
this.fetchSoftware.searchUtils.status == this.errorCodes.DONE )*/) {
|
||||
this.reloadSoftware = false;
|
||||
this.fetchSoftware.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId, this.customFilter);
|
||||
this.fetchSoftware.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.customFilter);
|
||||
this.linkToSearchSoftware = this.properties.searchLinkToSoftware;// + "?keyword=" + this.keyword;
|
||||
}
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
|
|||
this.fetchOrps.searchUtils.status != this.errorCodes.NONE /*&&
|
||||
this.fetchOrps.searchUtils.status != this.errorCodes.ERROR*/) {
|
||||
this.reloadOrps = false;
|
||||
this.fetchOrps.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.connectCommunityId, this.customFilter);
|
||||
this.fetchOrps.getResultsByKeyword(this.keyword, 1, 10,this.properties, this.customFilter);
|
||||
this.linkToSearchOrps =this.properties.searchLinkToOrps;
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
|
|||
}
|
||||
|
||||
private count() {
|
||||
var refineParams = this.connectCommunityId?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((this.connectCommunityId )))):null;
|
||||
var refineParams = null;
|
||||
if(this.customFilter){
|
||||
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId )));
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ export class AdvancedSearchPageComponent {
|
|||
@Input() loadPaging: boolean = true;
|
||||
@Input() oldTotalResults: number = 0;
|
||||
@Input() openaireLink: string;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
@Input() sort: boolean = false;
|
||||
@Input() searchFormClass: string = "searchForm";
|
||||
|
@ -254,11 +253,6 @@ export class AdvancedSearchPageComponent {
|
|||
}
|
||||
}
|
||||
|
||||
//community
|
||||
if(this.connectCommunityId ){
|
||||
params += (countParams == 0 ? "" : " and " ) + "communityId exact "+'"' + this.connectCommunityId +'"' + " ";
|
||||
countParams++;
|
||||
}
|
||||
if(this.customFilter){
|
||||
params+= (countParams == 0 ? "" : " and " ) + this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId ));
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ export class BrowseEntitiesComponent {
|
|||
@Input() public entityName:string = "";
|
||||
@Input() public refineFields: string[] ;//= this.searchFields.RESULT_REFINE_FIELDS;
|
||||
@Input() properties:EnvProperties;
|
||||
@Input() connectCommunityId =null;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
|
||||
public sub: any;
|
||||
|
@ -74,7 +73,7 @@ export class BrowseEntitiesComponent {
|
|||
private getStats(){
|
||||
|
||||
this.status = this.errorCodes.LOADING;
|
||||
var refineParams = this.connectCommunityId?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((this.connectCommunityId )))):null;
|
||||
var refineParams = null;
|
||||
if(this.customFilter){
|
||||
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId )));
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ export class SearchFilterComponent {
|
|||
@Input() showResultCount:boolean = true;
|
||||
@Input() isDisabled:boolean = false;
|
||||
@Input() addShowMore:boolean = true;
|
||||
@Input() connectCommunityId:string
|
||||
public showAll:boolean = false;
|
||||
public _maxCharacters:number =28;
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
</div>
|
||||
<div class="uk-text-large">Filter By:</div>
|
||||
<search-filter *ngFor="let filter of filters " [addShowMore]=false [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" [(connectCommunityId)]=connectCommunityId></search-filter>
|
||||
<search-filter *ngFor="let filter of filters " [addShowMore]=false [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -139,7 +139,7 @@
|
|||
<search-download *ngIf= "!showUnknownFilters && searchUtils.totalResults > 0 && entityType != 'community'" class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
|
||||
</div>
|
||||
</div>
|
||||
<search-filter *ngFor="let filter of filters " [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" [(connectCommunityId)]=connectCommunityId></search-filter>
|
||||
<search-filter *ngFor="let filter of filters " [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>
|
||||
<helper position="left" before="false"></helper>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
|
|
@ -47,7 +47,6 @@ export class SearchPageComponent {
|
|||
@Input() tableView: boolean = false;
|
||||
@Input() searchFormClass: string = "searchForm";
|
||||
@Input() openaireLink: string;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
@Input() sort: boolean = false;
|
||||
@Input() mapUrl: string = "";
|
||||
|
@ -172,9 +171,6 @@ export class SearchPageComponent {
|
|||
}
|
||||
allFqs += fq;
|
||||
}
|
||||
}
|
||||
if(this.connectCommunityId ){
|
||||
allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((this.connectCommunityId )));
|
||||
}
|
||||
if(this.customFilter){
|
||||
allFqs+= "&fq="+StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId )));
|
||||
|
@ -226,9 +222,6 @@ export class SearchPageComponent {
|
|||
}
|
||||
|
||||
}
|
||||
if(this.connectCommunityId ){
|
||||
allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote(this.connectCommunityId ));
|
||||
}
|
||||
var keyword = params['keyword'];
|
||||
var doiQuery = "";
|
||||
var keywordQuery = "";
|
||||
|
@ -311,19 +304,7 @@ export class SearchPageComponent {
|
|||
filter.values = filteredValues;
|
||||
}
|
||||
}
|
||||
// else if(this.connectCommunityId && filter.filterId.indexOf("community")!=-1 ){
|
||||
// var filteredValues = [];
|
||||
// for(let filterValue of filter.values) {
|
||||
// if(this.connectCommunityId != filterValue.id){
|
||||
// filteredValues.push(filterValue);
|
||||
// }else{
|
||||
// filter.countSelectedValues-- ;
|
||||
// }
|
||||
// }
|
||||
// if(filteredValues.length > 0){
|
||||
// filter.values = filteredValues;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
return filters;
|
||||
|
@ -347,15 +328,12 @@ export class SearchPageComponent {
|
|||
|
||||
for (let filter of filters){
|
||||
var filterLimits="";
|
||||
if(filter.countSelectedValues > 0 ){//|| (this.connectCommunityId && filter.filterId.indexOf("community")!=-1)){
|
||||
if(filter.countSelectedValues > 0 ){
|
||||
for (let value of filter.values){
|
||||
if(value.selected == true){
|
||||
filterLimits+=((filterLimits.length == 0)?'':',') +'"'+ (value.id)+'"';
|
||||
}
|
||||
}
|
||||
// if(this.connectCommunityId && filter.filterId.indexOf("community")!=-1 ){
|
||||
// filterLimits+=((filterLimits.length == 0)?'':',') +'"'+ StringUtils.URIEncode(this.connectCommunityId)+'"';
|
||||
// }
|
||||
this.queryParameters.set(filter.filterId,filterLimits);
|
||||
if(filterLimits.length > 0){
|
||||
this.parameterNames.push(filter.filterId);
|
||||
|
@ -401,7 +379,7 @@ export class SearchPageComponent {
|
|||
private createSearchQueryParameters(filters:Filter[]){ // called by goTo, result emited to and used by search find pages
|
||||
var allFqs = "";
|
||||
for (let filter of filters){
|
||||
if(filter.countSelectedValues > 0 ){//|| (this.connectCommunityId && filter.filterId.indexOf("community")!=-1)){
|
||||
if(filter.countSelectedValues > 0 ){
|
||||
var fq = "";
|
||||
var count_selected=0;
|
||||
for (let value of filter.values){
|
||||
|
@ -410,18 +388,12 @@ export class SearchPageComponent {
|
|||
fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote((value.id));
|
||||
}
|
||||
}
|
||||
// if(this.connectCommunityId && filter.filterId.indexOf("community")!=-1){
|
||||
// count_selected++;
|
||||
// fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote(StringUtils.URIEncode(this.connectCommunityId));
|
||||
// }
|
||||
|
||||
fq="&fq="+StringUtils.URIEncode(fq);
|
||||
allFqs += fq;
|
||||
}
|
||||
}
|
||||
if(this.connectCommunityId ){
|
||||
allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote(this.connectCommunityId ));
|
||||
}
|
||||
//TODO --
|
||||
|
||||
var doiQuery = "";
|
||||
var keywordQuery = "";
|
||||
if((this.searchUtils.keyword && this.searchUtils.keyword.length > 0)){
|
||||
|
|
|
@ -30,7 +30,6 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[(openaireLink)]=openaireLink
|
||||
[(advancedSearchParameters)]=advancedSearchParameters
|
||||
[piwikSiteId]=piwikSiteId
|
||||
[(connectCommunityId)]=connectCommunityId
|
||||
[(sort)]=sort >
|
||||
</search-page>
|
||||
<!--[(sortBy)]="sortBy"-->
|
||||
|
@ -46,7 +45,6 @@ export class SearchDatasetsComponent {
|
|||
// public totalResults:number = 0 ;
|
||||
public baseUrl:string;
|
||||
@Input() openaireLink: string ;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
@Input() advancedSearchParameters ;
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
|
@ -109,7 +107,6 @@ properties: EnvProperties;
|
|||
this.searchUtils.sortBy = "";
|
||||
}
|
||||
|
||||
this.searchPage.connectCommunityId = this.connectCommunityId;
|
||||
this.searchPage.customFilter = this.customFilter;
|
||||
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
|
||||
|
|
|
@ -30,7 +30,6 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[(openaireLink)]=openaireLink
|
||||
[(advancedSearchParameters)]=advancedSearchParameters
|
||||
[piwikSiteId]=piwikSiteId
|
||||
[(connectCommunityId)]=connectCommunityId
|
||||
[(sort)]=sort >
|
||||
</search-page>
|
||||
`
|
||||
|
@ -44,7 +43,6 @@ export class SearchOrpsComponent {
|
|||
public filters: Filter[] =[];
|
||||
public baseUrl:string;
|
||||
@Input() openaireLink: string ;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
@Input() advancedSearchParameters ;
|
||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||
|
@ -106,7 +104,6 @@ properties: EnvProperties;
|
|||
this.searchUtils.sortBy = "";
|
||||
}
|
||||
|
||||
this.searchPage.connectCommunityId = this.connectCommunityId;
|
||||
this.searchPage.customFilter = this.customFilter;
|
||||
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
import {Component, Input, ViewChild} from '@angular/core';
|
||||
import { ActivatedRoute} from '@angular/router';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
|
||||
|
||||
import {SearchPublicationsService} from '../../services/searchPublications.service';
|
||||
import {SearchResult} from '../../utils/entities/searchResult';
|
||||
import {ErrorCodes} from '../../utils/properties/errorCodes';
|
||||
import {ErrorMessagesComponent} from '../../utils/errorMessages.component';
|
||||
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
|
||||
import {SearchPageComponent } from '../searchUtils/searchPage.component';
|
||||
import {SearchFields} from '../../utils/properties/searchFields';
|
||||
import {SearchPageComponent} from '../searchUtils/searchPage.component';
|
||||
import {SearchCustomFilter, SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
||||
import {DOI} from '../../utils/string-utils.class';
|
||||
import{EnvProperties} from '../../utils/properties/env-properties';
|
||||
import {EnvProperties} from '../../utils/properties/env-properties';
|
||||
|
||||
@Component({
|
||||
selector: 'search-publications',
|
||||
|
@ -33,7 +30,6 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[(openaireLink)]=openaireLink
|
||||
[(advancedSearchParameters)]=advancedSearchParameters
|
||||
[piwikSiteId]=piwikSiteId
|
||||
[(connectCommunityId)]=connectCommunityId
|
||||
[(sort)]=sort >
|
||||
</search-page>
|
||||
|
||||
|
@ -69,7 +65,6 @@ export class SearchPublicationsComponent {
|
|||
public loadPaging: boolean = true;
|
||||
public oldTotalResults: number = 0;
|
||||
@Input() openaireLink: string;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
@Input() advancedSearchParameters ;
|
||||
pagingLimit = 0;
|
||||
|
@ -118,7 +113,6 @@ properties: EnvProperties;
|
|||
this.searchUtils.sortBy = "";
|
||||
}
|
||||
|
||||
this.searchPage.connectCommunityId = this.connectCommunityId;
|
||||
this.searchPage.customFilter = this.customFilter;
|
||||
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
|
||||
|
|
|
@ -27,10 +27,9 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
[loadPaging]="loadPaging"
|
||||
[oldTotalResults]="oldTotalResults"
|
||||
searchFormClass="softwareSearchForm"
|
||||
[(openaireLink)]=openaireLinks
|
||||
[(openaireLink)]=openaireLink
|
||||
[(advancedSearchParameters)]=advancedSearchParameters
|
||||
[piwikSiteId]=piwikSiteId
|
||||
[(connectCommunityId)]=connectCommunityId
|
||||
[(sort)]=sort >
|
||||
</search-page>
|
||||
`
|
||||
|
@ -40,7 +39,6 @@ export class SearchSoftwareComponent {
|
|||
private errorCodes: ErrorCodes;
|
||||
private errorMessages: ErrorMessagesComponent;
|
||||
@Input() openaireLink: string ;
|
||||
@Input() connectCommunityId: string;
|
||||
@Input() customFilter:SearchCustomFilter= null;
|
||||
@Input() advancedSearchParameters ;
|
||||
@Input() piwikSiteId = null;
|
||||
|
@ -108,7 +106,6 @@ properties: EnvProperties;
|
|||
this.searchUtils.sortBy = "";
|
||||
}
|
||||
|
||||
this.searchPage.connectCommunityId = this.connectCommunityId;
|
||||
this.searchPage.customFilter = this.customFilter;
|
||||
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
|
||||
|
|
|
@ -40,7 +40,7 @@ export class FetchDatasets{
|
|||
}
|
||||
|
||||
|
||||
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null, customFilter:SearchCustomFilter=null){
|
||||
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, customFilter:SearchCustomFilter=null){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
var DOIs:string[] = DOI.getDOIsFromString(keyword);
|
||||
|
@ -58,7 +58,7 @@ export class FetchDatasets{
|
|||
|
||||
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
var refineParams = (connectCommunityId)?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((connectCommunityId )))):null;
|
||||
var refineParams = null;
|
||||
if(customFilter){
|
||||
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(customFilter.queryFieldName + " exact " + StringUtils.quote((customFilter.valueId )));
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ export class FetchOrps{
|
|||
}
|
||||
|
||||
|
||||
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null, customFilter:SearchCustomFilter=null){
|
||||
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, customFilter:SearchCustomFilter=null){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
var DOIs:string[] = DOI.getDOIsFromString(keyword);
|
||||
|
@ -58,7 +58,7 @@ export class FetchOrps{
|
|||
}
|
||||
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
var refineParams = (connectCommunityId)?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((connectCommunityId )))):null;
|
||||
var refineParams = null;
|
||||
if(customFilter){
|
||||
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(customFilter.queryFieldName + " exact " + StringUtils.quote((customFilter.valueId )));
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ export class FetchPublications {
|
|||
}
|
||||
}
|
||||
|
||||
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null, customFilter:SearchCustomFilter=null){
|
||||
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, customFilter:SearchCustomFilter=null){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
var DOIs:string[] = DOI.getDOIsFromString(keyword);
|
||||
|
@ -71,7 +71,7 @@ export class FetchPublications {
|
|||
|
||||
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
var refineParams = (connectCommunityId)?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((connectCommunityId )))):null;
|
||||
var refineParams = null;
|
||||
if(customFilter){
|
||||
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(customFilter.queryFieldName + " exact " + StringUtils.quote((customFilter.valueId )));
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ export class FetchSoftware{
|
|||
}
|
||||
|
||||
|
||||
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, connectCommunityId=null, customFilter:SearchCustomFilter=null){
|
||||
public getResultsByKeyword(keyword:string, page: number, size: number, properties:EnvProperties, customFilter:SearchCustomFilter=null){
|
||||
var parameters = "";
|
||||
if(keyword.length > 0){
|
||||
var DOIs:string[] = DOI.getDOIsFromString(keyword);
|
||||
|
@ -59,7 +59,7 @@ export class FetchSoftware{
|
|||
|
||||
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
var refineParams = (connectCommunityId)?("&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((connectCommunityId )))):null;
|
||||
var refineParams = null;
|
||||
if(customFilter){
|
||||
refineParams = (refineParams?(refineParams+'&'):'')+"&fq="+StringUtils.URIEncode(customFilter.queryFieldName + " exact " + StringUtils.quote((customFilter.valueId )));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue