Merge remote-tracking branch 'origin/master' into angular-14
This commit is contained in:
commit
d58964f931
|
@ -94,6 +94,14 @@ const routes: Routes = [
|
|||
loadChildren: () => import('./reload/libReload.module').then(m => m.LibReloadModule),
|
||||
data: {hasSidebar: false}
|
||||
},
|
||||
{
|
||||
path: 'sdgs',
|
||||
loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule)
|
||||
},
|
||||
{
|
||||
path: 'fields-of-science',
|
||||
loadChildren: () => import('./fos/fos.module').then(m => m.LibFosModule), data: {extraOffset: 100}
|
||||
},
|
||||
{path: 'user-info', loadChildren: () => import('./login/libUser.module').then(m => m.LibUserModule)},
|
||||
{path: 'error', component: OpenaireErrorPageComponent}
|
||||
];
|
||||
|
|
|
@ -7,81 +7,70 @@ import {AggregatorInfo, PortalAggregators} from "../utils/aggregators";
|
|||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {Subscription} from "rxjs";
|
||||
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
||||
|
||||
@Component({
|
||||
selector: 'develop',
|
||||
template: `
|
||||
<div page-content>
|
||||
<div inner>
|
||||
<div *ngIf="aggregator" class="uk-container uk-container-large uk-section-small">
|
||||
<h2 class="uk-text-center">
|
||||
Develop
|
||||
</h2>
|
||||
<div class="uk-margin-medium-top uk-card uk-card-body uk-card-default">
|
||||
<h3 class="uk-text-center">Help developers with <span
|
||||
class="portal-color uk-text-bold">OpenAIRE APIs</span>
|
||||
</h3>
|
||||
<div class="uk-margin-large-top uk-margin-medium-bottom">
|
||||
Not sure where to start? Let us give you some guides and request examples.
|
||||
<div class="uk-section">
|
||||
<div class="uk-container uk-container-large">
|
||||
<h1>OpenAIRE APIs<br> for developers<span class="uk-text-primary">.</span></h1>
|
||||
</div>
|
||||
<p>
|
||||
<span class="uk-text-bold">For research outcomes </span>
|
||||
(publications, datasets, software and other research data) you can use the
|
||||
<a href="https://graph.openaire.eu/develop/api.html" target="_blank">Selective Access APIs</a>
|
||||
by adding the <span class="uk-text-lowercase">country</span> parameter.
|
||||
</p>
|
||||
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-1@s" uk-grid>
|
||||
<div>
|
||||
|
||||
<p>
|
||||
Request examples:
|
||||
</p>
|
||||
<ul class="portal-circle">
|
||||
<div class="uk-section uk-container uk-container-large">
|
||||
<div class="uk-grid uk-grid-large uk-child-width-1-2@m" uk-grid>
|
||||
<div class="uk-text-center uk-margin-large-top">
|
||||
<div class="uk-width-2-3@m uk-margin-auto@m">
|
||||
<div class="uk-icon-bg-shadow uk-icon-bg-shadow-large uk-margin-auto">
|
||||
<icon name="description" customClass="uk-text-background" [flex]="true" ratio="2.5" type="outlined" visuallyHidden="For {{openaireEntities.RESULTS}}"></icon>
|
||||
</div>
|
||||
<h3>For {{openaireEntities.RESULTS | lowercase}}</h3>
|
||||
<div class="uk-margin-bottom">
|
||||
For {{openaireEntities.RESULTS | lowercase}} ({{openaireEntities.PUBLICATIONS | lowercase}}, {{openaireEntities.DATASETS | lowercase}}, {{openaireEntities.SOFTWARE | lowercase}} and {{openaireEntities.OTHER | lowercase}}) you can use the Selective Access APIs by adding the community parameter.
|
||||
</div>
|
||||
<a class="uk-display-inline-block uk-button uk-button-text"
|
||||
href="https://graph.openaire.eu/develop/api.html" target="_blank">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<span>Selective Access APIs</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-large-top">
|
||||
<div class="uk-margin-top">
|
||||
<div>Request examples:</div>
|
||||
<ul class="uk-list uk-list-large uk-list-bullet uk-list-primary">
|
||||
<li>
|
||||
<span class="uk-text-bold">Access “Publications”</span><br>
|
||||
<span class="uk-text-bold">GET</span>
|
||||
<span
|
||||
class="uk-text-break space">https://api.openaire.eu/search/publications?country={{aggregator.valueId}}</span>
|
||||
<span>Access all </span><span class="uk-text-bolder">{{openaireEntities.RESULTS}}</span> ({{openaireEntities.PUBLICATIONS}}, {{openaireEntities.DATASETS}}, {{openaireEntities.SOFTWARE}}, {{openaireEntities.OTHER}})<br>
|
||||
<span class="uk-text-bold uk-margin-small-right">GET</span>
|
||||
<span class="">https://api.openaire.eu/search/researchProducts?country={{aggregator.valueId}}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="uk-text-bold">Access “Open Access Publications”</span><br>
|
||||
<span class="uk-text-bold">GET</span>
|
||||
<span
|
||||
class="uk-text-break space">http://api.openaire.eu/search/publications?country={{aggregator.valueId}}&OA=true</span>
|
||||
<span>Access </span><span class="uk-text-bolder">{{openaireEntities.PUBLICATIONS}}</span><br>
|
||||
<span class="uk-text-bold uk-margin-small-right">GET</span>
|
||||
<span class="">https://api.openaire.eu/search/publications?country={{aggregator.valueId}}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="uk-text-bold">Access “Datasets”</span><br>
|
||||
<span class="uk-text-bold">GET</span>
|
||||
<span
|
||||
class="uk-text-break space">https://api.openaire.eu/search/datasets?country={{aggregator.valueId}}</span>
|
||||
<span>Access </span> <span class="uk-text-bolder">Open Access {{openaireEntities.PUBLICATIONS}}</span><br>
|
||||
<span class="uk-text-bold uk-margin-small-right">GET</span>
|
||||
<span class="uk-text-break">http://api.openaire.eu/search/publications?country={{aggregator.valueId}}&OA=true</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="uk-text-bold">Access “Software”</span><br>
|
||||
<span class="uk-text-bold">GET</span>
|
||||
<span
|
||||
class="uk-text-break space">https://api.openaire.eu/search/software?country={{aggregator.valueId}}</span>
|
||||
<span>Access </span><span class="uk-text-bolder">{{openaireEntities.DATASETS}}</span><br>
|
||||
<span class="uk-text-bold uk-margin-small-right">GET</span>
|
||||
<span class="uk-text-break">https://api.openaire.eu/search/datasets?country={{aggregator.valueId}}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="uk-text-bold">Access “Other Research”</span><br>
|
||||
<span class="uk-text-bold">GET</span>
|
||||
<span
|
||||
class="uk-text-break space">https://api.openaire.eu/search/other?country={{aggregator.valueId}}</span>
|
||||
<span>Access </span><span class="uk-text-bolder">{{openaireEntities.SOFTWARE}}</span><br>
|
||||
<span class="uk-text-bold uk-margin-small-right">GET</span>
|
||||
<span class="uk-text-break">https://api.openaire.eu/search/software?country={{aggregator.valueId}}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span>Access </span><span class="uk-text-bolder">{{openaireEntities.OTHER}}</span><br>
|
||||
<span class="uk-text-bold uk-margin-small-right">GET</span>
|
||||
<span class="uk-text-break">https://api.openaire.eu/search/other?country={{aggregator.valueId}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<div class="uk-flex uk-flex-center uk-width-1-1 uk-margin-medium-top">
|
||||
<img width="350" src="assets/develop.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-large-top uk-flex uk-flex-center uk-padding">
|
||||
<div class="documentation">
|
||||
For <span
|
||||
class="uk-text-bold">more information</span> on the full potential of the OpenAIRE APIs please check
|
||||
the <a href="https://graph.openaire.eu/develop" target="_blank">OpenAIRE API Documentation</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -92,6 +81,8 @@ import {Subscription} from "rxjs";
|
|||
export class DevelopComponent implements OnInit {
|
||||
|
||||
public aggregator: AggregatorInfo = null;
|
||||
public openaireEntities = OpenaireEntities;
|
||||
|
||||
subs: Subscription[] = [];
|
||||
|
||||
constructor(private seoService: SEOService,
|
||||
|
@ -105,11 +96,9 @@ export class DevelopComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
ngOnInit() {
|
||||
|
||||
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.aggregator = PortalAggregators.getFilterInfoByMenuId(id);
|
||||
if (this.aggregator) {
|
||||
|
||||
/* Metadata */
|
||||
const url = properties.domain + properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
|
@ -123,16 +112,13 @@ export class DevelopComponent implements OnInit {
|
|||
if(properties.enablePiwikTrack && (typeof document !== 'undefined')){
|
||||
this.subs.push(this._piwikService.trackView(properties, "OpenAIRE").subscribe());
|
||||
}
|
||||
|
||||
}else {
|
||||
this.navigateToError();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private navigateToError() {
|
||||
this._router.navigate([properties.errorLink], {queryParams: {'page': this._router.url}});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import {DevelopComponent} from "./develop.component";
|
|||
import {RouterModule} from "@angular/router";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
|
||||
import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
|
||||
|
||||
@NgModule({
|
||||
declarations: [DevelopComponent],
|
||||
|
@ -13,7 +14,7 @@ import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.mo
|
|||
component: DevelopComponent,
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
])],
|
||||
]), IconsModule],
|
||||
exports: [DevelopComponent]
|
||||
})
|
||||
export class DevelopModule {
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {AggregatorFosComponent} from "./fos.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: AggregatorFosComponent,
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class LibFosRoutingModule { }
|
|
@ -0,0 +1,16 @@
|
|||
import {Component} from "@angular/core";
|
||||
import {properties} from "../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'aggregator-fos',
|
||||
template: `
|
||||
<fos [piwikSiteId]="piwikSiteId"></fos>
|
||||
`
|
||||
})
|
||||
export class AggregatorFosComponent {
|
||||
piwikSiteId = properties.piwikSiteId;
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
import {CommonModule} from "@angular/common";
|
||||
import {NgModule} from "@angular/core";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {LibFosRoutingModule} from "./fos-routing.module";
|
||||
import {FosRoutingModule} from "../openaireLibrary/fos/fos-routing.module";
|
||||
import {FosModule} from "../openaireLibrary/fos/fos.module";
|
||||
import {AggregatorFosComponent} from "./fos.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
LibFosRoutingModule,
|
||||
FosRoutingModule,
|
||||
FosModule
|
||||
],
|
||||
declarations: [
|
||||
AggregatorFosComponent
|
||||
],
|
||||
exports: [
|
||||
AggregatorFosComponent
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder
|
||||
]
|
||||
})
|
||||
export class LibFosModule { }
|
|
@ -1,9 +1,32 @@
|
|||
<div class=""> <!-- this div will have the customized color or image -->
|
||||
<div class="uk-container uk-container-large uk-flex uk-flex-center">
|
||||
<div class="uk-width-2-3@m uk-wisth-3-5@l uk-width-1-2@xl uk-margin-large-top uk-margin-large-bottom">
|
||||
<div [class.uk-invisible]="disableSelect" class="uk-margin-medium-top">
|
||||
<div>
|
||||
<div class="uk-section uk-padding-remove-bottom uk-overflow-hidden">
|
||||
<div class="uk-container uk-container-large" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
|
||||
<div class="uk-grid uk-flex-middle" uk-grid>
|
||||
<div class="uk-width-3-5@m uk-margin-large-bottom">
|
||||
<h1 class="uk-h2 uk-width-1-2@m" uk-scrollspy-class>
|
||||
Discover open linked research<span class="uk-text-primary">.</span>
|
||||
</h1>
|
||||
<div *ngIf="showContentWithNumbers" class="uk-margin-top" style="max-width: 600px;" uk-scrollspy-class>
|
||||
<div>
|
||||
A comprehensive and open dataset of research information covering
|
||||
<span *ngIf="hasPublications" class="uk-text-bold">{{numbers.publicationsSize.number|number}}<span class="uk-text-lowercase">{{numbers.publicationsSize.size}}</span> {{openaireEntities.PUBLICATIONS.toLowerCase()}}</span>
|
||||
<ng-container *ngIf="(hasPublications && (hasDatasets || hasSoftware || (hasDatasources || hasProjects || hasOrganizations)))">, </ng-container>
|
||||
<span *ngIf="hasDatasets" class="uk-text-bold">{{numbers.datasetsSize.number|number}}<span class="uk-text-lowercase">{{numbers.datasetsSize.size}}</span> {{openaireEntities.DATASETS.toLowerCase()}}</span>
|
||||
<ng-container *ngIf="(hasDatasets && (hasSoftware || (hasDatasources || hasProjects || hasOrganizations)))">, </ng-container>
|
||||
<span *ngIf="hasSoftware" class="uk-text-bold">{{numbers.softwareSize.number|number}}<span class="uk-text-lowercase">{{numbers.softwareSize.size}}</span> {{openaireEntities.SOFTWARE.toLowerCase()}} items</span>
|
||||
<ng-container *ngIf="(hasSoftware && (hasDatasources || hasProjects || hasOrganizations))">, </ng-container>
|
||||
<ng-container *ngIf="((hasPublications || hasDatasets || hasSoftware) && (hasDatasources))"> from </ng-container>
|
||||
<span *ngIf="hasDatasources" class="uk-text-bold">{{numbers.datasourcesSize.number|number}}<span class="uk-text-lowercase">{{numbers.datasourcesSize.size}}</span> {{openaireEntities.DATASOURCES.toLowerCase()}}</span>
|
||||
<ng-container *ngIf="(hasDatasources) && ((hasProjects) || hasOrganizations)">, linked to </ng-container>
|
||||
<span *ngIf="hasProjects" class="uk-text-bold">{{numbers.projectsSize.number|number}}<span class="uk-text-lowercase">{{numbers.projectsSize.size}}</span> grants</span>
|
||||
<ng-container *ngIf="hasProjects && hasOrganizations"> and </ng-container>
|
||||
<span *ngIf="hasOrganizations" class="uk-text-bold">{{numbers.organizationsSize.number|number}}<span class="uk-text-lowercase">{{numbers.organizationsSize.size}}</span> {{openaireEntities.ORGANIZATIONS.toLowerCase()}}</span>.
|
||||
</div>
|
||||
<div class="uk-text-primary">All linked together through citations and semantics.</div>
|
||||
</div>
|
||||
<div [class.uk-invisible]="disableSelect" class="uk-margin-medium-top uk-width-3-4@xl">
|
||||
<advanced-search-input #advanced (searchEmitter)="goTo(true)">
|
||||
<entities-selection [simpleView]="true" currentEntity="result" [selectedEntity]="selectedEntity" [customFilter]="customFilter"
|
||||
<entities-selection [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"
|
||||
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"
|
||||
[onChangeNavigate]="false" class="uk-width-2-5"></entities-selection>
|
||||
<div class="uk-width-expand" input #input placeholder="Scholary works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
||||
|
@ -14,70 +37,69 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-padding-small uk-margin-small-top">
|
||||
<div class="uk-text-meta">
|
||||
Try browsing by:
|
||||
</div>
|
||||
<div class="link-actions uk-flex uk-flex-column uk-flex-top uk-margin-small-top">
|
||||
<a class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-margin-small-bottom"
|
||||
routerLinkActive="router-link-active" routerLink="/sdgs">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/sdg/sdg-dot-img.svg" alt="SDGs logo" loading="lazy">
|
||||
<span class="uk-margin-small-left">Sustainable Development Goals (SDG<span class="uk-text-lowercase">s</span>)</span>
|
||||
</span>
|
||||
</a>
|
||||
<a class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
|
||||
routerLinkActive="router-link-active" routerLink="/fields-of-science">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/fos/fos-icon.svg" alt="FOS logo" loading="lazy">
|
||||
<span class="uk-margin-small-left">Fields of Science (FoS)</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-section graph-background" *ngIf="aggregator.graphSectionText && aggregator.graphSectionTitle">
|
||||
<div class="uk-container">
|
||||
<div class="uk-flex uk-flex-top uk-child-width-1-1 uk-child-width-1-2@m" uk-grid>
|
||||
<div class="uk-flex-last@m">
|
||||
<div [class.lines-10]="!readMore" class="uk-margin-bottom multi-line-ellipsis">
|
||||
<div class="uk-h3">{{aggregator.graphSectionTitle}}</div>
|
||||
<p [innerHtml]="aggregator.graphSectionText">
|
||||
</p>
|
||||
</div>
|
||||
<div *ngIf="aggregator.graphSectionText">
|
||||
<div *ngIf="!readMore" class="uk-text-center clickable" (click)="readMore = true">
|
||||
<a class="view-more-less-link">Read more</a>
|
||||
</div>
|
||||
<div *ngIf="readMore" class="uk-text-center clickable" (click)="readMore = false">
|
||||
<a class="view-more-less-link">Read less</a>
|
||||
<div class="uk-visible@m uk-width-expand" uk-scrollspy-class>
|
||||
<div class="uk-position-relative">
|
||||
<img src="assets/aggregator-assets/home/canada.png" uk-parallax="y: 500">
|
||||
<img class="uk-position-bottom-left" src="assets/aggregator-assets/home/mask.svg">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-bottom">
|
||||
<div class="uk-width-1-3 uk-width-1-2@m">
|
||||
<img src="assets/graph.svg">
|
||||
</div>
|
||||
<div class="uk-padding uk-width-1-2">
|
||||
<img src="assets/common-assets/logo-large-graph.png">
|
||||
</div>
|
||||
<div class="uk-background-muted" *ngIf="aggregator.graphSectionText && aggregator.graphSectionTitle">
|
||||
<div class="uk-section uk-section-large uk-container uk-container-large">
|
||||
<div class="uk-grid uk-child-width-1-2@m" uk-grid>
|
||||
<div>
|
||||
<div style="max-width: 600px;">
|
||||
<h2 class="uk-margin-small-top">{{aggregator.graphSectionTitle}}<span class="text-graph">.</span></h2>
|
||||
<p [innerHtml]="aggregator.graphSectionText"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-position-relative">
|
||||
<img class="uk-visible@m uk-height-1-1 uk-position-center-right" src="assets/common-assets/common/graph-nodes.svg" alt="OpenAIRE Research Graph" loading="lazy">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngIf="this.customFilter && this.customFilter.valueId == 'CA'">
|
||||
<!-- Funders Cards -->
|
||||
<div *ngIf=" funders.length" class="uk-section uk-padding-remove-bottom" style="background: linear-gradient(180deg, #FAFAFA 50%, #FFFFFF 55%);">
|
||||
<h3 class="uk-text-center uk-margin-medium-bottom">Our Canadian <span class="uk-text-bold">Funders</span></h3>
|
||||
<!-- TODO: individual component -->
|
||||
<div *ngIf="funders.length" class="uk-section uk-section-large">
|
||||
<h2 class="uk-heading-large uk-text-center uk-width-1-2@m uk-margin-auto">Our Canadian Funders<span class="uk-text-primary">.</span></h2>
|
||||
<div class="uk-section uk-container uk-container-large">
|
||||
<div class="uk-grid-match uk-grid-medium uk-child-width-1-3 uk-flex-center uk-text-center" uk-grid>
|
||||
<div class="uk-grid-match uk-grid-medium uk-child-width-1-3 uk-flex-center" uk-grid uk-height-match="target: .logo, .title, .outcomes, .percentage">
|
||||
<div *ngFor="let funder of funders">
|
||||
<div class="uk-card uk-card-default uk-card-hover uk-text-center">
|
||||
<!-- <a *ngIf="directLink && community" [href]="getCommunityPageUrl()" target="_blank"-->
|
||||
<!-- class="uk-height-1-1 uk-link-reset">-->
|
||||
<!-- <ng-container [ngTemplateOutlet]="card"></ng-container>-->
|
||||
<!-- </a>-->
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="funder.params" class="uk-height-1-1 uk-link-reset">
|
||||
<div class="uk-padding">
|
||||
<div class="uk-card-media-top uk-flex uk-flex-center uk-flex-middle uk-height-xsmall
|
||||
uk-padding-small uk-padding-remove-vertical uk-margin-top uk-margin-bottom">
|
||||
<div>
|
||||
<img *ngIf="funder.logo" src={{funder.logo}} style="max-height: 80px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-body uk-padding-remove uk-margin-small-bottom">
|
||||
<div class="uk-margin-bottom">
|
||||
<div class="uk-text-large uk-link-text">{{funder.name}}</div>
|
||||
</div>
|
||||
<div class="uk-margin-bottom">
|
||||
<h5 class="uk-text-bold uk-margin-remove number">{{funder.publications | number}}</h5> research outcomes found
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="uk-text-bold uk-margin-remove number">{{(funder.openAccessPublications / funder.publications) * 100 | number : '1.0-0'}}%</h5> Open Access
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="funder.params" class="uk-height-1-1 uk-link-reset uk-display-block">
|
||||
<div class="uk-card uk-card-default uk-card-hover uk-card-body uk-text-center funder">
|
||||
<img *ngIf="funder.logo" src={{funder.logo}} alt="{{funder.name}}" class="logo" style="max-height: 60px;">
|
||||
<div class="uk-margin-top uk-margin-bottom title">{{funder.name}}</div>
|
||||
<div class="outcomes">
|
||||
<h5 class="uk-margin-remove">{{funder.publications | number}}</h5>
|
||||
<span>Research Outcomes Found</span>
|
||||
</div>
|
||||
<div class="uk-margin-top percentage">
|
||||
<h5 class="uk-margin-remove">{{(funder.openAccessPublications / funder.publications) * 100 | number : '1.0-0'}}%</h5>
|
||||
<span>Open Access</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
@ -85,71 +107,34 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<div class="uk-section uk-padding-remove-bottom " [class.uk-hidden]="!( this.customFilter &&
|
||||
this.customFilter.valueId == 'CA')">
|
||||
<h3 class="uk-text-center uk-margin-medium-bottom">Our growing <span class="uk-text-bold">Community</span></h3>
|
||||
<numbers #numbersComponent [defaultInit]="false" backgroundClass="numbers-background"></numbers>
|
||||
<div class="uk-section uk-section-large uk-padding-remove-top uk-container uk-container-large uk-margin-large-top">
|
||||
<h2 class="uk-h1">Share your research<span class="uk-text-primary">.</span></h2>
|
||||
<div class="uk-grid uk-child-width-1-2@m uk-margin-large-top" uk-grid>
|
||||
<div>
|
||||
<div class="uk-text-center uk-margin-auto" style="max-width:420px;">
|
||||
<img src="assets/aggregator-assets/home/linking-home-img.svg" alt="Linking">
|
||||
<h5>Link your work.</h5>
|
||||
<div>
|
||||
Connect all your research. If you can’t find your research results in OpenAIRE, don’t worry! Use our Link Out service , that reaches out to many external sources via APIs, to connect your research results and claim them to your project.
|
||||
</div>
|
||||
<div class="uk-section" *ngIf="isRouteAvailable('participate/deposit/learn-how') || isRouteAvailable('participate/claim')">
|
||||
<div class="uk-padding uk-padding-remove-horizontal">
|
||||
<div class="uk-container uk-container-small">
|
||||
<div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
|
||||
<div class="uk-width-1-1@m uk-first-column">
|
||||
<div
|
||||
class="uk-margin uk-text-center uk-child-width-1-1 uk-grid-match uk-child-width-1-1@s uk-child-width-1-2@m uk-child-width-1-2@l uk-grid"
|
||||
id="page#8" uk-grid="" uk-height-match="target: .target">
|
||||
<div class="uk-first-column" *ngIf="isRouteAvailable('participate/deposit/learn-how')">
|
||||
<div class="el-item uk-card uk-card-default uk-card-medium uk-card-body">
|
||||
<div class="uk-text-center target"><img alt="Share" class="uk-width-1-3@m uk-width-small"
|
||||
src="assets/share.svg"></div>
|
||||
|
||||
<div class="el-content uk-margin uk-text-large"><span class="uk-text-bold">Deposit</span> your research
|
||||
</div>
|
||||
|
||||
<div class="uk-margin-small-top uk-text-left card-text uk-flex uk-flex-center">
|
||||
<div class="uk-margin-left uk-margin-right">Deposit in a repository of your choice.<br>
|
||||
Select an OpenAIRE compatible<br>
|
||||
repository (2.0 +) so that your research is linked to your funding information. Use Zenodo, a
|
||||
catch-all repository hosted by CERN to deposit all your research results (publications, data,
|
||||
software, etc.)
|
||||
<a class="uk-button uk-button-primary uk-margin-medium-top" routerLink="/participate/claim">
|
||||
Learn More
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="uk-button uk-button-primary uk-padding uk-padding-remove-vertical uk-margin-small-left ng-star-inserted uk-margin uk-margin-bottom uk-width-1-2"
|
||||
href="/participate/deposit/learn-how" type="submit">Deposit </a></div>
|
||||
<div>
|
||||
<div class="uk-text-center uk-margin-auto" style="max-width:420px;">
|
||||
<img src="assets/aggregator-assets/home/deposit-home-img.svg" alt="Deposit">
|
||||
<h5>Deposit your research.</h5>
|
||||
<div>
|
||||
Whether it’s publications, data or software, select an OpenAIRE compatible repository and share using community standards. Alternatively use Zenodo, a catch-all repository hosted by CERN. All results will be indexed, discoverable and accessible via Canada Explore.
|
||||
</div>
|
||||
|
||||
<div *ngIf=" isRouteAvailable('participate/claim')">
|
||||
<div class="el-item uk-card uk-card-default uk-card-medium uk-card-body">
|
||||
<div class="uk-text-center target"><img alt="Share" class="uk-width-1-3@m uk-width-small"
|
||||
src="assets/link.svg"></div>
|
||||
|
||||
<div class="el-content uk-margin uk-text-large"><span class="uk-text-bold">Link</span> your work</div>
|
||||
|
||||
<div class="uk-margin-small-top uk-text-left card-text uk-flex uk-flex-center">
|
||||
<div class="uk-margin-left uk-margin-right">Connect all your research.<br>
|
||||
If you can't find your research results in OpenAIRE, don't worry! Use our Link Out service , that
|
||||
reaches out to many<br>
|
||||
external sources via APIs, to connect<br>
|
||||
your research results and claim them to your project.
|
||||
</div>
|
||||
</div>
|
||||
<a class="uk-button uk-button-primary uk-padding uk-padding-remove-vertical uk-margin-small-left ng-star-inserted uk-margin uk-margin-bottom uk-width-1-2"
|
||||
href="/participate/claim" type="submit">Link </a></div>
|
||||
<a class="uk-button uk-button-primary uk-margin-medium-top" routerLink="/participate/deposit/learn-how">
|
||||
Learn More
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<helper *ngIf="pageContents && pageContents['left'] && pageContents['left'].length > 0"-->
|
||||
<!-- [texts]="pageContents['left']"></helper>-->
|
||||
<!--<div class="uk-section-muted"-->
|
||||
<!-- uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}">-->
|
||||
<!-- <div class="uk-container uk-container-large">-->
|
||||
<!-- <other-portals portal="explore" [properties]="properties"></other-portals>-->
|
||||
<!-- </div>-->
|
||||
<!--</div>-->
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
@import (reference) "~src/assets/openaire-theme/less/_import-variables";
|
||||
|
||||
.link-actions img {
|
||||
width: 17px;
|
||||
}
|
||||
|
||||
.uk-card.funder {
|
||||
border-bottom: 4px solid fade(@organization-color, 30%);
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
import {ChangeDetectorRef, Component, ViewChild} from '@angular/core';
|
||||
import {Subscription, zip} from 'rxjs';
|
||||
import {of, Subscription, zip} from 'rxjs';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
|
@ -24,11 +24,13 @@ import {properties} from "../../environments/environment";
|
|||
import {portalProperties} from "../../environments/environment-aggregator";
|
||||
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {NumbersComponent} from "../openaireLibrary/sharedComponents/numbers/numbers.component";
|
||||
import {Numbers, NumbersComponent} from "../openaireLibrary/sharedComponents/numbers/numbers.component";
|
||||
import {NumberUtils} from '../openaireLibrary/utils/number-utils.class';
|
||||
|
||||
@Component({
|
||||
selector: 'home',
|
||||
templateUrl: 'home.component.html',
|
||||
styleUrls: ['home.component.less']
|
||||
})
|
||||
export class HomeComponent {
|
||||
public keyword:string = "";
|
||||
|
@ -36,6 +38,7 @@ export class HomeComponent {
|
|||
public searchFields:SearchFields = new SearchFields();
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
public numbers: Numbers = {};
|
||||
showPublications: boolean = portalProperties.entities.publication.isEnabled;
|
||||
showDatasets: boolean = portalProperties.entities.dataset.isEnabled;
|
||||
showSoftware: boolean = portalProperties.entities.software.isEnabled;
|
||||
|
@ -44,6 +47,7 @@ export class HomeComponent {
|
|||
showProjects: boolean = portalProperties.entities.project.isEnabled;
|
||||
showDataProviders: boolean = portalProperties.entities.datasource.isEnabled;
|
||||
properties: EnvProperties = properties;
|
||||
public openaireEntities = OpenaireEntities;
|
||||
public readMore: boolean = false;
|
||||
|
||||
private noOfFunders = 3;
|
||||
|
@ -66,7 +70,9 @@ export class HomeComponent {
|
|||
customFilter:SearchCustomFilter= null;
|
||||
aggregatorId;
|
||||
aggregator:AggregatorInfo;
|
||||
@ViewChild('numbersComponent', { static: true }) numbersComponent: NumbersComponent;
|
||||
// @ViewChild('numbersComponent', { static: true }) numbersComponent: NumbersComponent;
|
||||
|
||||
numbersLimit: number = 100;
|
||||
|
||||
constructor (
|
||||
private route: ActivatedRoute,
|
||||
|
@ -131,22 +137,19 @@ export class HomeComponent {
|
|||
this.showDataProviders = !!showEntity["datasource"];
|
||||
this.showOrganizations = !!showEntity["organization"];
|
||||
if(this.showPublications){
|
||||
this.resultTypes.values.push({name: OpenaireEntities.PUBLICATIONS , id:"publications",selected:false, number:0});
|
||||
this.resultTypes.values.push({name: this.openaireEntities.PUBLICATIONS , id:"publications",selected:false, number:0});
|
||||
}
|
||||
if(this.showDatasets){
|
||||
this.resultTypes.values.push({name: OpenaireEntities.DATASETS , id:"datasets",selected:false, number:0});
|
||||
this.resultTypes.values.push({name: this.openaireEntities.DATASETS , id:"datasets",selected:false, number:0});
|
||||
}
|
||||
if(this.showSoftware){
|
||||
this.resultTypes.values.push({name: OpenaireEntities.SOFTWARE , id:"software",selected:false, number:0});
|
||||
this.resultTypes.values.push({name: this.openaireEntities.SOFTWARE , id:"software",selected:false, number:0});
|
||||
}
|
||||
if(this.showOrp){
|
||||
this.resultTypes.values.push({name: OpenaireEntities.OTHER , id:"other",selected:false, number:0});
|
||||
}
|
||||
if(this.numbersComponent) {
|
||||
this.numbersComponent.init(false, false, this.showPublications, this.showDatasets,
|
||||
this.showSoftware, this.showOrp, this.showProjects, this.showDataProviders, this.customFilter ?
|
||||
StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId))) : '');
|
||||
this.resultTypes.values.push({name: this.openaireEntities.OTHER , id:"other",selected:false, number:0});
|
||||
}
|
||||
this.init(false, false, this.showPublications, this.showDatasets, this.showSoftware, this.showOrp, this.showProjects, this.showDataProviders, this.showOrganizations,
|
||||
this.customFilter ? StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId))) : '');
|
||||
this.getFunders();
|
||||
}
|
||||
},
|
||||
|
@ -281,7 +284,6 @@ export class HomeComponent {
|
|||
}
|
||||
}
|
||||
});
|
||||
// console.log(this.funders);
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -295,8 +297,87 @@ export class HomeComponent {
|
|||
return false;
|
||||
}
|
||||
|
||||
init(getDatasetsLinked = false, getSoftwareLinked = false, getPublications = true, getDatasets = true,
|
||||
getSoftware = true, getOther = true, getProjects = true, getDataProviders = true, getOrganizations = true, refineValue: string = null) {
|
||||
let refineParams = (refineValue) ? ('&fq=' + refineValue) : null;
|
||||
this.subs.push(zip(
|
||||
(getPublications) ? this._searchResearchResultsService.numOfSearchResults('publication', '', this.properties, refineParams) : of(0),
|
||||
(getDatasets) ? this._searchResearchResultsService.numOfSearchResults('dataset', '', this.properties, refineParams) : of(0),
|
||||
(getDatasetsLinked) ? this._searchResearchResultsService.numOfSearchResultsLinkedToPub("dataset", this.properties) : of(0),
|
||||
(getSoftware) ? this._searchResearchResultsService.numOfSearchResults('software', '', this.properties, refineParams) : of(0),
|
||||
(getSoftwareLinked) ? this._searchResearchResultsService.numOfSearchResultsLinkedToPub("software", this.properties) : of(0),
|
||||
(getOther) ? this._searchResearchResultsService.numOfSearchResults('other', '', this.properties, refineParams) : of(0),
|
||||
(getProjects) ? this._refineFieldResultsService.getRefineFieldsResultsByEntityName(['funder'], 'project', this.properties, refineParams) : of(0),
|
||||
(getDataProviders) ? this._searchDataprovidersService.numOfSearchDataproviders('', this.properties, refineParams) : of(0),
|
||||
(getOrganizations) ? this._searchOrganizationsService.numOfSearchOrganizations2('', this.properties, refineParams) : of(0)
|
||||
).subscribe((data: any[]) => {
|
||||
if (data[0] && data[0] > 0) {
|
||||
this.numbers.publicationsSize = NumberUtils.roundNumber(data[0]);
|
||||
}
|
||||
if (data[1] && data[1] > 0) {
|
||||
this.numbers.datasetsSize = NumberUtils.roundNumber(data[1]);
|
||||
}
|
||||
if (data[2] && data[2] > 0) {
|
||||
this.numbers.datasetsLinkedSize = NumberUtils.roundNumber(data[2]);
|
||||
}
|
||||
if (data[3] && data[3] > 0) {
|
||||
this.numbers.softwareSize = NumberUtils.roundNumber(data[3]);
|
||||
}
|
||||
if (data[4] && data[4] > 0) {
|
||||
this.numbers.softwareLinkedSize = NumberUtils.roundNumber(data[4]);
|
||||
}
|
||||
if (data[5] && data[5] > 0) {
|
||||
this.numbers.otherSize = NumberUtils.roundNumber(data[5]);
|
||||
}
|
||||
if (data[6][0] && data[6][0] > 0) {
|
||||
this.numbers.projectsSize = NumberUtils.roundNumber(data[6][0]);
|
||||
}
|
||||
if (data[6][1] && data[6][1].length > 0 && data[6][1][0].filterId == 'funder' && data[6][1][0].values) {
|
||||
this.numbers.fundersSize = NumberUtils.roundNumber(data[6][1][0].values.length);
|
||||
}
|
||||
if (data[7] && data[7] > 0) {
|
||||
this.numbers.datasourcesSize = NumberUtils.roundNumber(data[7]);
|
||||
}
|
||||
if (data[8] && data[8] > 0) {
|
||||
this.numbers.organizationsSize = NumberUtils.roundNumber(data[8]);
|
||||
}
|
||||
}, err => {
|
||||
this.handleError('Error getting numbers', err);
|
||||
}));
|
||||
}
|
||||
|
||||
disableSelectChange(event: boolean) {
|
||||
this.disableSelect = event;
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
|
||||
public get showContentWithNumbers() {
|
||||
if (this.numbers && (this.hasPublications || this.hasDatasets || this.hasSoftware || this.hasDatasources || this.hasProjects || this.hasOrganizations)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public get hasPublications() {
|
||||
return this.showPublications && this.numbers.publicationsSize && this.numbers.publicationsSize.number >= this.numbersLimit;
|
||||
}
|
||||
|
||||
public get hasDatasets() {
|
||||
return this.showDatasets && this.numbers.datasetsSize && this.numbers.datasetsSize.number >= this.numbersLimit;
|
||||
}
|
||||
|
||||
public get hasSoftware() {
|
||||
return this.showSoftware && this.numbers.softwareSize && this.numbers.softwareSize.number >= this.numbersLimit;
|
||||
}
|
||||
|
||||
public get hasDatasources() {
|
||||
return this.showDataProviders && this.numbers.datasourcesSize && this.numbers.datasourcesSize.number >= this.numbersLimit;
|
||||
}
|
||||
|
||||
public get hasProjects() {
|
||||
return this.showProjects && this.numbers.projectsSize && this.numbers.projectsSize.number >= this.numbersLimit;
|
||||
}
|
||||
|
||||
public get hasOrganizations() {
|
||||
return this.showOrganizations && this.numbers.organizationsSize && this.numbers.organizationsSize.number >= this.numbersLimit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {AggregatorSdgComponent} from "./sdg.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: AggregatorSdgComponent,
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class LibSdgRoutingModule { }
|
|
@ -0,0 +1,26 @@
|
|||
import {Component} from "@angular/core";
|
||||
import {properties} from "../../environments/environment";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {AggregatorInfo, PortalAggregators} from "../utils/aggregators";
|
||||
|
||||
@Component({
|
||||
selector: 'aggregator-sdg',
|
||||
template: `
|
||||
<sdg [piwikSiteId]="piwikSiteId" [customFilter]="customFilter"></sdg>
|
||||
`
|
||||
})
|
||||
export class AggregatorSdgComponent {
|
||||
piwikSiteId = properties.piwikSiteId;
|
||||
aggregatorId;
|
||||
aggregator: AggregatorInfo;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
|
||||
constructor() {
|
||||
this.aggregatorId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.aggregator = PortalAggregators.getFilterInfoByMenuId(this.aggregatorId);
|
||||
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(this.aggregator);
|
||||
}
|
||||
|
||||
public ngOnInit() {}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
import {CommonModule} from "@angular/common";
|
||||
import {NgModule} from "@angular/core";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {LibSdgRoutingModule} from "./sdg-routing.module";
|
||||
import {SdgRoutingModule} from "../openaireLibrary/sdg/sdg-routing.module";
|
||||
import {SdgModule} from "../openaireLibrary/sdg/sdg.module";
|
||||
import {AggregatorSdgComponent} from "./sdg.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
LibSdgRoutingModule,
|
||||
SdgRoutingModule,
|
||||
SdgModule
|
||||
],
|
||||
declarations: [
|
||||
AggregatorSdgComponent
|
||||
],
|
||||
exports: [
|
||||
AggregatorSdgComponent
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder
|
||||
]
|
||||
})
|
||||
export class LibSdgModule { }
|
|
@ -74,7 +74,7 @@ export class PortalAggregators {
|
|||
new AggregatorInfo("greece", "Greek Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "GR", "Greece")
|
||||
];
|
||||
static disabled = {
|
||||
"canada": {pages: ["/search/find/services"], entities: ["software", "service"]},
|
||||
"canada": {pages: ["/search/find/services"], entities: ["service"]},
|
||||
"italy": {pages: ["/search/find/services"], entities: ["service"]},
|
||||
"greece": {pages: ["/search/find/services"], entities: ["service"]}
|
||||
};
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 169 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 81 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 677.14 1140.24"><defs><style>.cls-1{fill:#f9f9f9;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M275.51,330.92c-105.95,0-191.84,85.89-191.84,191.83s85.89,191.84,191.84,191.84S467.35,628.7,467.35,522.75,381.46,330.92,275.51,330.92Z"/><path class="cls-1" d="M0,0V1140.24H677.14V0ZM618,917.23,435.6,740.92h0a269.38,269.38,0,0,1-160.09,52.41C126.07,793.34,4.92,672.19,4.92,522.75S126.07,252.16,275.51,252.16,546.1,373.31,546.1,522.75a269.46,269.46,0,0,1-54.9,163.42h0l181,175Z"/></g></g></svg>
|
After Width: | Height: | Size: 608 B |
Loading…
Reference in New Issue