comment claim functionalities | tidy up navbar links | extra query for projects of an organization when requiring pubs report | remove href from home page tabs
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@46271 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
fb466c2fbb
commit
65fc6976ec
|
@ -106,7 +106,7 @@ export function gethtmlProjectReportModule() {
|
|||
return System.import('./landingPages/htmlProjectReport/htmlProjectReport.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'HtmlProjectReportModuleNgFactory' : 'HtmlProjectReportModule')]);
|
||||
}
|
||||
export function getMyClaimsModule() {
|
||||
/*export function getMyClaimsModule() {
|
||||
return System.import('./claims/myClaims/myClaims.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'MyClaimsModuleNgFactory' : 'MyClaimsModule')]);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ export function getLinkingModule() {
|
|||
export function getBulkLinkingModule() {
|
||||
return System.import('./claims/linking/bulkLinking.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'BulkLinkingModuleNgFactory' : 'BulkLinkingModule')]);
|
||||
}
|
||||
}*/
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
|
@ -153,16 +153,10 @@ export function getBulkLinkingModule() {
|
|||
{ path: 'search/advanced/projects', loadChildren: getAdvancedSearchProjectsModule },
|
||||
{ path: 'search/advanced/people', loadChildren: getAdvancedSearchPeopleModule },
|
||||
{ path: 'project-report', loadChildren: gethtmlProjectReportModule },
|
||||
{ path: 'myclaims', loadChildren: getMyClaimsModule },
|
||||
{ path: 'claims', loadChildren: getClaimsAdminModule },
|
||||
{ path: 'bulk-linking', loadChildren: getBulkLinkingModule },
|
||||
{ path: 'linking', loadChildren: getLinkingModule },
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// { path: 'myclaims', loadChildren: getMyClaimsModule },
|
||||
// { path: 'claims', loadChildren: getClaimsAdminModule },
|
||||
// { path: 'bulk-linking', loadChildren: getBulkLinkingModule },
|
||||
// { path: 'linking', loadChildren: getLinkingModule },
|
||||
])
|
||||
],
|
||||
})
|
||||
|
|
|
@ -38,7 +38,7 @@ import {OrganizationService} from '../services/organization.service';
|
|||
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
|
||||
<p>Please use the information/contacts shown below to deposit your {{requestFor}}.</p>
|
||||
<!--showDataProviders [dataProviders]=dataProviders></showDataProviders-->
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div>
|
||||
<search-result [(results)]="fetchDataproviders.results"
|
||||
[(status)]= "fetchDataproviders.searchUtils.status"
|
||||
type="dataprovider" urlParam="datasourceId">
|
||||
|
|
|
@ -121,17 +121,9 @@
|
|||
<addThis ></addThis>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li>
|
||||
<dl class="uk-description-list-line functionsSection">
|
||||
<dt> </dt>
|
||||
<dd>
|
||||
<altmetrics *ngIf="datasetInfo.identifiers != undefined && datasetInfo.identifiers.get('doi') != undefined"
|
||||
id="{{datasetInfo.identifiers.get('doi')[0]}}" type="doi">
|
||||
</altmetrics >
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<altmetrics *ngIf="datasetInfo.identifiers != undefined && datasetInfo.identifiers.get('doi') != undefined"
|
||||
id="{{datasetInfo.identifiers.get('doi')[0]}}" type="doi">
|
||||
</altmetrics >
|
||||
</li>
|
||||
<li *ngIf="datasetInfo.downloadFrom != undefined && datasetInfo.downloadFrom.size > 0">
|
||||
<dl class="uk-description-list-line functionsSection">
|
||||
|
@ -178,7 +170,7 @@
|
|||
</mark>
|
||||
</a>
|
||||
</dd>
|
||||
<dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','project'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to projects</a></dd>
|
||||
<!--dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','project'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to projects</a></dd-->
|
||||
</dl>
|
||||
|
||||
|
||||
|
@ -198,7 +190,7 @@
|
|||
<span *ngIf="item['labelConcept'] != null">: {{item['labelConcept']}}</span>
|
||||
</mark>
|
||||
</dd>
|
||||
<dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','context'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to contexts</a></dd>
|
||||
<!--dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','context'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to contexts</a></dd-->
|
||||
</dl>
|
||||
|
||||
</li>
|
||||
|
|
|
@ -157,21 +157,21 @@
|
|||
</dl>
|
||||
</li>
|
||||
|
||||
<ng-container *ngIf="organizationInfo.projects != undefined">
|
||||
<li *ngFor="let key of organizationInfo.projects.keys()">
|
||||
<ng-container *ngIf="searchingProjectsTabComponent && searchingProjectsTabComponent.fetchProjects.funders.length > 0">
|
||||
<li *ngFor="let funder of searchingProjectsTabComponent.fetchProjects.funders">
|
||||
<!--a href="{{downloadURLAPI}}resources?size={{organizationInfo.projects.get(key).length}}&{{csvProjectParamsHead}}{{organizationInfo.projects.get(key)[0]['funderId']}}{{csvParamsTail}}">
|
||||
Download projects report (CSV) for {{key}}
|
||||
</a-->
|
||||
<span class="clickable" (click)="downloadfile(downloadURLAPI+'resources?size='+organizationInfo.projects.get(key).length+'&'+csvProjectParamsHead+organizationInfo.projects.get(key)[0]['funderId']+csvParamsTail)">
|
||||
<span class="clickable" (click)="downloadfile(downloadURLAPI+'resources?size='+funder.number+'&'+csvProjectParamsHead+funder.id+csvParamsTail)">
|
||||
<span aria-hidden="true" class="glyphicon glyphicon-download"></span>
|
||||
<span class="uk-icon-download"> Projects report(CSV) for {{key}}</span>
|
||||
<span class="uk-icon-download"> Projects report(CSV) for {{funder.name}}</span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li *ngFor="let key of organizationInfo.projects.keys()">
|
||||
<span class="clickable" (click)="downloadPublicationsFile(key)">
|
||||
<li *ngFor="let funder of searchingProjectsTabComponent.fetchProjects.funders">
|
||||
<span class="clickable" (click)="downloadPublicationsFile(funder.name,funder.id, funder.number)">
|
||||
<span aria-hidden="true" class="glyphicon glyphicon-download"></span>
|
||||
<span class="uk-icon-download"> Publications report(CSV) for {{key}}</span>
|
||||
<span class="uk-icon-download"> Publications report(CSV) for {{funder.name}}</span>
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
|
|
|
@ -8,6 +8,7 @@ import {FetchDataproviders} from '../../utils/fetchEntitiesClasses/fetchDataprov
|
|||
import {SearchPublicationsService} from '../../services/searchPublications.service';
|
||||
|
||||
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
|
||||
import {SearchProjectsService} from '../../services/searchProjects.service';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import {SearchingProjectsTabComponent} from '../searchingProjectsInTab.component';
|
||||
|
@ -39,12 +40,14 @@ export class OrganizationComponent {
|
|||
private fetchDataproviders : FetchDataproviders;
|
||||
private linkToSearchDataproviders = "";
|
||||
@ViewChild (SearchingProjectsTabComponent) searchingProjectsTabComponent : SearchingProjectsTabComponent ;
|
||||
private projectFunders:string[] = [];
|
||||
|
||||
constructor (private _organizationService: OrganizationService,
|
||||
private route: ActivatedRoute,
|
||||
private _searchDataprovidersService: SearchDataprovidersService,
|
||||
private _reportsService: ReportsService,
|
||||
private _searchPublicationsService: SearchPublicationsService) {
|
||||
private _searchPublicationsService: SearchPublicationsService,
|
||||
private _searchProjectsService: SearchProjectsService) {
|
||||
|
||||
console.info('organization constructor');
|
||||
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
||||
|
@ -181,43 +184,85 @@ export class OrganizationComponent {
|
|||
() => console.log('Completed file download.'));
|
||||
}
|
||||
|
||||
downloadPublicationsFile(funder: string){
|
||||
downloadPublicationsFile(funder: string, funderId:string, count:number){
|
||||
console.log("Downloading publications file");
|
||||
let response: string[] = [];
|
||||
let totalResponse: string = "";
|
||||
let counter: number = this.organizationInfo.projects.get(funder).length;
|
||||
let projects = [];
|
||||
let counter: number = count;
|
||||
this._searchProjectsService.getProjectsForOrganizations(this.organizationId,' and (funderid exact '+ funderId + ' ) ',1,count,[]).subscribe(
|
||||
data =>
|
||||
{
|
||||
projects = data[1];
|
||||
for(let index=0; index < projects.length; index++) {
|
||||
this._searchPublicationsService.numOfEntityPublications(projects[index].id, "projects/").subscribe(
|
||||
data =>
|
||||
{
|
||||
// let index: number = this.organizationInfo.projects.get(funder).indexOf(project);
|
||||
|
||||
for(let project of this.organizationInfo.projects.get(funder)) {
|
||||
this._searchPublicationsService.numOfEntityPublications(project.id, "projects/").subscribe(
|
||||
data =>
|
||||
{
|
||||
let index: number = this.organizationInfo.projects.get(funder).indexOf(project);
|
||||
let url: string;
|
||||
if(index == 0) {
|
||||
url = this.downloadURLAPI+"projects/"+projects[index].id+"/publications?format=csv-special&size="+data;
|
||||
} else {
|
||||
url = this.downloadURLAPI+"projects/"+projects[index].id+"/publications?format=csv-special-notitle&size="+data;
|
||||
}
|
||||
|
||||
let url: string;
|
||||
if(index == 0) {
|
||||
url = this.downloadURLAPI+"projects/"+project.id+"/publications?format=csv-special&size="+data;
|
||||
} else {
|
||||
url = this.downloadURLAPI+"projects/"+project.id+"/publications?format=csv-special-notitle&size="+data;
|
||||
}
|
||||
this._reportsService.getCSVResponse(url).subscribe(
|
||||
data =>
|
||||
{
|
||||
counter--;
|
||||
|
||||
this._reportsService.getCSVResponse(url).subscribe(
|
||||
data =>
|
||||
{
|
||||
counter--;
|
||||
response[index] = data;
|
||||
|
||||
response[index] = data;
|
||||
if(counter == 0) {
|
||||
for(let i=0; i<count; i++) {
|
||||
totalResponse += response[i]+"\n";
|
||||
}
|
||||
window.open(window.URL.createObjectURL(new Blob([totalResponse], { type: 'text/csv' })));
|
||||
}
|
||||
},
|
||||
error => console.log("Error downloading the file."),
|
||||
() => console.log('Completed file download.'));
|
||||
},
|
||||
error => console.log("Error getting number of publications for project."));
|
||||
}//);
|
||||
|
||||
if(counter == 0) {
|
||||
for(let i=0; i<this.organizationInfo.projects.get(funder).length; i++) {
|
||||
totalResponse += response[i]+"\n";
|
||||
}
|
||||
window.open(window.URL.createObjectURL(new Blob([totalResponse], { type: 'text/csv' })));
|
||||
}
|
||||
},
|
||||
error => console.log("Error downloading the file."),
|
||||
() => console.log('Completed file download.'));
|
||||
},
|
||||
error => console.log("Error getting number of publications for project."));
|
||||
}//);
|
||||
},
|
||||
error => console.log("Error getting projects project."));
|
||||
|
||||
// let counter: number = this.organizationInfo.projects.get(funder).length;
|
||||
//
|
||||
// for(let project of this.organizationInfo.projects.get(funder)) {
|
||||
// this._searchPublicationsService.numOfEntityPublications(project.id, "projects/").subscribe(
|
||||
// data =>
|
||||
// {
|
||||
// let index: number = this.organizationInfo.projects.get(funder).indexOf(project);
|
||||
//
|
||||
// let url: string;
|
||||
// if(index == 0) {
|
||||
// url = this.downloadURLAPI+"projects/"+project.id+"/publications?format=csv-special&size="+data;
|
||||
// } else {
|
||||
// url = this.downloadURLAPI+"projects/"+project.id+"/publications?format=csv-special-notitle&size="+data;
|
||||
// }
|
||||
//
|
||||
// this._reportsService.getCSVResponse(url).subscribe(
|
||||
// data =>
|
||||
// {
|
||||
// counter--;
|
||||
//
|
||||
// response[index] = data;
|
||||
//
|
||||
// if(counter == 0) {
|
||||
// for(let i=0; i<this.organizationInfo.projects.get(funder).length; i++) {
|
||||
// totalResponse += response[i]+"\n";
|
||||
// }
|
||||
// window.open(window.URL.createObjectURL(new Blob([totalResponse], { type: 'text/csv' })));
|
||||
// }
|
||||
// },
|
||||
// error => console.log("Error downloading the file."),
|
||||
// () => console.log('Completed file download.'));
|
||||
// },
|
||||
// error => console.log("Error getting number of publications for project."));
|
||||
// }//);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import {SearchResultsModule } from '../../searchPages/searchUtils/searchResults.
|
|||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||
import {ReportsServiceModule} from '../../services/reportsService.module';
|
||||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||
import {ProjectsServiceModule} from '../../services/projectsService.module';
|
||||
|
||||
import { SearchingProjectsTabModule} from '../searchingProjectsInTab.module';
|
||||
|
||||
|
@ -27,7 +28,8 @@ import { SearchingProjectsTabModule} from '../searchingProjectsInTab.module';
|
|||
OrganizationServiceModule,
|
||||
SearchingProjectsTabModule,
|
||||
OrganizationServiceModule,
|
||||
PublicationsServiceModule
|
||||
PublicationsServiceModule,
|
||||
ProjectsServiceModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
@ -219,13 +219,13 @@
|
|||
<span>{{projectInfo.funder}} progress report (CSV)</span>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<!--li>
|
||||
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[projectId,'project','result'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i>
|
||||
Link to research results
|
||||
</a>
|
||||
</li>
|
||||
</li-->
|
||||
<li>
|
||||
<a href="/deposit-publications">
|
||||
<a routerLinkActive="router-link-active" routerLink="/deposit-publications">
|
||||
Deposit Publications
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -261,7 +261,10 @@
|
|||
<addThis></addThis>
|
||||
</dd>
|
||||
</dl>
|
||||
<altmetrics *ngIf="publicationInfo.identifiers != undefined && publicationInfo.identifiers.get('doi') != undefined" id="{{publicationInfo.identifiers.get('doi')[0]}}" type="doi"> </altmetrics>
|
||||
</li>
|
||||
|
||||
|
||||
<li *ngIf="publicationInfo.downloadFrom != undefined && publicationInfo.downloadFrom.size > 0">
|
||||
<dl class="uk-description-list-line">
|
||||
<dt class="title">Download from</dt>
|
||||
|
@ -378,7 +381,7 @@
|
|||
View more
|
||||
</a>
|
||||
</dd>
|
||||
<dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','project'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to projects</a></dd>
|
||||
<!--dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','project'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to projects</a></dd-->
|
||||
</dl>
|
||||
|
||||
</li>
|
||||
|
@ -397,7 +400,7 @@
|
|||
<span *ngIf="item['labelConcept'] != null">: {{item['labelConcept']}}</span>
|
||||
</mark>
|
||||
</dd>
|
||||
<dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','context'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to contexts</a></dd>
|
||||
<!--dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','context'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to contexts</a></dd-->
|
||||
</dl>
|
||||
|
||||
</li>
|
||||
|
@ -426,9 +429,6 @@
|
|||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<altmetrics *ngIf="publicationInfo.identifiers != undefined && publicationInfo.identifiers.get('doi') != undefined"
|
||||
id="{{publicationInfo.identifiers.get('doi')[0]}}" type="doi">
|
||||
</altmetrics>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -18,12 +18,12 @@ import {StringUtils} from '../utils/string-utils.class';
|
|||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
||||
</p>
|
||||
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults > 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.totalResults}} results</a></div>
|
||||
<div class = "uk-text-right" *ngIf = "fetchProjects.totalResults > 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.totalResults}} results</a></div>
|
||||
<div class= "searchPaging uk-panel uk-margin-top">
|
||||
<div class="uk-float-right" *ngIf="fetchProjects.results && fetchProjects.searchUtils.totalResults > fetchProjects.searchUtils.size">
|
||||
<paging-no-load [currentPage]="page" [totalResults]="fetchProjects.searchUtils.totalResults" [navigateTo]="navigateTo" [term]="keyword" [size]="size" (pageChange)="pageChange($event)"> </paging-no-load>
|
||||
</div>
|
||||
<ul class="uk-list uk-list-line">
|
||||
<ul *ngIf = "fetchProjects.funders.length > 1" class="uk-list uk-list-line">
|
||||
<li *ngFor="let filter of fetchProjects.filters " >
|
||||
<div class="text-bold">Filter by {{filter.title}}:</div>
|
||||
<span *ngFor = "let value of filter.values" class = "uk-animation-fade">
|
||||
|
@ -50,7 +50,6 @@ export class SearchingProjectsTabComponent {
|
|||
public size :number = 10;
|
||||
public linkToSearchProjects;
|
||||
private filterQuery:string = "";
|
||||
public totalResults = 0;
|
||||
constructor (private _searchProjectsService: SearchProjectsService) {
|
||||
this.fetchProjects = new FetchProjects(this._searchProjectsService);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||
[(searchUtils)] = "searchUtils"
|
||||
(queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="resources">
|
||||
[csvParams]="csvParams" csvPath="resources" simpleSearchLink="/search/find/dataproviders">
|
||||
</advanced-search-page>
|
||||
|
||||
`
|
||||
|
|
|
@ -19,7 +19,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
[(searchUtils)] = "searchUtils"
|
||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||
(queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="resources">
|
||||
[csvParams]="csvParams" csvPath="resources" simpleSearchLink="/search/find/datasets">
|
||||
</advanced-search-page>
|
||||
|
||||
`
|
||||
|
|
|
@ -19,7 +19,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
[(searchUtils)] = "searchUtils"
|
||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||
(queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="resources">
|
||||
[csvParams]="csvParams" csvPath="resources" simpleSearchLink="/search/find/organizations">
|
||||
</advanced-search-page>
|
||||
|
||||
`
|
||||
|
|
|
@ -19,7 +19,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
[(searchUtils)] = "searchUtils"
|
||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||
(queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="resources">
|
||||
[csvParams]="csvParams" csvPath="resources" simpleSearchLink="/search/find/people">
|
||||
</advanced-search-page>
|
||||
|
||||
`
|
||||
|
|
|
@ -18,7 +18,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
[(searchUtils)] = "searchUtils"
|
||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||
(queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="resources">
|
||||
[csvParams]="csvParams" csvPath="resources" simpleSearchLink="/search/find/projects">
|
||||
</advanced-search-page>
|
||||
|
||||
`
|
||||
|
|
|
@ -19,7 +19,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
[(searchUtils)] = "searchUtils"
|
||||
[(fieldIds)]="fieldIds" [(fieldIdsMap)]="fieldIdsMap" [(selectedFields)]="selectedFields"
|
||||
(queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="resources">
|
||||
[csvParams]="csvParams" csvPath="resources" simpleSearchLink="/search/find/publications">
|
||||
</advanced-search-page>
|
||||
`
|
||||
})
|
||||
|
|
|
@ -40,42 +40,42 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
|
||||
<ul class="uk-tab uk-tab-left uk-width-large-1-5 uk-width-small-1-1 " data-uk-switcher="{connect:'#searchtabs'}">
|
||||
<li (click)="searchPublications()" >
|
||||
<a href="#pubsTab">
|
||||
<a>
|
||||
Publications
|
||||
<span *ngIf = "fetchPublications.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchPublications.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchPublications.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchDatasets()">
|
||||
<a href="#dataTab" (click)="searchDatasets()">
|
||||
<a>
|
||||
Datasets
|
||||
<span *ngIf = "fetchDatasets.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchDatasets.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchDatasets.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchProjects()" >
|
||||
<a href="#projectsTab">
|
||||
<a>
|
||||
Projects
|
||||
<span *ngIf = "fetchProjects.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchProjects.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchProjects.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchDataProviders()" >
|
||||
<a href="#dataProviderTab">
|
||||
<a>
|
||||
Data Providers
|
||||
<span *ngIf = "fetchDataproviders.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchDataproviders.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchDataproviders.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchOrganizations()" >
|
||||
<a href="#organizationsTab" >
|
||||
<a>
|
||||
Organizations
|
||||
<span *ngIf = "fetchOrganizations.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchOrganizations.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchOrganizations.searchUtils.totalResults+')':'')}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchPeople()" >
|
||||
<a href="#peopleTab" >
|
||||
<a>
|
||||
People
|
||||
<span *ngIf = "fetchPeople.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||
<span *ngIf = "fetchPeople.searchUtils.status != errorCodes.LOADING" >{{((keyword.length > 0)?'('+fetchPeople.searchUtils.totalResults+')':'')}}</span>
|
||||
|
@ -89,7 +89,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
<ul id="searchtabs" class="uk-switcher uk-margin-left uk-width-large-3-4 uk-width-small-1-1">
|
||||
<li id="pubsTab" class="uk-active">
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div>
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div>
|
||||
<search-result [(results)]="fetchPublications.results"
|
||||
[(status)]= "fetchPublications.searchUtils.status" showLoading = true
|
||||
type="publication" urlParam="articleId">
|
||||
|
@ -101,7 +101,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
</li>
|
||||
<li id="dataTab">
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div>
|
||||
<search-result [(results)]="fetchDatasets.results"
|
||||
[(status)]= "fetchDatasets.searchUtils.status" showLoading = true
|
||||
type="dataset" urlParam="datasetId">
|
||||
|
@ -113,7 +113,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
</li>
|
||||
<li id="projectsTab" >
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults> 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.searchUtils.totalResults}} results</a></div>
|
||||
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults> 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div>
|
||||
<search-result [(results)]="fetchProjects.results"
|
||||
[(status)]= "fetchProjects.searchUtils.status" showLoading = true
|
||||
type="project" urlParam="projectId">
|
||||
|
@ -125,7 +125,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
</li>
|
||||
<li id="dataProviderTab">
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div>
|
||||
<search-result [(results)]="fetchDataproviders.results"
|
||||
[(status)]= "fetchDataproviders.searchUtils.status" showLoading = true
|
||||
type="dataprovider" urlParam="datasourceId">
|
||||
|
@ -137,7 +137,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
</li>
|
||||
<li id="organizationsTab" >
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchOrganizations.searchUtils.totalResults> 10" ><a [href] = "linkToSearchOrganizations" >View all {{fetchOrganizations.searchUtils.totalResults}} results</a></div>
|
||||
<div class = "uk-text-right" *ngIf = "fetchOrganizations.searchUtils.totalResults> 10" ><a [href] = "linkToSearchOrganizations" >View all {{fetchOrganizations.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div>
|
||||
<search-result [(results)]="fetchOrganizations.results"
|
||||
[(status)]= "fetchOrganizations.searchUtils.status" showLoading = true
|
||||
type="organization" urlParam="organizationId">
|
||||
|
@ -149,7 +149,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
</li>
|
||||
<li id="peopleTab">
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "fetchPeople.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPeople" >View all {{fetchPeople.searchUtils.totalResults}} results</a></div>
|
||||
<div class = "uk-text-right" *ngIf = "fetchPeople.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPeople" >View all {{fetchPeople.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div>
|
||||
<search-result [(results)]="fetchPeople.results"
|
||||
[(status)]= "fetchPeople.searchUtils.status" showLoading = true
|
||||
type="person" urlParam="personId">
|
||||
|
|
|
@ -17,8 +17,8 @@ import {Dates} from '../../utils/string-utils.class';
|
|||
<td *ngIf = "i != 0" class=""><select [(ngModel)]="selectedField.operatorId" name="selectOp_{{i}}" >
|
||||
<option *ngFor="let op of operators" (change)="fieldOperatorChanged(i, op.id, op.id)" (click)="fieldOperatorChanged(i, op.id, op.id)" [value]="op.id">{{op.id}}</option>
|
||||
</select></td>
|
||||
<td ><select [(ngModel)]="selectedField.id" name="selectField_{{i}}" (click)="fieldIdsChanged(i)" >
|
||||
<option *ngFor="let id of fieldIds" [value]="id">{{fieldIdsMap[id].name}}</option>
|
||||
<td ><select [(ngModel)]="selectedField.id" name="selectField_{{i}}" (click)="fieldIdsChanged(i)" >
|
||||
<option *ngFor="let id of fieldIds" [value]="id" >{{fieldIdsMap[id].name}}</option>
|
||||
</select> </td>
|
||||
<td *ngIf = "selectedField.type == 'keyword'" ><input type="text" class="form-control" placeholder="Type keywords..."
|
||||
[(ngModel)]="selectedField.value" name="value[{{i}}]"></td>
|
||||
|
@ -126,7 +126,14 @@ export class AdvancedSearchFormComponent {
|
|||
}
|
||||
|
||||
fieldIdsChanged(index: number) {
|
||||
var id =this.selectedFields[index].id;
|
||||
console.log("Field index::"+index + this.selectedFields[index].id );
|
||||
var id= this.fieldIds[0];
|
||||
this.selectedFields[index].name = this.fieldIdsMap[id].name;
|
||||
this.selectedFields[index].type = this.fieldIdsMap[id].type;
|
||||
this.selectedFields[index].value = "";
|
||||
this.selectedFields[index].param = this.fieldIdsMap[id].param;
|
||||
|
||||
var id =this.selectedFields[index].id;
|
||||
this.selectedFields[index].name = this.fieldIdsMap[id].name;
|
||||
this.selectedFields[index].type = this.fieldIdsMap[id].type;
|
||||
this.selectedFields[index].value = "";
|
||||
|
|
|
@ -18,6 +18,7 @@ import {StringUtils, Dates} from '../../utils/string-utils.class';
|
|||
<h1>{{pageTitle}}</h1>
|
||||
</div>
|
||||
<div>
|
||||
<a *ngIf = "simpleSearchLink && simpleSearchLink.length > 0" routerLinkActive="router-link-active" [routerLink]=simpleSearchLink class="uk-float-right" >Simple search <i class="uk-icon-angle-double-right"></i></a>
|
||||
<advanced-search-form
|
||||
[entityType] = "entityType"
|
||||
[(fieldIds)]="fieldIds"
|
||||
|
@ -55,6 +56,9 @@ export class AdvancedSearchPageComponent {
|
|||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||
@Input() csvParams: string;
|
||||
@Input() csvPath: string;
|
||||
@Input() simpleSearchLink: string = "";
|
||||
|
||||
|
||||
|
||||
public parameterNames:string[] =[];
|
||||
public parameterValues:string[] =[];
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{AdvancedSearchPageComponent} from './advancedSearchPage.component';
|
||||
import{SearchResultsModule} from './searchResults.module';
|
||||
|
@ -13,7 +14,7 @@ import {AdvancedSearchFormModule} from '../searchUtils/advancedSearchForm.module
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, SearchResultsModule, LoadingModalModule, ReportsServiceModule, SearchPagingModule, AdvancedSearchFormModule, SearchDownloadModule
|
||||
CommonModule, FormsModule, RouterModule, SearchResultsModule, LoadingModalModule, ReportsServiceModule, SearchPagingModule, AdvancedSearchFormModule, SearchDownloadModule
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchPageComponent,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { MyDatePickerModule } from 'mydatepicker';
|
||||
import { MyDatePickerModule } from 'mydatepicker';
|
||||
import {DateFilterComponent} from './dateFilter.component';
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
|
|
@ -32,6 +32,7 @@ import {ModalLoading} from '../../utils/modal/loading.component';
|
|||
</span>
|
||||
<a (click)="clearFilters()" class = "btn uk-text-right"> Clear Filters[<i class="uk-icon-remove"></i>]</a>
|
||||
</div>
|
||||
<a *ngIf = "advancedSearchLink && advancedSearchLink.length > 0" routerLinkActive="router-link-active" class="uk-float-right" [routerLink]=advancedSearchLink >More search options <i class="uk-icon-angle-double-right"></i></a>
|
||||
</div>
|
||||
<div class="uk-grid uk-width-1-1 uk-margin">
|
||||
<div class=" search-filters uk-width-large-1-4 uk-width-medium-1-4 uk-width-small-1-1">
|
||||
|
@ -85,6 +86,7 @@ export class SearchPageComponent {
|
|||
@Input() refineFields = [];
|
||||
@Input() csvParams: string;
|
||||
@Input() csvPath: string;
|
||||
@Input() advancedSearchLink: string = "";
|
||||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};
|
||||
private searchFieldsHelper:SearchFields = new SearchFields();
|
||||
|
@ -125,8 +127,6 @@ export class SearchPageComponent {
|
|||
}
|
||||
|
||||
public getQueryParametersFromUrl(params){
|
||||
//TODO when final search is done-allFqs/fq
|
||||
|
||||
// var parameters = "";
|
||||
var allFqs = "";
|
||||
|
||||
|
@ -168,6 +168,8 @@ export class SearchPageComponent {
|
|||
}
|
||||
if(doisParams.length > 0){
|
||||
doiQuery += "&"+doisParams;
|
||||
}else {
|
||||
keywordQuery += "&q="+StringUtils.URIEncode(keyword);
|
||||
}
|
||||
}else{
|
||||
keywordQuery += "&q="+StringUtils.URIEncode(keyword);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{SearchPageComponent} from './searchPage.component';
|
||||
import{SearchFormModule} from './searchForm.module';
|
||||
|
@ -13,7 +14,7 @@ import {SearchDownloadModule} from './searchDownload.module';
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, SearchFormModule, SearchResultsModule, LoadingModalModule, ReportsServiceModule, SearchPagingModule, SearchDownloadModule
|
||||
CommonModule, FormsModule,RouterModule, SearchFormModule, SearchResultsModule, LoadingModalModule, ReportsServiceModule, SearchPagingModule, SearchDownloadModule
|
||||
],
|
||||
declarations: [
|
||||
SearchPageComponent,
|
||||
|
|
|
@ -18,7 +18,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
type="data providers" entityType="dataprovider" [(filters)] = "filters"
|
||||
[(results)] = "results" [(searchUtils)] = "searchUtils" [baseUrl] = "baseUrl"
|
||||
(queryChange)="queryChanged($event)" (downloadClick)="downloadClicked($event)"
|
||||
[csvParams]="csvParams" csvPath="datasources">
|
||||
[csvParams]="csvParams" csvPath="datasources" advancedSearchLink="/search/advanced/dataproviders">
|
||||
</search-page>
|
||||
|
||||
`
|
||||
|
|
|
@ -19,7 +19,7 @@ import {DOI} from '../../utils/string-utils.class';
|
|||
type="datasets" entityType="dataset" [(filters)] = "filters"
|
||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="datasets">
|
||||
[csvParams]="csvParams" csvPath="datasets" advancedSearchLink="/search/advanced/datasets">
|
||||
</search-page>
|
||||
`
|
||||
})
|
||||
|
|
|
@ -17,7 +17,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
type="organizations" entityType="organization" [(filters)] = "filters"
|
||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="organizations">
|
||||
[csvParams]="csvParams" csvPath="organizations" advancedSearchLink="/search/advanced/organizations">
|
||||
</search-page>
|
||||
|
||||
`
|
||||
|
|
|
@ -19,7 +19,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
type="people" entityType="person" [(filters)] = "filters"
|
||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)" [showRefine]=false
|
||||
[csvParams]="csvParams" csvPath="people">
|
||||
[csvParams]="csvParams" csvPath="people" advancedSearchLink="/search/advanced/people">
|
||||
</search-page>
|
||||
|
||||
`
|
||||
|
|
|
@ -17,7 +17,7 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
|||
type="projects" entityType="project" [(filters)] = "filters"
|
||||
[(results)] = "results" [(searchUtils)] = "searchUtils"
|
||||
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)"
|
||||
[csvParams]="csvParams" csvPath="projects">
|
||||
[csvParams]="csvParams" csvPath="projects" advancedSearchLink="/search/advanced/projects">
|
||||
</search-page>
|
||||
`
|
||||
|
||||
|
@ -66,7 +66,6 @@ export class SearchProjectsComponent {
|
|||
firstLoad = false;
|
||||
//get page from url parameters
|
||||
this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
|
||||
|
||||
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size);
|
||||
});
|
||||
|
|
|
@ -22,7 +22,7 @@ import {DOI} from '../../utils/string-utils.class';
|
|||
[(filters)] = "filters" [(results)] = "results"
|
||||
[(searchUtils)] = "searchUtils" [(baseUrl)] = baseUrl
|
||||
(queryChange)="queryChanged($event)" (downloadClick)="downloadClicked($event)"
|
||||
[csvParams]="csvParams" csvPath="publications">
|
||||
[csvParams]="csvParams" csvPath="publications" advancedSearchLink="/search/advanced/publications">
|
||||
</search-page>
|
||||
|
||||
`
|
||||
|
@ -73,9 +73,7 @@ export class SearchPublicationsComponent {
|
|||
}
|
||||
firstLoad = false;
|
||||
this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
|
||||
|
||||
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
|
||||
|
||||
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -24,13 +24,13 @@ import 'rxjs/Rx';
|
|||
<li><a routerLinkActive="router-link-active" routerLink="search/find/dataproviders">Data Providers</a></li>
|
||||
<li><a routerLinkActive="router-link-active" routerLink="search/find/organizations">Organizations</a></li>
|
||||
<li><a routerLinkActive="router-link-active" routerLink="search/find/people">People</a></li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
<!--li class="uk-nav-divider"></li>
|
||||
<li><a [queryParams]="{articleId: 'od_______908::3a5b2885656a91307156325644e73b92'}" routerLinkActive="router-link-active" routerLink="search/publication" >Publication </a></li>
|
||||
<li><a [queryParams]="{datasetId: 'datacite____::430ac1c41b7f99b7b543ef737dc41a74'}" routerLinkActive="router-link-active" routerLink="search/dataset" >Dataset </a></li>
|
||||
<li><a [queryParams]="{projectId: 'corda_______::2c37878a0cede85dbbd1081bb9b4a2f8'}" routerLinkActive="router-link-active" routerLink="search/project" >Project </a></li>
|
||||
<li><a [queryParams]="{personId: 'datacite____::9da3a037961b36a634fcd40ab0bf6535'}" routerLinkActive="router-link-active" routerLink="search/person" >Person </a></li>
|
||||
<li><a [queryParams]="{organizationId: 'dedup_wf_001::f686277c34bf457bbdf19e03589b5e81'}" routerLinkActive="router-link-active" routerLink="search/organization" >Organization </a></li>
|
||||
<li><a [queryParams]="{datasourceId: 'opendoar____::798ed7d4ee7138d49b8828958048130a'}" routerLinkActive="router-link-active" routerLink="search/dataprovider" >Data Provider </a></li>
|
||||
<li><a [queryParams]="{datasourceId: 'opendoar____::798ed7d4ee7138d49b8828958048130a'}" routerLinkActive="router-link-active" routerLink="search/dataprovider" >Data Provider </a></li-->
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -48,7 +48,7 @@ import 'rxjs/Rx';
|
|||
</div>
|
||||
|
||||
</li>
|
||||
<li class="uk-parent" data-uk-dropdown="" aria-haspopup="true" aria-expanded="false">
|
||||
<!--li class="uk-parent" data-uk-dropdown="" aria-haspopup="true" aria-expanded="false">
|
||||
<a routerLinkActive="router-link-active" routerLink="search/advanced/publications">Advanced Search</a>
|
||||
|
||||
<div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" aria-hidden="true" style="top: 40px; left: 0px;" tabindex="">
|
||||
|
@ -62,7 +62,7 @@ import 'rxjs/Rx';
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</li-->
|
||||
<li class="uk-parent" data-uk-dropdown="" aria-haspopup="true" aria-expanded="false">
|
||||
<a routerLinkActive="router-link-active" routerLink="deposit-publications" >Deposit</a>
|
||||
|
||||
|
@ -74,7 +74,7 @@ import 'rxjs/Rx';
|
|||
</div>
|
||||
|
||||
</li>
|
||||
<li class="uk-parent" data-uk-dropdown="" aria-haspopup="true" aria-expanded="false">
|
||||
<!--li class="uk-parent" data-uk-dropdown="" aria-haspopup="true" aria-expanded="false">
|
||||
<a routerLinkActive="router-link-active" routerLink="linking" >Linking</a>
|
||||
|
||||
<div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" aria-hidden="true" style="top: 40px; left: 0px;" tabindex="">
|
||||
|
@ -85,7 +85,7 @@ import 'rxjs/Rx';
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</li-->
|
||||
|
||||
</ul>
|
||||
|
||||
|
@ -131,7 +131,7 @@ import 'rxjs/Rx';
|
|||
</div>
|
||||
|
||||
</li>
|
||||
<li class="" aria-expanded="false" >
|
||||
<!--li class="" aria-expanded="false" >
|
||||
<a href="#">Advanced Search</a>
|
||||
|
||||
<div ><ul class="uk-nav-sub" role="menu">
|
||||
|
@ -144,7 +144,7 @@ import 'rxjs/Rx';
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</li-->
|
||||
|
||||
<li class="" aria-expanded="false" >
|
||||
<a href="#">Deposit</a>
|
||||
|
|
|
@ -18,22 +18,18 @@ export class AltMetricsComponent {
|
|||
private sub:any;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
console.log("####constr");
|
||||
|
||||
// if (typeof document !== 'undefined') {
|
||||
// let yourModule = require('../utils/altmetrics.js');
|
||||
// }
|
||||
}
|
||||
ngOnInit() {
|
||||
console.log("####init");
|
||||
this.sub = this.route.queryParams.subscribe(data => {
|
||||
console.log("####params");
|
||||
if(this.type == "doi"){
|
||||
this.altmetrics='<div data-badge-popover="right" data-hide-no-mentions="true" data-badge-type="donut" data-doi="'+this.id+'" class="altmetric-embed"> </div>';
|
||||
this.altmetrics='<div data-badge-popover="right" data-hide-no-mentions="true" data-badge-type="donut" data-doi="'+this.id+'" class="altmetric-embed uk-text-center"> </div>';
|
||||
}else{
|
||||
this.altmetrics='<div data-badge-popover="right" data-hide-no-mentions="true" data-badge-type="donut" data-arxiv-id="'+this.id+'" class="altmetric-embed"> </div>';
|
||||
this.altmetrics='<div data-badge-popover="right" data-hide-no-mentions="true" data-badge-type="donut" data-arxiv-id="'+this.id+'" class="altmetric-embed uk-text-center"> </div>';
|
||||
}
|
||||
console.log("####params loadAltmetrics");
|
||||
if (typeof document !== 'undefined') {
|
||||
// let yourModule = require('../utils/altmetrics.js');
|
||||
loadAltmetrics("altmetric-embed-js","https://d1bxh8uas1mnw7.cloudfront.net/assets/altmetric_badges-8f271adb184c21cc5169a7f67f7fe5ab.js");
|
||||
|
@ -43,16 +39,5 @@ export class AltMetricsComponent {
|
|||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
update(){
|
||||
// console.log("Altmetrics update!");
|
||||
// if (typeof document !== 'undefined') {
|
||||
// let yourModule = require('../utils/altmetrics.js');
|
||||
// }
|
||||
// if(this.type == "doi"){
|
||||
// this.altmetrics='<div data-badge-popover="right" data-hide-no-mentions="true" data-badge-type="donut" data-doi="'+this.id+'" class="altmetric-embed"> </div>';
|
||||
// }else{
|
||||
// this.altmetrics='<div data-badge-popover="right" data-hide-no-mentions="true" data-badge-type="donut" data-arxiv-id="'+this.id+'" class="altmetric-embed"> </div>';
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@ export class FetchProjects{
|
|||
public results =[];
|
||||
|
||||
public filters; // for getResultsForOrganizations
|
||||
public totalResults; // for getResultsForOrganizations // this is total results before filtering
|
||||
public totalResults; // for getResultsForOrganizations // this is total results with the initial query - before filtering
|
||||
public funders:any = []; // for getResultsForOrganizations // this is filled with the initial query - before filtering
|
||||
|
||||
public sub: any;
|
||||
public subResults: any;
|
||||
|
@ -96,10 +97,7 @@ export class FetchProjects{
|
|||
if(refineFields && refineFields.length > 0){
|
||||
this.filters = data[2];
|
||||
filterquery = decodeURIComponent(filterquery);
|
||||
|
||||
console.log("---filterquery:"+filterquery);
|
||||
for(var i = 0; i < this.filters.length; i++){
|
||||
|
||||
if(filterquery.indexOf(this.filters[i].filterId) !== -1){
|
||||
console.log("this.filters[i].filterId:"+this.filters[i].filterId);
|
||||
for(var j = 0; j < this.filters[i].values.length; j++){
|
||||
|
@ -114,6 +112,16 @@ export class FetchProjects{
|
|||
|
||||
if(!this.totalResults && filterquery == ""){
|
||||
this.totalResults = this.searchUtils.totalResults;
|
||||
this.funders = [];
|
||||
for(var i = 0; i < this.filters.length; i++){
|
||||
console.log("this.filters[i].filterId:"+this.filters[i].filterId);
|
||||
if(this.filters[i].filterId == "funderid"){
|
||||
this.funders = (this.filters[i].values);
|
||||
|
||||
}
|
||||
}
|
||||
console.log(" this.funders:"+ this.funders);
|
||||
|
||||
}
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = errorCodes.DONE;
|
||||
|
|
Loading…
Reference in New Issue