53 lines
1.9 KiB
TypeScript
53 lines
1.9 KiB
TypeScript
import {Component, Input} from '@angular/core';
|
|
import {Observable} from 'rxjs/Observable';
|
|
import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
|
//import localStorage from 'localStorage';
|
|
|
|
@Component({
|
|
selector: 'depositResult',
|
|
template: `
|
|
<div class="container">
|
|
<div class="page-header" >
|
|
<h2>Deposit Publications</h2>
|
|
</div>
|
|
|
|
<div *ngIf="organization!=undefined">
|
|
<h2>
|
|
<span>Data providers for institution: </span>
|
|
<span>
|
|
<a *ngIf="organization['url']!=''">{{organization['name']}}</a>
|
|
<p *ngIf="organization['url']==''">{{organization['name']}}</p>
|
|
</span>
|
|
</h2>
|
|
</div>
|
|
|
|
<div *ngIf="dataProviders != undefined">
|
|
<p>Please use the information/contacts shown below to deposit your publications.</p>
|
|
<showDataProviders [dataProviders]=dataProviders></showDataProviders>
|
|
</div>
|
|
|
|
<div *ngIf="dataProviders == undefined" class = "alert alert-warning">
|
|
No data providers found.
|
|
<br>
|
|
You can still deposit your publications and/or research data in
|
|
<a href="{{zenodo}}">OpenAIRE's Zenodo catch-all repository </a>
|
|
hosted by CERN.
|
|
</div>
|
|
</div>
|
|
`
|
|
})
|
|
|
|
export class DepositResultComponent {
|
|
@Input() organization: {"name": string, "url": string};
|
|
private dataProviders: { "name": string, "url": string, "type": string, "websiteUrl": string,
|
|
"organizations": {"name": string, "url": string}[]}[];
|
|
private zenodo: string;
|
|
|
|
constructor () {
|
|
this.zenodo = OpenaireProperties.getZenodoURL();
|
|
|
|
//var someVarName = sessionStorage.getItem("organization");
|
|
//console.info(JSON.parse(someVarName).name);
|
|
}
|
|
}
|