2022-05-30 15:52:28 +02:00
import { Component , Input , ViewChild } from '@angular/core' ;
2019-07-15 18:14:27 +02:00
import { ZenodoInformationClass } from './utils/zenodoInformation.class' ;
2019-07-16 13:24:13 +02:00
import { EnvProperties } from "../utils/properties/env-properties" ;
2019-07-22 11:16:50 +02:00
import { ActivatedRoute , Router } from "@angular/router" ;
2019-07-18 13:41:02 +02:00
import { PiwikService } from "../utils/piwik/piwik.service" ;
2019-07-22 11:16:50 +02:00
import { HelperService } from "../utils/helper/helper.service" ;
2019-07-31 12:41:06 +02:00
import { RouterHelper } from "../utils/routerHelper.class" ;
2019-08-02 16:55:32 +02:00
import { SEOService } from "../sharedComponents/SEO/SEO.service" ;
import { Meta , Title } from "@angular/platform-browser" ;
2020-04-27 14:54:48 +02:00
import { Breadcrumb } from "../utils/breadcrumbs/breadcrumbs.component" ;
2020-11-11 15:43:13 +01:00
import { properties } from "../../../environments/environment" ;
import { Subscriber } from "rxjs" ;
2022-05-30 15:52:28 +02:00
import { FullScreenModalComponent } from '../utils/modal/full-screen-modal/full-screen-modal.component' ;
2019-07-15 18:14:27 +02:00
@Component ( {
selector : 'deposit-first-page' ,
template : `
2022-05-30 15:52:28 +02:00
< div class = "deposit" >
< div class = "uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom" >
2022-06-02 16:44:56 +02:00
< div class = "uk-padding-small uk-padding-remove-horizontal" >
2022-05-30 15:52:28 +02:00
< breadcrumbs [ breadcrumbs ] = " breadcrumbs " > < / breadcrumbs >
< / div >
< / div >
2022-07-04 21:10:38 +02:00
< div class = "uk-container uk-container-large uk-section" uk - scrollspy = "target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200" >
2022-05-30 15:52:28 +02:00
< div class = "uk-grid uk-grid-large uk-grid-stack uk-padding-small" uk - grid >
< div class = "uk-width-3-5@m uk-width-1-1@s uk-flex uk-flex-column uk-flex-center" >
< div style = "max-width: 600px;" >
< h1 class = "uk-h2" uk - scrollspy - class > Deposit or publish your research in Open Access . < / h1 >
< div class = "uk-text-large uk-margin-medium-top" uk - scrollspy - class >
Find the appropriate repository to deposit your research .
< / div >
< div class = "uk-margin-medium-top" uk - scrollspy - class >
2022-05-30 16:56:47 +02:00
< a class = "uk-button uk-button-primary uk-text-uppercase" ( click ) = " openFsModal ( ) " > Get Started < / a >
2022-05-30 15:52:28 +02:00
< / div >
< / div >
< / div >
< div class = "uk-width-2-5@m uk-width-1-1@s uk-text-center" uk - scrollspy - class >
2022-06-22 14:36:15 +02:00
< img [ src ] = " assetsPath + ' / deposit / deposit - hero - envelop.svg ' " loading = "lazy" alt = "deposit hero image" >
2022-05-30 15:52:28 +02:00
< / div >
< / div >
< / div >
< div class = "uk-container uk-container-large uk-section" >
< div class = "uk-width-2-3@m uk-margin-auto" >
< div class = "uk-grid uk-grid-large uk-grid-stack" uk - grid >
< div class = "uk-width-1-3@m" >
2022-06-22 14:36:15 +02:00
< img [ src ] = " assetsPath + ' / deposit / deposit - step - numbers.svg ' " loading = "lazy" alt = "deposit steps/numbers image" >
2022-05-30 15:52:28 +02:00
< / div >
< div class = "uk-width-2-3@m" >
< div class = "uk-margin-medium-bottom" >
< div class = "uk-h6" >
1 . Find the appropriate repository or journal
< / div >
< div >
Find the appropriate repository to deposit your research products of any type ( publication , data , software , other ) or to include in your data management plan . Search and browse for OpenAIRE compliant repositories registered in OpenDOAR and re3data .
Looking for Open Access journals ? Find those that suit your needs among the journals registered in the Directory of Open Access Journals ( DOAJ ) .
To know more , read the OpenAIRE Open Access primer ( < a target = "_blank" href = "https://www.openaire.eu/oa-basics" > https : //www.openaire.eu/oa-basics</a>)
< / div >
< / div >
< div class = "uk-margin-medium-bottom" >
< div class = "uk-h6" >
2 . Deposit
< / div >
< div >
2022-06-30 17:24:08 +02:00
Find the repository to deposit your research or use the Zenodo < span * ngIf = "communityId && communityId != 'openaire'" > communities suggested by the community curators < / span > < span * ngIf = "!communityId || communityId == 'openaire'" > repository < / span > .
2022-05-30 15:52:28 +02:00
< / div >
< / div >
< div class = "uk-margin-medium-bottom" >
< div class = "uk-h6" >
3 . Publish
< / div >
< div >
Find the Open Access journals that suit your needs among those registered in the Directory of Open Access Journals ( DOAJ ) .
< / div >
< / div >
< / div >
< / div >
< div class = "uk-section uk-section-large uk-margin-large-top" >
2022-06-30 17:24:08 +02:00
<!-- RESTORE HELP TEXT - EXPLORE -- >
2022-05-30 15:52:28 +02:00
<!-- < helper * ngIf = "pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [ texts ] = " pageContents [ ' bottom ' ] " > < / helper > -- >
< div >
< div class = "uk-h6 uk-margin-medium-bottom" >
How to comply with funder Open Access policies
< / div >
< div >
< ul class = "uk-list uk-list-disc" >
< li class = "uk-margin-bottom" >
Read the < a href = "https://www.openaire.eu/how-to-comply-to-h2020-mandates-for-publications" target = "_blank" > < span > OpenAIRE guide to learn how to comply with EC H2020 Open Access policy on publications < / span > < span class = "custom-external custom-icon space" > < / span > < / a >
< / li >
< li class = "uk-margin-bottom" >
Read the < a href = "https://www.openaire.eu/how-to-comply-to-h2020-mandates-for-data" target = "_blank" > < span > OpenAIRE guide to learn how to comply with EC H2020 Open Access policy on research data < / span > < span class = "custom-external custom-icon space" > < / span > < / a >
< / li >
< li class = "uk-margin-bottom" >
If you want to know about National Open Access policies , please check them out < a href = "https://www.openaire.eu/frontpage/country-pages" target = "_blank" > < span > here < / span > < span class = "custom-external custom-icon space" > < / span > < / a >
< / li >
< li class = "uk-margin-bottom" >
All OpenAIRE guides can be found < a href = "https://www.openaire.eu/guides" target = "_blank" > < span > here < / span > < span class = "custom-external custom-icon space" > < / span > < / a >
< / li >
< / ul >
< / div >
< / div >
< / div >
< / div >
2022-05-30 16:56:47 +02:00
< / div >
< / div >
2022-07-04 21:10:38 +02:00
< fs - modal # fsModal classTitle = "" >
< div class = "uk-height-1-1 uk-flex uk-flex-column uk-flex-middle" >
< h2 class = "uk-margin-large-bottom" >
2022-05-30 16:56:47 +02:00
Find the appropriate repository .
2022-07-04 21:10:38 +02:00
< / h2 >
2022-07-13 09:37:12 +02:00
< div class = "uk-grid uk-grid-large" uk - height - match = "target: .uk-card-body, .uk-tile-primary;" uk - grid >
2022-05-30 16:56:47 +02:00
< div >
< div class = "uk-card uk-card-default uk-text-center" style = "width: 360px;" >
< div class = "uk-card-body uk-text-small" >
< img src = "assets/common-assets/common/Logo_Horizontal.png" alt = "OpenAIRE logo" class = "uk-width-small uk-margin-bottom" >
< div >
Search and browse for < span class = "uk-text-bold" > OpenAIRE compliant repositories < / span > registered in OpenDOAR and re3data .
2022-05-30 15:52:28 +02:00
< / div >
< / div >
2022-07-04 21:10:38 +02:00
< div class = "uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light" >
< a class = "uk-button uk-button-text" routerLink = "/participate/deposit/search" ( click ) = " closeFsModal ( ) " >
OpenAIRE compliant repositories
< / a >
< / div >
2022-05-30 16:56:47 +02:00
< / div >
< / div >
< div >
< div class = "uk-card uk-card-default uk-text-center" style = "width: 360px;" >
< div class = "uk-card-body uk-text-small" >
< img src = "assets/common-assets/common/logo-zenodo.png" alt = "Zenodo logo" class = "uk-width-small uk-margin-bottom" >
2022-06-22 14:36:15 +02:00
< div class = "uk-width-2-3@m uk-margin-auto" >
Deposit your research in < span class = "uk-text-bold" > Zenodo repository < / span >
2022-05-30 15:52:28 +02:00
< / div >
< / div >
2022-07-04 21:10:38 +02:00
< div * ngIf = "zenodoInformation.shareInZenodoUrl" class = "uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light" >
< a class = "uk-button uk-button-text" [ routerLink ] = " zenodoInformation.shareInZenodoUrl " ( click ) = " closeFsModal ( ) " >
2022-05-30 16:56:47 +02:00
Use related Zenodo communities
2022-07-04 21:10:38 +02:00
< / a >
< / div >
< div * ngIf = "!zenodoInformation.shareInZenodoUrl"
class = "uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light" >
2022-07-07 08:57:11 +02:00
< a class = "uk-button uk-button-text custom-external" [ href ] = " zenodoInformation.url " target = "_blank" >
2022-05-30 16:56:47 +02:00
Zenodo Repository
2022-07-04 21:10:38 +02:00
< / a >
< / div >
2022-05-30 15:52:28 +02:00
< / div >
< / div >
2022-05-30 16:56:47 +02:00
< / div >
< / div >
< / f s - m o d a l >
2022-05-30 15:52:28 +02:00
` ,
2019-07-15 18:14:27 +02:00
} )
export class DepositFirstPageComponent {
2019-08-02 16:55:32 +02:00
public url : string = null ;
2020-08-19 12:16:43 +02:00
public title : string = "Deposit or publish your research in Open Access" ;
2019-08-02 16:55:32 +02:00
2019-07-16 13:24:13 +02:00
@Input ( ) public zenodoInformation : ZenodoInformationClass = new ZenodoInformationClass ( ) ;
2019-07-15 18:14:27 +02:00
@Input ( ) piwikSiteId = null ;
2022-06-22 14:36:15 +02:00
@Input ( ) assetsPath : string = 'assets/common-assets/common' ;
2019-07-15 18:14:27 +02:00
2019-07-22 11:16:50 +02:00
@Input ( ) communityId = null ;
public pageContents = null ;
public divContents = null ;
2019-07-18 18:02:01 +02:00
2019-07-15 18:14:27 +02:00
public keyword : string ;
2019-07-31 12:41:06 +02:00
public depositRoute : string ;
2019-10-31 12:10:39 +01:00
public searchPlaceHolder = "Search by title, country, organization, subject, type..." ;
2019-07-16 13:24:13 +02:00
properties :EnvProperties ;
2019-07-31 12:41:06 +02:00
public routerHelper :RouterHelper = new RouterHelper ( ) ;
2020-04-27 14:54:48 +02:00
@Input ( ) showBreadcrumb :boolean = false ;
breadcrumbs :Breadcrumb [ ] = [ ] ;
2020-11-11 15:43:13 +01:00
subscriptions = [ ] ;
2022-05-30 15:52:28 +02:00
@ViewChild ( 'fsModal' , { static : true } ) fsModal : FullScreenModalComponent ;
2019-07-22 11:16:50 +02:00
constructor ( private route : ActivatedRoute , private _piwikService :PiwikService ,
2022-06-22 14:36:15 +02:00
private helper : HelperService ,
private _router : Router ,
private _meta : Meta , private _title : Title ,
private seoService : SEOService ) {
2019-08-02 16:55:32 +02:00
}
2019-07-22 11:16:50 +02:00
2019-07-15 18:14:27 +02:00
ngOnInit() {
2020-11-11 15:43:13 +01:00
this . properties = properties ;
2020-09-18 09:57:42 +02:00
this . url = this . properties . domain + this . properties . baseLink + this . _router . url ;
2019-08-02 16:55:32 +02:00
this . seoService . createLinkForCanonicalURL ( this . url , false ) ;
2020-08-19 12:16:43 +02:00
var description = "Find the appropriate repository or journal or use Zenodo repository to deposit your research and publish in the Open Access journals that suit your needs." ;
2019-08-02 16:55:32 +02:00
this . updateTitle ( this . title ) ;
this . updateDescription ( description ) ;
this . updateUrl ( this . url ) ;
2019-07-31 12:41:06 +02:00
this . depositRoute = this . properties . depositSearchPage ;
2019-07-22 11:16:50 +02:00
//this.getDivContents();
this . getPageContents ( ) ;
2019-07-16 13:24:13 +02:00
if ( ! this . zenodoInformation ) {
this . zenodoInformation = new ZenodoInformationClass ( ) ;
}
if ( ! this . zenodoInformation . shareInZenodoUrl ) {
this . zenodoInformation . url = this . properties . zenodo ;
}
if ( ! this . zenodoInformation . name ) {
this . zenodoInformation . name = "Zenodo" ;
}
2019-07-18 13:41:02 +02:00
if ( this . properties . enablePiwikTrack && ( typeof document !== 'undefined' ) ) {
2020-11-11 15:43:13 +01:00
this . subscriptions . push ( this . _piwikService . trackView ( this . properties , this . title , this . piwikSiteId ) . subscribe ( ) ) ;
2019-07-18 13:41:02 +02:00
}
2020-04-27 14:54:48 +02:00
this . breadcrumbs . push ( { name : 'home' , route : '/' } , { name : "Deposit" , route : null } ) ;
2019-07-15 18:14:27 +02:00
}
2019-07-18 13:41:02 +02:00
2019-07-22 11:16:50 +02:00
public getPageContents() {
2020-11-11 15:43:13 +01:00
this . subscriptions . push ( this . helper . getPageHelpContents ( this . properties , this . communityId , this . _router . url ) . subscribe ( contents = > {
2019-07-22 11:16:50 +02:00
this . pageContents = contents ;
2020-11-11 15:43:13 +01:00
} ) ) ;
2019-07-22 11:16:50 +02:00
}
public getDivContents() {
2020-11-11 15:43:13 +01:00
this . subscriptions . push ( this . helper . getDivHelpContents ( this . properties , this . communityId , this . _router . url ) . subscribe ( contents = > {
2019-07-22 11:16:50 +02:00
this . divContents = contents ;
2020-11-11 15:43:13 +01:00
} ) ) ;
2019-07-22 11:16:50 +02:00
}
2019-07-18 13:41:02 +02:00
ngOnDestroy() {
2020-11-11 15:43:13 +01:00
this . subscriptions . forEach ( subscription = > {
if ( subscription instanceof Subscriber ) {
subscription . unsubscribe ( ) ;
}
} ) ;
2019-07-18 13:41:02 +02:00
}
2019-08-02 16:55:32 +02:00
private updateDescription ( description :string ) {
this . _meta . updateTag ( { content :description } , "name='description'" ) ;
this . _meta . updateTag ( { content :description } , "property='og:description'" ) ;
}
private updateTitle ( title :string ) {
var _prefix = "" ;
if ( ! this . communityId ) {
_prefix = "OpenAIRE | " ;
}
var _title = _prefix + ( ( title . length > 50 ) ? title . substring ( 0 , 50 ) : title ) ;
this . _title . setTitle ( _title ) ;
this . _meta . updateTag ( { content :_title } , "property='og:title'" ) ;
}
private updateUrl ( url :string ) {
this . _meta . updateTag ( { content :url } , "property='og:url'" ) ;
}
2022-05-30 15:52:28 +02:00
2022-05-30 16:56:47 +02:00
public openFsModal() {
this . fsModal . open ( ) ;
}
public closeFsModal() {
2022-07-04 10:32:24 +02:00
this . fsModal . cancel ( ) ;
2022-05-30 16:56:47 +02:00
}
2019-07-15 18:14:27 +02:00
}