1. Dataprovider Landing Page: Add 'Other Research Products' tab | Add request for 'Other Research Products' in 'Related Content Providers' tab
| Bug fix of operators in links to Advanced Search Pages | Bug fix in map of 'Related Content Providers' tab. 2. searchFields.ts: Bug fix in operators. 3. htmlProjectReport.component: Add case for 'Other Research Products'. 4. Publication & Dataset & Software & Other Research Product Landing Pages: add case for 'Other Research Products' in 'Similar Research Results' and 'Related Research Results' tabs. 5. Project Landing Page: Add 'Other Research Products' tab. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@52828 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
0c0147f408
commit
5ccba9adaf
|
@ -120,6 +120,21 @@
|
|||
</softwareTab>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li *ngIf="dataProviderInfo.tabs2.indexOf('Other Research Products') != -1" (click)="search('orpsTab', 1, 10); activeTab='Other Research Products'">
|
||||
<a class="uk-accordion-title" href="#">Other Research Products
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{fetchOrps.searchUtils.totalResults | number}}
|
||||
</span>
|
||||
</a>
|
||||
<div class="uk-accordion-content">
|
||||
<orpsTab *ngIf="activeTab=='Other Research Products'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[fetchOrps]="fetchOrps" [(properties)]=properties>
|
||||
</orpsTab>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li *ngIf="dataProviderInfo.tabs2.indexOf('Projects') != -1" (click)="search('projectsTab', 1, 10); activeTab='Projects'">
|
||||
<a class="uk-accordion-title" href="#">Projects
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
|
@ -167,7 +182,9 @@
|
|||
[loading]="loadingRelatedDatasources"
|
||||
[fetchPublications]="fetchAggregatorsPublications"
|
||||
[fetchDatasets]="fetchAggregatorsDatasets"
|
||||
[fetchSoftware]="fetchAggregatorsSoftware" [(properties)]=properties>
|
||||
[fetchSoftware]="fetchAggregatorsSoftware"
|
||||
[fetchOrps]="fetchAggregatorsOrps"
|
||||
[(properties)]=properties>
|
||||
</relatedDatasourcesTab>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
@ -18,6 +18,8 @@ import {FetchDatasets} from '../../utils/fetchEntitiesClass
|
|||
import {SearchDatasetsService} from '../../services/searchDatasets.service';
|
||||
import {FetchSoftware} from '../../utils/fetchEntitiesClasses/fetchSoftware.class';
|
||||
import {SearchSoftwareService} from '../../services/searchSoftware.service';
|
||||
import {FetchOrps} from '../../utils/fetchEntitiesClasses/fetchOrps.class';
|
||||
import {SearchOrpsService} from '../../services/searchOrps.service';
|
||||
import {FetchProjects} from '../../utils/fetchEntitiesClasses/fetchProjects.class';
|
||||
import {SearchProjectsService} from '../../services/searchProjects.service';
|
||||
import {FetchDataproviders} from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
|
||||
|
@ -66,11 +68,13 @@ export class DataProviderComponent {
|
|||
public fetchPublications : FetchPublications;
|
||||
public fetchDatasets: FetchDatasets;
|
||||
public fetchSoftware: FetchSoftware;
|
||||
public fetchOrps: FetchOrps;
|
||||
public fetchProjects: FetchProjects;
|
||||
public fetchDataproviders: FetchDataproviders;
|
||||
public fetchAggregatorsPublications: FetchPublications;
|
||||
public fetchAggregatorsDatasets: FetchDatasets;
|
||||
public fetchAggregatorsSoftware: FetchSoftware;
|
||||
public fetchAggregatorsOrps: FetchOrps;
|
||||
|
||||
public loadingRelatedDatasources: boolean = true;
|
||||
|
||||
|
@ -85,6 +89,7 @@ export class DataProviderComponent {
|
|||
private reloadPublications: boolean = true;
|
||||
private reloadDatasets: boolean = true;
|
||||
private reloadSoftware: boolean = true;
|
||||
private reloadOrps: boolean = true;
|
||||
private reloadProjects: boolean = true;
|
||||
private reloadDataproviders: boolean = true;
|
||||
private reloadRelatedDatasources: boolean = true;
|
||||
|
@ -107,11 +112,13 @@ export class DataProviderComponent {
|
|||
private _searchPublicationsService: SearchPublicationsService,
|
||||
private _searchDatasetsService: SearchDatasetsService,
|
||||
private _searchSoftwareService: SearchSoftwareService,
|
||||
private _searchOrpsService: SearchOrpsService,
|
||||
private _searchProjectsService: SearchProjectsService,
|
||||
private _searchDataprovidersService: SearchDataprovidersService) {
|
||||
this.fetchPublications = new FetchPublications(this._searchPublicationsService);
|
||||
this.fetchDatasets = new FetchDatasets(this._searchDatasetsService);
|
||||
this.fetchSoftware = new FetchSoftware(this._searchSoftwareService);
|
||||
this.fetchOrps = new FetchOrps(this._searchOrpsService);
|
||||
this.fetchProjects = new FetchProjects(this._searchProjectsService);
|
||||
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
||||
|
||||
|
@ -226,6 +233,7 @@ export class DataProviderComponent {
|
|||
this.reloadPublications = true;
|
||||
this.reloadDatasets = true;
|
||||
this.reloadSoftware = true;
|
||||
this.reloadOrps = true;
|
||||
this.reloadProjects = true;
|
||||
this.reloadDataproviders = true;
|
||||
this.reloadRelatedDatasources = true;
|
||||
|
@ -262,13 +270,14 @@ export class DataProviderComponent {
|
|||
this.fetchAggregatorsDatasets = new FetchDatasets(this._searchDatasetsService);
|
||||
//}
|
||||
this.fetchAggregatorsSoftware = new FetchSoftware(this._searchSoftwareService);
|
||||
this.fetchAggregatorsOrps = new FetchOrps(this._searchOrpsService);
|
||||
}
|
||||
if(this.dataProviderInfo.resultsBy == "collectedFrom") {
|
||||
//this.paramsForSearchLink = "?collectedFrom="+this.datasourceId+"&co=and";
|
||||
this.paramsForSearchLink = this.routerHelper.createQueryParams(['collectedFrom', 'co'], [this.datasourceId, 'and']);
|
||||
this.paramsForSearchLink = this.routerHelper.createQueryParams(['collectedFrom', 'cl'], [this.datasourceId, 'and']);
|
||||
} else if (this.dataProviderInfo.resultsBy == "hostedBy") {
|
||||
//this.paramsForSearchLink = "?hostedBy="+this.datasourceId+"&ho=and";
|
||||
this.paramsForSearchLink = this.routerHelper.createQueryParams(['hostedBy', 'ho'], [this.datasourceId, 'and']);
|
||||
this.paramsForSearchLink = this.routerHelper.createQueryParams(['hostedBy', 'hs'], [this.datasourceId, 'and']);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -283,7 +292,9 @@ export class DataProviderComponent {
|
|||
this.countDatasets(page, size);
|
||||
} else if(content=='softwareTab') {
|
||||
this.countSoftware(page, size);
|
||||
} else if(content=='projectsTab') {
|
||||
} else if(content=='orpsTab') {
|
||||
this.countOrps(page, size);
|
||||
} else if(content=='projectsTab') {
|
||||
this.countProjects(page, size);
|
||||
} else if(content=='datasourcesTab') {
|
||||
this.countDatasources(page, size);
|
||||
|
@ -300,7 +311,9 @@ export class DataProviderComponent {
|
|||
this.searchDatasets(page, size);
|
||||
} else if(content=='softwareTab') {
|
||||
this.searchSoftware(page, size);
|
||||
} else if(content=='projectsTab') {
|
||||
} else if(content=='orpsTab') {
|
||||
this.searchOrps(page, size);
|
||||
} else if(content=='projectsTab') {
|
||||
this.searchProjects(page, size);
|
||||
} else if(content=='datasourcesTab') {
|
||||
this.searchDatasources(page, size);
|
||||
|
@ -352,6 +365,19 @@ export class DataProviderComponent {
|
|||
this.fetchSoftware.getResultsForDataproviders(this.datasourceId, this.dataProviderInfo.resultsBy, page, size, this.properties);
|
||||
}
|
||||
|
||||
private searchOrps(page: number, size: number) {
|
||||
if( this.reloadOrps &&
|
||||
( this.fetchOrps.searchUtils.status == this.errorCodes.LOADING ||
|
||||
this.fetchOrps.searchUtils.status == this.errorCodes.DONE ) ) {
|
||||
this.fetchOrps.getResultsForDataproviders(this.datasourceId, this.dataProviderInfo.resultsBy, page, size, this.properties);
|
||||
}
|
||||
this.reloadOrps = false;
|
||||
}
|
||||
|
||||
private countOrps(page: number, size: number) {
|
||||
this.fetchOrps.getResultsForDataproviders(this.datasourceId, this.dataProviderInfo.resultsBy, page, size, this.properties);
|
||||
}
|
||||
|
||||
private searchProjects(page: number, size: number) {
|
||||
if( this.reloadProjects &&
|
||||
( this.fetchProjects.searchUtils.status == this.errorCodes.LOADING ||
|
||||
|
@ -389,8 +415,11 @@ export class DataProviderComponent {
|
|||
this.fetchAggregatorsDatasets.searchUtils.status == this.errorCodes.DONE )
|
||||
&&
|
||||
( this.fetchAggregatorsSoftware.searchUtils.status == this.errorCodes.LOADING ||
|
||||
this.fetchAggregatorsSoftware.searchUtils.status == this.errorCodes.DONE )) {
|
||||
this.relatedDatasourcesSub = Observable.merge(this.fetchAggregatorsPublications.requestComplete, this.fetchAggregatorsDatasets.requestComplete, this.fetchAggregatorsSoftware.requestComplete)
|
||||
this.fetchAggregatorsSoftware.searchUtils.status == this.errorCodes.DONE )
|
||||
&&
|
||||
( this.fetchAggregatorsOrps.searchUtils.status == this.errorCodes.LOADING ||
|
||||
this.fetchAggregatorsOrps.searchUtils.status == this.errorCodes.DONE )) {
|
||||
this.relatedDatasourcesSub = Observable.merge(this.fetchAggregatorsPublications.requestComplete, this.fetchAggregatorsDatasets.requestComplete, this.fetchAggregatorsSoftware.requestComplete, this.fetchAggregatorsOrps.requestComplete)
|
||||
.subscribe(
|
||||
data => {},
|
||||
err => {},
|
||||
|
@ -400,6 +429,7 @@ export class DataProviderComponent {
|
|||
this.fetchAggregatorsPublications.getAggregatorResults(this.datasourceId, page, size, this.properties);
|
||||
this.fetchAggregatorsDatasets.getAggregatorResults(this.datasourceId, page, size, this.properties);
|
||||
this.fetchAggregatorsSoftware.getAggregatorResults(this.datasourceId, page, size, this.properties);
|
||||
this.fetchAggregatorsOrps.getAggregatorResults(this.datasourceId, page, size, this.properties);
|
||||
} else {
|
||||
this.loadingRelatedDatasources = false;
|
||||
}
|
||||
|
@ -412,18 +442,20 @@ export class DataProviderComponent {
|
|||
this.fetchAggregatorsPublications.getAggregatorResults(this.datasourceId, page, size, this.properties);
|
||||
this.fetchAggregatorsDatasets.getAggregatorResults(this.datasourceId, page, size, this.properties);
|
||||
this.fetchAggregatorsSoftware.getAggregatorResults(this.datasourceId, page, size, this.properties);
|
||||
this.fetchAggregatorsOrps.getAggregatorResults(this.datasourceId, page, size, this.properties);
|
||||
}
|
||||
|
||||
|
||||
private preprocessRelatedDatasources() {
|
||||
if( this.fetchAggregatorsPublications.searchUtils.status == this.errorCodes.DONE ||
|
||||
this.fetchAggregatorsDatasets.searchUtils.status == this.errorCodes.DONE ||
|
||||
this.fetchAggregatorsSoftware.searchUtils.status == this.errorCodes.DONE ) {
|
||||
this.dataProviderInfo.relatedDatasources = new Map<string, {"name": string, "countPublications": string, "countDatasets": string, "countSoftware": string}>();
|
||||
this.fetchAggregatorsSoftware.searchUtils.status == this.errorCodes.DONE ||
|
||||
this.fetchAggregatorsOrps.searchUtils.status == this.errorCodes.DONE ) {
|
||||
this.dataProviderInfo.relatedDatasources = new Map<string, {"name": string, "countPublications": string, "countDatasets": string, "countSoftware": string, "countOrps": string}>();
|
||||
}
|
||||
for(let result of this.fetchAggregatorsPublications.results) {
|
||||
if(!this.dataProviderInfo.relatedDatasources.has(result.id)) {
|
||||
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": result.count, "countDatasets": "0", "countSoftware": "0"});
|
||||
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": result.count, "countDatasets": "0", "countSoftware": "0", "countOrps": "0"});
|
||||
} else {
|
||||
this.dataProviderInfo.relatedDatasources.get(result.id).countPublications = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countPublications + result.count)+"";
|
||||
}
|
||||
|
@ -431,7 +463,7 @@ export class DataProviderComponent {
|
|||
|
||||
for(let result of this.fetchAggregatorsDatasets.results) {
|
||||
if(!this.dataProviderInfo.relatedDatasources.has(result.id)) {
|
||||
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": "0", "countDatasets": result.count, "countSoftware": "0"});
|
||||
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": "0", "countDatasets": result.count, "countSoftware": "0", "countOrps": "0"});
|
||||
} else {
|
||||
this.dataProviderInfo.relatedDatasources.get(result.id).countDatasets = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countDatasets + result.count)+"";
|
||||
}
|
||||
|
@ -439,11 +471,19 @@ export class DataProviderComponent {
|
|||
|
||||
for(let result of this.fetchAggregatorsSoftware.results) {
|
||||
if(!this.dataProviderInfo.relatedDatasources.has(result.id)) {
|
||||
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": "0", "countDatasets": "0", "countSoftware": result.count});
|
||||
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": "0", "countDatasets": "0", "countSoftware": result.count, "countOrps": "0"});
|
||||
} else {
|
||||
this.dataProviderInfo.relatedDatasources.get(result.id).countSoftware = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countSoftware + result.count)+"";
|
||||
}
|
||||
}
|
||||
|
||||
for(let result of this.fetchAggregatorsOrps.results) {
|
||||
if(!this.dataProviderInfo.relatedDatasources.has(result.id)) {
|
||||
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": "0", "countDatasets": "0", "countSoftware": "0", "countOrps": result.count});
|
||||
} else {
|
||||
this.dataProviderInfo.relatedDatasources.get(result.id).countOrps = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countOrps + result.count)+"";
|
||||
}
|
||||
}
|
||||
this.loadingRelatedDatasources = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import {PagingModule} from '../../utils/paging.module';
|
|||
import {PublicationsTabComponent} from './publicationsTab.component';
|
||||
import {DatasetsTabComponent} from './datasetsTab.component';
|
||||
import {SoftwareTabComponent} from './softwareTab.component';
|
||||
import {OrpsTabComponent} from './orpsTab.component';
|
||||
import {StatisticsTabComponent} from './statisticsTab.component';
|
||||
import {ProjectsTabComponent} from './projectsTab.component';
|
||||
import {DatasourcesTabComponent} from './datasourcesTab.component';
|
||||
|
@ -28,6 +29,7 @@ import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
|||
import {ProjectsServiceModule} from '../../services/projectsService.module';
|
||||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||
import {SoftwareServiceModule} from '../../services/softwareService.module';
|
||||
import {OrpsServiceModule} from '../../services/orpsService.module';
|
||||
|
||||
// import { DataProviderRoutingModule } from './dataProvider-routing.module';
|
||||
import {FreeGuard} from'../../login/freeGuard.guard';
|
||||
|
@ -38,10 +40,10 @@ import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
|||
[CommonModule, FormsModule, RouterModule,
|
||||
TabResultModule, IFrameModule, ErrorMessagesModule, MetricsModule, LandingModule,
|
||||
DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, PublicationsServiceModule,
|
||||
SoftwareServiceModule, PagingModule],
|
||||
SoftwareServiceModule, OrpsServiceModule, PagingModule],
|
||||
declarations:
|
||||
[PublicationsTabComponent, DatasetsTabComponent, StatisticsTabComponent, ProjectsTabComponent, DatasourcesTabComponent, OrganizationsTabComponent,
|
||||
RelatedDatasourcesTabComponent, DataProviderComponent, SoftwareTabComponent
|
||||
RelatedDatasourcesTabComponent, DataProviderComponent, SoftwareTabComponent, OrpsTabComponent
|
||||
],
|
||||
providers:[
|
||||
DataProviderService, FreeGuard, IsRouteEnabled],
|
||||
|
|
|
@ -130,9 +130,10 @@ export class DataProviderService {
|
|||
this.dataProviderInfo.tabs2.push("Software");
|
||||
}
|
||||
|
||||
/*if(this.dataProviderInfo.tabsInTypes.otherTab.has(data[1].classid)) {
|
||||
this.dataProviderInfo.tabs.push({"name": "Other", "content": "otherTab"});
|
||||
}*/
|
||||
if(this.dataProviderInfo.tabsInTypes.orpsTab.has(data[1].classid)) {
|
||||
this.dataProviderInfo.tabs.push({"name": "Other Research Products", "content": "orpsTab"});
|
||||
this.dataProviderInfo.tabs2.push("Other Research Products");
|
||||
}
|
||||
|
||||
this.dataProviderInfo.tabs.push({"name": "Metrics", "content": "metricsTab"});
|
||||
this.dataProviderInfo.tabs2.push("Metrics");
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import { FetchOrps } from '../../utils/fetchEntitiesClasses/fetchOrps.class';
|
||||
|
||||
import {ErrorCodes} from '../../utils/properties/errorCodes';
|
||||
import{EnvProperties} from '../../utils/properties/env-properties';
|
||||
|
||||
@Component({
|
||||
selector: 'orpsTab',
|
||||
template: `
|
||||
<errorMessages [status]="[fetchOrps.searchUtils.status]" [type]="'other research products'" tab_error_class=true></errorMessages>
|
||||
|
||||
<div *ngIf="fetchOrps.searchUtils.status == errorCodes.DONE">
|
||||
<div class = "uk-text-right" *ngIf = "fetchOrps.searchUtils.totalResults > 10" >
|
||||
<a [queryParams]="paramsForSearchLink"
|
||||
routerLinkActive="router-link-active" [routerLink]="linkToSearchOrps" class="uk-button uk-button-text">
|
||||
View all {{fetchOrps.searchUtils.totalResults | number}} results
|
||||
</a>
|
||||
</div>
|
||||
<tab-result [(results)]="fetchOrps.results"
|
||||
[(status)]= "fetchOrps.searchUtils.status"
|
||||
type="other" urlParam="orpId">
|
||||
</tab-result>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
export class OrpsTabComponent {
|
||||
@Input() paramsForSearchLink = {};
|
||||
@Input() fetchOrps : FetchOrps;
|
||||
@Input() properties:EnvProperties ;
|
||||
public linkToSearchOrps = "";
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
||||
constructor () {}
|
||||
|
||||
ngOnInit() {
|
||||
this.linkToSearchOrps = this.properties.searchLinkToAdvancedOrps;
|
||||
}
|
||||
|
||||
ngOnDestroy() {}
|
||||
}
|
|
@ -3,6 +3,7 @@ import {Component, Input} from '@angular/core';
|
|||
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
||||
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
||||
import { FetchSoftware } from '../../utils/fetchEntitiesClasses/fetchSoftware.class';
|
||||
import { FetchOrps } from '../../utils/fetchEntitiesClasses/fetchOrps.class';
|
||||
|
||||
import { ErrorCodes} from '../../utils/properties/errorCodes';
|
||||
import {RouterHelper} from '../../utils/routerHelper.class';
|
||||
|
@ -12,12 +13,13 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
@Component({
|
||||
selector: 'relatedDatasourcesTab',
|
||||
template: `
|
||||
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status, fetchSoftware.searchUtils.status]"
|
||||
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status, fetchSoftware.searchUtils.status, fetchOrps.searchUtils.status]"
|
||||
[type]="'related content providers'" tab_error_class=true>
|
||||
</errorMessages>
|
||||
|
||||
<div *ngIf="(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE || fetchSoftware.searchUtils.status == errorCodes.DONE)
|
||||
&& !loading">
|
||||
<div *ngIf="(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE
|
||||
|| fetchSoftware.searchUtils.status == errorCodes.DONE || fetchOrps.searchUtils.status == errorCodes.DONE)
|
||||
&& !loading">
|
||||
<div *ngIf="results && results.size > pageSize" class="uk-margin">
|
||||
<span class="uk-text-bold">{{results.size | number}} related content providers, page {{page | number}} of {{totalPages(results.size) | number}}</span>
|
||||
<paging-no-load class="uk-float-right" [currentPage]="page" [totalResults]="results.size" [size]="pageSize" (pageChange)="updatePage($event)"></paging-no-load>
|
||||
|
@ -39,11 +41,15 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
class="uk-text-center">
|
||||
Number of Software
|
||||
</th>
|
||||
<th *ngIf="fetchOrps.results.length > 0 || fetchOrps.searchUtils.status == errorCodes.ERROR"
|
||||
class="uk-text-center">
|
||||
Number of Other Research Products
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<ng-container *ngIf="results">
|
||||
<ng-container *ngFor="let id of results.keys() let i=index">
|
||||
<ng-container *ngFor="let id of getKeys(results); let i=index">
|
||||
<tr *ngIf="i>=(page-1)*pageSize && i<page*pageSize">
|
||||
<td class="uk-text-center">
|
||||
<a [queryParams]="{datasourceId: id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
|
||||
|
@ -73,6 +79,14 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
</a>
|
||||
</td>
|
||||
<td *ngIf="fetchSoftware.searchUtils.status == errorCodes.ERROR" class="uk-text-center">-</td>
|
||||
|
||||
<td *ngIf="fetchOrps.results.length > 0" class="uk-text-center">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['hostedBy', 'hs', 'collectedFrom', 'cl'], [id, 'and', dataproviderId, 'and'])"
|
||||
routerLinkActive="router-link-active" [routerLink]="linkToSearchOrps">
|
||||
{{results.get(id).countOrps | number}}
|
||||
</a>
|
||||
</td>
|
||||
<td *ngIf="fetchOrps.searchUtils.status == errorCodes.ERROR" class="uk-text-center">-</td>
|
||||
</tr>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
@ -87,16 +101,18 @@ export class RelatedDatasourcesTabComponent {
|
|||
@Input() fetchPublications : FetchPublications;
|
||||
@Input() fetchDatasets : FetchDatasets;
|
||||
@Input() fetchSoftware : FetchSoftware;
|
||||
@Input() fetchOrps: FetchOrps;
|
||||
|
||||
// true: preprocessing is not over
|
||||
@Input() loading: boolean = true;
|
||||
// Εvery content provider's id is a single key of a map
|
||||
@Input() results: Map<string, {"name": string, "countPublications": string, "countDatasets": string, "countSoftware": string}>;
|
||||
@Input() results: Map<string, {"name": string, "countPublications": string, "countDatasets": string, "countSoftware": string, "countOrps": string}>;
|
||||
@Input() properties:EnvProperties ;
|
||||
|
||||
public linkToSearchPublications: string = "";
|
||||
public linkToSearchResearchData: string = "";
|
||||
public linkToSearchSoftware: string = "";
|
||||
public linkToSearchOrps: string = "";
|
||||
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
@ -110,6 +126,7 @@ export class RelatedDatasourcesTabComponent {
|
|||
this.linkToSearchPublications = this.properties.searchLinkToAdvancedPublications;
|
||||
this.linkToSearchResearchData = this.properties.searchLinkToAdvancedDatasets;
|
||||
this.linkToSearchSoftware = this.properties.searchLinkToAdvancedSoftware;
|
||||
this.linkToSearchOrps = this.properties.searchLinkToAdvancedOrps;
|
||||
}
|
||||
|
||||
ngOnDestroy() {}
|
||||
|
@ -125,4 +142,8 @@ export class RelatedDatasourcesTabComponent {
|
|||
updatePage($event) {
|
||||
this.page = $event.value;
|
||||
}
|
||||
|
||||
public getKeys( map) {
|
||||
return Array.from(map.keys());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,23 +89,25 @@ export class HtmlProjectReportComponent{
|
|||
this.warningMessage="Requested size is not an integer";
|
||||
}
|
||||
|
||||
if(params['type'] && (params['type'] == "publication" || params['type'] == "dataset" || params['type'] == "software")){
|
||||
if(params['type'] && (params['type'] == "publication" || params['type'] == "dataset" || params['type'] == "software" || params['type'] == "other")){
|
||||
if(params['type'] == "publication") {
|
||||
this.resultsType = 'publication';
|
||||
} else if(params['type'] == "dataset") {
|
||||
this.resultsType = 'research data';
|
||||
} else if(params['type'] == "software") {
|
||||
this.resultsType = 'software';
|
||||
} else if(params['type'] == "other") {
|
||||
this.resultsType = "other research product";
|
||||
}
|
||||
|
||||
var title = "Project's "+this.resultsType+" report";
|
||||
var description = "project, project "+ this.resultsType +" report, funding, open access, publications, research data, software";
|
||||
var description = "project, project "+ this.resultsType +" report, funding, open access, publications, research data, software, other research products";
|
||||
this.updateTitle(title);
|
||||
this.updateDescription(description);
|
||||
|
||||
} else {
|
||||
this.showLoading = false;
|
||||
this.warningMessage="Requested type should be publication or research data or software";
|
||||
this.warningMessage="Requested type should be publication or research data or software or other research product";
|
||||
}
|
||||
|
||||
//showLoading is true if no warnings
|
||||
|
@ -158,6 +160,8 @@ export class HtmlProjectReportComponent{
|
|||
this.header2 += this.totalResults.toLocaleString('en-US') + " research data";
|
||||
} else if(this.resultsType == "software") {
|
||||
this.header2 += this.totalResults.toLocaleString('en-US') + " software";
|
||||
} else if(this.resultsType == "other research product") {
|
||||
this.header2 += this.totalResults.toLocaleString('en-US') + " other";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,6 +213,8 @@ export class HtmlProjectReportComponent{
|
|||
this.header1 += "Research Data";
|
||||
} else if(this.resultsType == "software") {
|
||||
this.header1 += "Software";
|
||||
} else if(this.resultsType == "other research product") {
|
||||
this.header1 += "Other Research Products";
|
||||
}
|
||||
|
||||
if(data != undefined) {
|
||||
|
|
|
@ -22,6 +22,9 @@ export class HtmlProjectReportService {
|
|||
} else if(type == "software") {
|
||||
resultTypeId = 'software';
|
||||
requestType = 'software'
|
||||
} else if(type == 'other research products') {
|
||||
resultTypeId = 'other';
|
||||
requestType = 'other';
|
||||
}
|
||||
|
||||
let url = csvAPIURL;
|
||||
|
|
|
@ -363,7 +363,7 @@ export class ParsingFunctions {
|
|||
return false;
|
||||
}
|
||||
|
||||
// publication & dataset & software landing : for relatedResearchResults
|
||||
// publication & dataset & software & orp landing : for relatedResearchResults
|
||||
parseRelatedResearchResults(relatedResearchResults: Map<string, { "name": string, "id": string, "date": string,
|
||||
"percentage": number, "class": string}[]>, relation: any, provenanceAction: string) :
|
||||
Map<string, { "name": string, "id": string, "date": string,
|
||||
|
@ -383,7 +383,7 @@ export class ParsingFunctions {
|
|||
return relatedResearchResults;
|
||||
}
|
||||
|
||||
// publication & dataset & software landing : for similarResearchResults
|
||||
// publication & dataset & software & orp landing : for similarResearchResults
|
||||
parseSimilarResearchResults(similarResearchResults: { "name": string, "id": string, "date": string,
|
||||
"percentage": number, "class": string}[], relation: any) :
|
||||
{ "name": string, "id": string, "date": string, "percentage": number, "class": string }[] {
|
||||
|
@ -395,7 +395,7 @@ export class ParsingFunctions {
|
|||
return similarResearchResults;
|
||||
}
|
||||
|
||||
// publication & dataset & software landing : for relatedResearchResults and similarResearchResults
|
||||
// publication & dataset & software & orp landing : for relatedResearchResults and similarResearchResults
|
||||
parseRelatedOrSimilarResearchResult(relation: any, percentageName: string): {"name": string, "id": string, "date": string, "percentage": number, "class": string} {
|
||||
let researchResult: {"name": string, "id": string, "date": string, "percentage": number, "class": string}
|
||||
= {"name": "", "id": "", "date": "", "percentage": null, "class": ""}
|
||||
|
@ -403,8 +403,10 @@ export class ParsingFunctions {
|
|||
researchResult['class'] = "publication";
|
||||
} else if(relation['resulttype'].classname == "dataset") {
|
||||
researchResult['class'] = "dataset";
|
||||
} else {
|
||||
} else if(relation['resulttype'].classname == "software") {
|
||||
researchResult['class'] = "software";
|
||||
} else if(relation['resulttype'].classname == "other") {
|
||||
researchResult['class'] = "other";
|
||||
}
|
||||
|
||||
researchResult['id'] = relation['to'].content;
|
||||
|
|
|
@ -40,6 +40,11 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
{{item['name']}}
|
||||
</a>
|
||||
|
||||
<a *ngIf="item['id'] != '' && item['name'] != '' && item['class'] == 'other'"
|
||||
[queryParams]="{orpId: item.id}" routerLinkActive="router-link-active" routerLink="/search/other">
|
||||
{{item['name']}}
|
||||
</a>
|
||||
|
||||
<a *ngIf="item['id'] != '' && item['name'] != '' && item['class'] == 'publication'"
|
||||
[queryParams]="{articleId: item.id}" routerLinkActive="router-link-active" routerLink="/search/publication">
|
||||
<!--a *ngIf="item['url'] != '' && item['name'] != '' && item['class'] == 'publication'"
|
||||
|
@ -71,7 +76,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
|
||||
export class TabTableComponent {
|
||||
@Input() percentageName: string = "Trust";
|
||||
@Input() info: { "name": string, "url": string, "date": string, "percentage": number}[];//Map<string, string[]>;
|
||||
@Input() info: { "name": string, "id": string, "date": string, "percentage": number, "class": string}[];//Map<string, string[]>;
|
||||
@Input() properties:EnvProperties;
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
public searchLinkToPublication: string;
|
||||
|
|
|
@ -157,6 +157,32 @@
|
|||
</div>
|
||||
</li>
|
||||
|
||||
<li (click)="activeTab='Other Research Products'; searchOrpsInit()">
|
||||
<a class="uk-accordion-title" href="#">
|
||||
Other Research Products
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{fetchOrps.searchUtils.totalResults | number}}
|
||||
</span>
|
||||
</a>
|
||||
<div class="uk-accordion-content">
|
||||
<errorMessages [status]="[fetchOrps.searchUtils.status]" [type]="'other research products'" tab_error_class=true></errorMessages>
|
||||
|
||||
<div *ngIf="fetchOrps.searchUtils.status == errorCodes.DONE">
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "fetchOrps.searchUtils.totalResults > 10">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])"
|
||||
routerLinkActive="router-link-active" [routerLink]="linkToSearchOrps" class="uk-button uk-button-text">
|
||||
View all {{fetchOrps.searchUtils.totalResults | number}} results
|
||||
</a>
|
||||
</div>
|
||||
<tab-result [(results)]="fetchOrps.results"
|
||||
[(status)]= "fetchOrps.searchUtils.status"
|
||||
type="other" urlParam="orpId">
|
||||
</tab-result>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li (click)="activeTab='Statistics'; statsClicked=true">
|
||||
<a class="uk-accordion-title" href="#">
|
||||
Statistics
|
||||
|
|
|
@ -16,6 +16,8 @@ import {FetchDatasets} from '../../utils/fetchEntitiesClasses/fet
|
|||
import {SearchDatasetsService} from '../../services/searchDatasets.service';
|
||||
import {FetchSoftware} from '../../utils/fetchEntitiesClasses/fetchSoftware.class';
|
||||
import {SearchSoftwareService} from '../../services/searchSoftware.service';
|
||||
import {FetchOrps} from '../../utils/fetchEntitiesClasses/fetchOrps.class';
|
||||
import {SearchOrpsService} from '../../services/searchOrps.service';
|
||||
|
||||
import {ModalLoading} from '../../utils/modal/loading.component';
|
||||
|
||||
|
@ -54,6 +56,7 @@ export class ProjectComponent{
|
|||
public publications_dynamic: string;
|
||||
public datasets_dynamic: string;
|
||||
public software_dynamic: string;
|
||||
public orps_dynamic: string;
|
||||
|
||||
public project ;
|
||||
|
||||
|
@ -62,6 +65,7 @@ export class ProjectComponent{
|
|||
public csvParams: string;
|
||||
public csvParamsDatasets: string;
|
||||
public csvParamsSoftware: string;
|
||||
public csvParamsOrps: string;
|
||||
|
||||
// Message variables
|
||||
public warningMessage = "";
|
||||
|
@ -75,6 +79,7 @@ export class ProjectComponent{
|
|||
private reloadPublications: boolean = true;
|
||||
private reloadDatasets: boolean = true;
|
||||
private reloadSoftware: boolean = true;
|
||||
private reloadOrps: boolean = true;
|
||||
|
||||
// Variables for publications, research data, software tabs
|
||||
public fetchPublications : FetchPublications;
|
||||
|
@ -83,6 +88,8 @@ export class ProjectComponent{
|
|||
public linkToSearchDatasets = "";
|
||||
public fetchSoftware: FetchSoftware;
|
||||
public linkToSearchSoftware = "";
|
||||
public fetchOrps: FetchOrps;
|
||||
public linkToSearchOrps = "";
|
||||
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
@ -100,6 +107,7 @@ properties:EnvProperties;
|
|||
private _searchPublicationsService: SearchPublicationsService,
|
||||
private _searchDatasetsService: SearchDatasetsService,
|
||||
private _searchSoftwareService: SearchSoftwareService,
|
||||
private _searchOrpsService: SearchOrpsService,
|
||||
private _reportsService: ReportsService,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
|
@ -119,9 +127,10 @@ properties:EnvProperties;
|
|||
this.fetchPublications = new FetchPublications( this._searchPublicationsService);
|
||||
this.fetchDatasets = new FetchDatasets(this._searchDatasetsService);
|
||||
this.fetchSoftware = new FetchSoftware(this._searchSoftwareService);
|
||||
this.fetchOrps = new FetchOrps(this._searchOrpsService);
|
||||
|
||||
var title = "Project";
|
||||
var description = "project, funding, open access, publications, research data, software";
|
||||
var description = "project, funding, open access, publications, research data, software, other research products";
|
||||
|
||||
this.updateTitle(title);
|
||||
this.updateDescription(description);
|
||||
|
@ -148,6 +157,7 @@ properties:EnvProperties;
|
|||
this.csvParams = "?format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact "+this.projectId+"))";
|
||||
this.csvParamsDatasets = "?format=csv-special&type=datasets&fq=(((oaftype exact result) and (resulttypeid exact dataset)) and (relprojectid exact "+this.projectId+"))";
|
||||
this.csvParamsSoftware = "?format=csv-special&type=software&fq=(((oaftype exact result) and (resulttypeid exact software)) and (relprojectid exact "+this.projectId+"))";
|
||||
this.csvParamsOrps = "?format=csv-special&type=other&fq=(((oaftype exact result) and (resulttypeid exact other)) and (relprojectid exact "+this.projectId+"))";
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
this.element.nativeElement.scrollIntoView();
|
||||
|
@ -186,11 +196,22 @@ actionsAfterLoadId(){
|
|||
+ "\n-->"
|
||||
+ "\n</script>";
|
||||
|
||||
this.orps_dynamic =
|
||||
"<script type=\"text/javascript\">"
|
||||
+ "\n<!--"
|
||||
+ "\ndocument.write('<div id=\"oa_widget\"></div>');"
|
||||
+ "\ndocument.write('<script type=\"text/javascript\""
|
||||
+ "\nsrc=\"https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId="
|
||||
+ this.projectId + "&type=other\"></script>');"
|
||||
+ "\n-->"
|
||||
+ "\n</script>";
|
||||
|
||||
this.getProjectInfo(this.projectId);
|
||||
//this.searchPublications();
|
||||
this.fetchPublications.getNumForEntity("project", this.projectId, this.properties);
|
||||
this.fetchDatasets.getNumForEntity("project", this.projectId, this.properties);
|
||||
this.fetchSoftware.getNumForEntity("project", this.projectId, this.properties);
|
||||
this.fetchOrps.getNumForEntity("project", this.projectId, this.properties);
|
||||
}
|
||||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
|
@ -208,12 +229,13 @@ actionsAfterLoadId(){
|
|||
private createClipboard() {
|
||||
if(typeof window !== 'undefined') {
|
||||
|
||||
let publ_clipboard, datasets_clipboard, software_clipboard;
|
||||
let publ_clipboard, datasets_clipboard, software_clipboard, orps_clipboard;
|
||||
let Clipboard;
|
||||
Clipboard = require('clipboard');
|
||||
publ_clipboard = new Clipboard('.publ_clipboard_btn');
|
||||
datasets_clipboard = new Clipboard('.datasets_clipboard_btn');
|
||||
software_clipboard = new Clipboard('.software_clipboard_btn');
|
||||
orps_clipboard = new Clipboard('.orps_clipboard_btn');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,6 +264,12 @@ actionsAfterLoadId(){
|
|||
this.reloadSoftware = false;
|
||||
}
|
||||
|
||||
private searchOrps() {
|
||||
this.fetchOrps.getResultsForEntity("project", this.projectId, 1, 10, this.properties);
|
||||
this.linkToSearchOrps = this.properties.searchLinkToAdvancedOrps;
|
||||
this.reloadOrps = false;
|
||||
}
|
||||
|
||||
public searchPublicationsInit() {
|
||||
console.info("searchPublicationsInit");
|
||||
if(this.reloadPublications && this.fetchPublications.searchUtils.totalResults > 0) {
|
||||
|
@ -269,6 +297,13 @@ actionsAfterLoadId(){
|
|||
}
|
||||
}
|
||||
|
||||
public searchOrpsInit() {
|
||||
console.info("searchOrpsInit");
|
||||
if(this.reloadOrps && this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
this.searchOrps();
|
||||
}
|
||||
}
|
||||
|
||||
private getProjectInfo (id:string) {
|
||||
this.warningMessage = '';
|
||||
this.errorMessage=""
|
||||
|
|
|
@ -18,6 +18,7 @@ import {ReportsServiceModule} from '../../services/reportsService.module';
|
|||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||
import {SoftwareServiceModule} from '../../services/softwareService.module';
|
||||
import {OrpsServiceModule} from '../../services/orpsService.module';
|
||||
import {TabResultModule } from '../../searchPages/searchUtils/tabResult.module';
|
||||
import { LandingModule } from '../landing-utils/landing.module';
|
||||
import {FreeGuard} from'../../login/freeGuard.guard';
|
||||
|
@ -28,7 +29,7 @@ import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
|||
CommonModule, FormsModule, RouterModule, LandingModule,
|
||||
LoadingModalModule, AlertModalModule, ErrorMessagesModule,
|
||||
TabResultModule, IFrameModule, MetricsModule, ReportsServiceModule,
|
||||
PublicationsServiceModule, DatasetsServiceModule, SoftwareServiceModule, ProjectServiceModule
|
||||
PublicationsServiceModule, DatasetsServiceModule, SoftwareServiceModule, OrpsServiceModule, ProjectServiceModule
|
||||
],
|
||||
declarations: [
|
||||
ProjectComponent
|
||||
|
|
|
@ -92,8 +92,8 @@ export class DataProviderInfo {
|
|||
"softwarerepository",
|
||||
"aggregator::softwarerepository",
|
||||
"orprepository"
|
||||
])/*,
|
||||
"otherTab": new Set<string>(
|
||||
]),
|
||||
"orpsTab": new Set<string>(
|
||||
[
|
||||
"aggregator::datarepository",
|
||||
"aggregator::pubsrepository::institutional",
|
||||
|
@ -108,7 +108,7 @@ export class DataProviderInfo {
|
|||
"softwarerepository",
|
||||
"aggregator::softwarerepository",
|
||||
"orprepository"
|
||||
])*/
|
||||
])
|
||||
/*
|
||||
,
|
||||
"metricsTab": new Set<string>(
|
||||
|
@ -166,5 +166,5 @@ export class DataProviderInfo {
|
|||
//projects: any;
|
||||
datasources: any;
|
||||
|
||||
relatedDatasources: Map<string, {"name": string, "countPublications": string, "countDatasets": string, "countSoftware": string}>;
|
||||
relatedDatasources: Map<string, {"name": string, "countPublications": string, "countDatasets": string, "countSoftware": string, "countOrps": string}>;
|
||||
}
|
||||
|
|
|
@ -2,14 +2,14 @@ export class SearchResult {
|
|||
title: { "name": string, "accessMode": string, "sc39": string};
|
||||
id:string;
|
||||
DOI:string;
|
||||
//publications & datasets & organizations:
|
||||
//publications & datasets & orp & organizations:
|
||||
projects: {"funderShortname": string, "funderName": string, "acronym": string, "title": string, "code": string, "id": string}[];
|
||||
//datasets & publications
|
||||
//datasets & orp & publications
|
||||
description: string;
|
||||
year: string;
|
||||
embargoEndDate: string;
|
||||
authors: string[];
|
||||
//datasets:
|
||||
//datasets & orp:
|
||||
publisher: string;
|
||||
//dataproviders & projects:
|
||||
organizations: { "name": string, "id": string}[];
|
||||
|
@ -31,7 +31,7 @@ export class SearchResult {
|
|||
countries: string[];
|
||||
subjects: string[];
|
||||
|
||||
//publications & datasets & software
|
||||
//publications & datasets & software & orp
|
||||
countriesForResults: string[];
|
||||
languages: string[];
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ export class SearchFields {
|
|||
|
||||
//main Entities
|
||||
//RESULTS
|
||||
//Used for datasets and publications and software
|
||||
//Used for datasets and publications and software and orp
|
||||
//In case Datasets or Software should display different fields, use seperate tables for fields
|
||||
public RESULT_REFINE_FIELDS = [
|
||||
"relfunder",
|
||||
|
@ -36,7 +36,7 @@ export class SearchFields {
|
|||
["resultacceptanceyear"]:{name:"Publication Date", type:"keyword", param:"year", operator: "ya", equalityOperator: " exact "},
|
||||
["resultdateofacceptance"]:{name:"Publication Date", type:"date", param:"date", operator: "dt", equalityOperator: " within "},
|
||||
["resultbestaccessright"]:{name:"Access Mode", type:"vocabulary", param:"access", operator: "ac", equalityOperator: " exact "},
|
||||
["collectedfrom"]:{name:"Content Provider", type:"refine", param:"datasource", operator: "dt", equalityOperator: " exact "},
|
||||
["collectedfrom"]:{name:"Content Provider", type:"refine", param:"datasource", operator: "cl", equalityOperator: " exact "},
|
||||
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", operator: "og", equalityOperator: " exact "},
|
||||
["collectedfromdatasourceid"]:{name:"Collected from Content Provider", type:"entity", param:"collectedFrom", operator: "cl", equalityOperator: " exact "}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue