1. Add proper message (for connect or explore portal) for Zenodo repository in all deposit pages at the right side of each page.

2. Library: deposit/utils/zenodoInformation.class.ts: create class to describe zenodo information (name, url, shareInZenodoUrl - only for connect portal).


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@53973 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2018-11-26 15:44:32 +00:00
parent a37b08f0d5
commit d1b2a52925
10 changed files with 160 additions and 19 deletions

View File

@ -63,15 +63,29 @@
An error occured.
</div>
<div *ngIf="(fetchDataproviders.searchUtils.totalResults == 0 && fetchDataproviders.searchUtils.status == errorCodes.DONE)
<!-- <div *ngIf="(fetchDataproviders.searchUtils.totalResults == 0 && fetchDataproviders.searchUtils.status == errorCodes.DONE)
|| fetchDataproviders.searchUtils.status == errorCodes.NONE || fetchDataproviders.searchUtils.status == errorCodes.ERROR" class = "uk-alert ">
You can still deposit your {{requestFor}} in
<a href="{{zenodo}}" target="_blank">OpenAIRE's Zenodo catch-all repository (<i class="custom-external"></i>)</a>
hosted by CERN.
</div> -->
</div>
<!-- <helper position="right" styleName=" uk-width-1-5"></helper> -->
<div class="uk-width-1-5">
<helper position="right" before="true"></helper>
<div class="uk-card uk-card-default uk-card-body portal-card">
Deposit your {{requestFor}} in
<a href="{{zenodoInformation.url}}" target="_blank" uk-tooltip="title: Zenodo is OpenAIRE's catch-all repository hosted by CERN.">
{{zenodoInformation.name}} (<i class="custom-external"></i>)</a>
<div class="uk-margin-top" *ngIf="zenodoInformation && zenodoInformation.shareInZenodoUrl">
<a href="{{zenodoInformation.shareInZenodoUrl}}">More Zenodo communities</a>
</div>
</div>
<helper position="right" styleName=" uk-width-1-5"></helper>
<helper position="right" before="false"></helper>
</div>
</div>
<button class=" uk-button uk-button-default uk-margin-small-top" type="submit" (click)="goToDeposit()">

View File

@ -17,6 +17,8 @@ import {OrganizationService} from '../../services/organization.service';
import {PiwikService} from '../../utils/piwik/piwik.service';
import { SEOService } from '../../sharedComponents/SEO/SEO.service';
import {ZenodoInformationClass} from '../utils/zenodoInformation.class';
@Component({
selector: 'deposit-by-subject-result',
templateUrl: 'depositBySubjectResult.component.html'
@ -49,6 +51,8 @@ export class DepositBySubjectResultComponent {
properties:EnvProperties;
url=null;
@Input() zenodoInformation: ZenodoInformationClass;
constructor (private _router: Router,
private route: ActivatedRoute,
private _searchDataprovidersService: SearchDataprovidersService,
@ -82,6 +86,13 @@ export class DepositBySubjectResultComponent {
this.piwiksub = this._piwikService.trackView(this.properties, "Deposit "+this.requestFor, this.piwikSiteId).subscribe();
}
if(!this.zenodoInformation.url) {
this.zenodoInformation.url = this.properties.zenodo;
}
if(!this.zenodoInformation.name) {
this.zenodoInformation.name = "Zenodo";
}
});
console.info('depositResult init');

View File

@ -1,4 +1,7 @@
import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {EnvProperties} from '../../utils/properties/env-properties';
import {ZenodoInformationClass} from '../utils/zenodoInformation.class';
@Component({
selector: 'deposit-datasets',
@ -8,7 +11,10 @@ import {Component, Input} from '@angular/core';
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container">
<deposit [compatibility]="'openaire____::21f8a223b9925c2f87c404096080b046||Registry of Research Data Repository'" [requestFor]="'Research Data'" [searchBySubjects]=true [piwikSiteId]=piwikSiteId></deposit>
<deposit [compatibility]="'openaire____::21f8a223b9925c2f87c404096080b046||Registry of Research Data Repository'"
[requestFor]="'Research Data'" [searchBySubjects]=true [piwikSiteId]=piwikSiteId
[zenodoInformation]="zenodoInformation">
</deposit>
<div>
</div>
</div>
@ -17,5 +23,22 @@ import {Component, Input} from '@angular/core';
})
export class DepositDatasetsComponent {
@Input() piwikSiteId = null;
@Input() piwikSiteId = null;
properties:EnvProperties;
@Input() zenodoInformation: ZenodoInformationClass;
constructor (private route: ActivatedRoute) {}
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
if(!this.zenodoInformation.url) {
this.zenodoInformation.url = this.properties.zenodo;
}
if(!this.zenodoInformation.name) {
this.zenodoInformation.name = "Zenodo";
}
});
}
}

View File

@ -1,14 +1,36 @@
import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {EnvProperties} from '../../utils/properties/env-properties';
import {ZenodoInformationClass} from '../utils/zenodoInformation.class';
@Component({
selector: 'deposit-datasets-result',
template: `
<deposit-result [compatibility]="'openaire____::21f8a223b9925c2f87c404096080b046||Registry of Research Data Repository'" [requestFor]="'Research Data'" [piwikSiteId]=piwikSiteId></deposit-result>
<deposit-result [compatibility]="'openaire____::21f8a223b9925c2f87c404096080b046||Registry of Research Data Repository'"
[requestFor]="'Research Data'" [piwikSiteId]=piwikSiteId
[zenodoInformation]="zenodoInformation">
</deposit-result>
`
})
export class DepositDatasetsResultComponent {
@Input() piwikSiteId = null;
@Input() zenodoInformation: ZenodoInformationClass;
properties:EnvProperties;
@Input() piwikSiteId = null;
constructor (private route: ActivatedRoute) {}
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
if(!this.zenodoInformation.url) {
this.zenodoInformation.url = this.properties.zenodo;
}
if(!this.zenodoInformation.name) {
this.zenodoInformation.name = "Zenodo";
}
});
}
}

View File

@ -52,7 +52,22 @@
</div>
</div>
</div>
<helper position="right" styleName=" uk-width-1-5"></helper>
<div class="uk-width-1-5">
<helper position="right" before="true"></helper>
<div class="uk-card uk-card-default uk-card-body portal-card">
Deposit your {{requestFor}} in
<a href="{{zenodoInformation.url}}" target="_blank" uk-tooltip="title: Zenodo is OpenAIRE's catch-all repository hosted by CERN.">
{{zenodoInformation.name}} (<i class="custom-external"></i>)</a>
<div class="uk-margin-top" *ngIf="zenodoInformation && zenodoInformation.shareInZenodoUrl">
<a href="{{zenodoInformation.shareInZenodoUrl}}">More Zenodo communities</a>
</div>
<!-- <div class="uk-margin-top" *ngIf="zenodoInformation && zenodoInformation.shareInZenodoUrl" [innerHtml]="zenodoInformation.shareInZenodoUrl"></div> -->
</div>
<helper position="right" before="false"></helper>
</div>
<!-- <helper position="right" styleName=" uk-width-1-5"></helper> -->
</div>
<helper position="bottom"></helper>
</div>

View File

@ -9,6 +9,7 @@ import {EnvProperties} from '../utils/properties/env-properties';
import {PiwikService} from '../utils/piwik/piwik.service';
import { SEOService } from '../sharedComponents/SEO/SEO.service';
import {ZenodoInformationClass} from './utils/zenodoInformation.class';
@Component({
selector: 'deposit',
@ -16,6 +17,7 @@ import { SEOService } from '../sharedComponents/SEO/SEO.service';
})
export class DepositComponent {
@Input() zenodoInformation: ZenodoInformationClass;
@Input() compatibility: string = '';
@Input() mapUrl: string = null; // optional in case i-frame is needed
@Input() searchBySubjects: boolean = false; // optional: in case search by subjects is needed

View File

@ -14,6 +14,8 @@ import {OrganizationService} from '../services/organization.service';
import {PiwikService} from '../utils/piwik/piwik.service';
import { SEOService } from '../sharedComponents/SEO/SEO.service';
import {ZenodoInformationClass} from './utils/zenodoInformation.class';
@Component({
selector: 'deposit-result',
template: `
@ -113,12 +115,26 @@ import { SEOService } from '../sharedComponents/SEO/SEO.service';
No ID for organization.
</div>
You can still deposit your {{requestFor}} in
<!--You can still deposit your {{requestFor}} in
<a href="{{zenodo}}" target="_blank">OpenAIRE's Zenodo catch-all repository (<i class="custom-external"></i>)</a>
hosted by CERN.
hosted by CERN.-->
</div>
</div>
<helper position="right" styleName=" uk-width-1-5"></helper>
<div class="uk-width-1-5">
<helper position="right" before="true"></helper>
<div class="uk-card uk-card-default uk-card-body portal-card">
Deposit your {{requestFor}} in
<a href="{{zenodoInformation.url}}" target="_blank" uk-tooltip="title: Zenodo is OpenAIRE's catch-all repository hosted by CERN.">
{{zenodoInformation.name}} (<i class="custom-external"></i>)</a>
<div class="uk-margin-top" *ngIf="zenodoInformation && zenodoInformation.shareInZenodoUrl">
<a href="{{zenodoInformation.shareInZenodoUrl}}">More Zenodo communities</a>
</div>
</div>
<helper position="right" before="false"></helper>
</div>
<!--helper position="right" styleName=" uk-width-1-5"></helper-->
</div>
<button class=" uk-button uk-button-primary uk-margin-small-top" type="submit" (click)="goToDeposit()">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-left" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span> Back
@ -133,6 +149,7 @@ import { SEOService } from '../sharedComponents/SEO/SEO.service';
})
export class DepositResultComponent {
@Input() zenodoInformation: ZenodoInformationClass;
@Input() compatibility: string = '';
@Input() piwikSiteId = null;
// Type of entity: Publication or Research Data
@ -150,9 +167,6 @@ export class DepositResultComponent {
public fetchDataproviders : FetchDataproviders;
public linkToSearchDataproviders: string = "";
// url of Zenodo
public zenodo: string;
public routerHelper:RouterHelper = new RouterHelper();
public errorCodes:ErrorCodes = new ErrorCodes();
@ -185,7 +199,6 @@ export class DepositResultComponent {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.zenodo = this.properties.zenodo;
this.updateUrl(data.envSpecific.baseLink+this._router.url);
this.url = data.envSpecific.baseLink+this._router.url;

View File

@ -1,6 +1,7 @@
import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {EnvProperties} from '../../utils/properties/env-properties';
import {ZenodoInformationClass} from '../utils/zenodoInformation.class';
@Component({
selector: 'deposit-publications',
@ -10,7 +11,10 @@ import {EnvProperties} from '../../utils/properties/env-properties';
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container">
<deposit [compatibility]="'openaire____::47ce9e9f4fad46e732cff06419ecaabb||OpenDOAR'" [requestFor]="'Publications'" [mapUrl]=mapUrl [piwikSiteId]=piwikSiteId></deposit>
<deposit [compatibility]="'openaire____::47ce9e9f4fad46e732cff06419ecaabb||OpenDOAR'"
[requestFor]="'Publications'" [mapUrl]=mapUrl [piwikSiteId]=piwikSiteId
[zenodoInformation]="zenodoInformation">
</deposit>
</div>
</div>
</div>
@ -19,6 +23,8 @@ import {EnvProperties} from '../../utils/properties/env-properties';
})
export class DepositPublicationsComponent {
@Input() zenodoInformation: ZenodoInformationClass;
public mapUrl = null;
@Input() piwikSiteId = null;
properties:EnvProperties;
@ -30,6 +36,12 @@ export class DepositPublicationsComponent {
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.mapUrl = this.properties.statisticsFrameAPIURL+"markers-demo.html";
if(!this.zenodoInformation.url) {
this.zenodoInformation.url = this.properties.zenodo;
}
if(!this.zenodoInformation.name) {
this.zenodoInformation.name = "Zenodo";
}
});
}
}

View File

@ -1,12 +1,36 @@
import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {EnvProperties} from '../../utils/properties/env-properties';
import {ZenodoInformationClass} from '../utils/zenodoInformation.class';
@Component({
selector: 'deposit-publications-result',
template: `
<deposit-result [compatibility]="'openaire____::47ce9e9f4fad46e732cff06419ecaabb||OpenDOAR'" [requestFor]="'Publications'" [piwikSiteId]=piwikSiteId></deposit-result>
<deposit-result [compatibility]="'openaire____::47ce9e9f4fad46e732cff06419ecaabb||OpenDOAR'"
[requestFor]="'Publications'" [piwikSiteId]=piwikSiteId
[zenodoInformation]="zenodoInformation">
</deposit-result>
`
})
export class DepositPublicationsResultComponent {
@Input() zenodoInformation: ZenodoInformationClass;
properties:EnvProperties;
@Input() piwikSiteId = null;
constructor (private route: ActivatedRoute) {}
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
if(!this.zenodoInformation.url) {
this.zenodoInformation.url = this.properties.zenodo;
}
if(!this.zenodoInformation.name) {
this.zenodoInformation.name = "Zenodo";
}
});
}
}

View File

@ -0,0 +1,5 @@
export class ZenodoInformationClass{
name: string = "";
url: string = "";
shareInZenodoUrl: string = "";
}