174 lines
5.4 KiB
TypeScript
174 lines
5.4 KiB
TypeScript
|
import { Component, Directive, ElementRef, Renderer, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
||
|
import {Observable} from 'rxjs/Observable';
|
||
|
import { OpenaireProperties} from './utils/openaireProperties';
|
||
|
@Component({
|
||
|
//changeDetection: ChangeDetectionStrategy.Default,
|
||
|
//encapsulation: ViewEncapsulation.Emulated,
|
||
|
selector: 'app-root',
|
||
|
styles: [`
|
||
|
`],
|
||
|
template: `
|
||
|
|
||
|
<navbar portal="explore" onlyTop=false [userMenuItems]=userMenuItems [menuItems]=menuItems [logInUrl]=logInUrl [logOutUrl]=logOutUrl></navbar>
|
||
|
<div class="custom-main-content" >
|
||
|
<main>
|
||
|
<router-outlet></router-outlet>
|
||
|
</main>
|
||
|
</div>
|
||
|
<feedback *ngIf= "isClient" portalName="Explore" [feedbackmail]=feedbackmail></feedback>
|
||
|
<cookie-law *ngIf= "isClient" position="bottom">
|
||
|
OpenAIRE uses cookies in order to function properly.<br>
|
||
|
Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible.
|
||
|
By using the OpenAIRE portal you accept our use of cookies. <a href="//ec.europa.eu/ipg/basics/legal/cookies/index_en.htm" target="_blank"> Read more <span class="uk-icon">
|
||
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg>
|
||
|
</span></a>
|
||
|
</cookie-law>
|
||
|
<bottom *ngIf= "isClient"></bottom>
|
||
|
|
||
|
`
|
||
|
|
||
|
})
|
||
|
export class AppComponent {
|
||
|
isClient:boolean = false;
|
||
|
feedbackmail:string = OpenaireProperties.getFeedbackMail();
|
||
|
|
||
|
|
||
|
userMenuItems = [
|
||
|
{title: "My profile",
|
||
|
url:"",
|
||
|
route:"",
|
||
|
needsAuthorization:false},
|
||
|
{title: "My claims",
|
||
|
url:"",
|
||
|
route:"/myclaims",
|
||
|
needsAuthorization:false},
|
||
|
{title: "Manage all claims",
|
||
|
url:"",
|
||
|
route:"/claims",
|
||
|
needsAuthorization:true
|
||
|
}
|
||
|
|
||
|
];
|
||
|
|
||
|
menuItems = [
|
||
|
{rootItem:{
|
||
|
id:"search",
|
||
|
title: "Search",
|
||
|
url:"",
|
||
|
route:"/search/find"
|
||
|
|
||
|
},items:[
|
||
|
{title: "Publications",
|
||
|
url:"",
|
||
|
route:"/search/find/publications",
|
||
|
entitiesRequired:["publication"],
|
||
|
routeRequired:["/search/find/publications"]},
|
||
|
{title: "Research Data",
|
||
|
url:"",
|
||
|
route:"/search/find/datasets",
|
||
|
entitiesRequired:["dataset"],
|
||
|
routeRequired:["/search/find/datasets"]},
|
||
|
{title: "Software",
|
||
|
url:"",
|
||
|
route:"/search/find/software",
|
||
|
entitiesRequired:["software"],
|
||
|
routeRequired:["/search/find/software"]},
|
||
|
{title: "Projects",
|
||
|
url:"",
|
||
|
route:"/search/find/projects",
|
||
|
entitiesRequired:["projects"],
|
||
|
routeRequired:["/search/find/projects"]},
|
||
|
{title: "Content Providers",
|
||
|
url:"",
|
||
|
route:"/search/find/dataproviders",
|
||
|
entitiesRequired:["projects"],
|
||
|
routeRequired:["/search/find/projects"]},
|
||
|
{title: "Organizations",
|
||
|
url:"",
|
||
|
route:"/search/find/organizations",
|
||
|
entitiesRequired:["projects"],
|
||
|
routeRequired:["/search/find/projects"]},
|
||
|
]
|
||
|
},
|
||
|
{rootItem:{
|
||
|
id:"share",
|
||
|
title: "Share",
|
||
|
url:"",
|
||
|
route:""
|
||
|
|
||
|
},items:[
|
||
|
{title: "Publications",
|
||
|
url:"",
|
||
|
route:"/participate/deposit-publications",
|
||
|
entitiesRequired:["publication"],
|
||
|
routeRequired:["/participate/deposit-publications"]},
|
||
|
{title: "Research Data",
|
||
|
url:"",
|
||
|
route:"/participate/deposit-datasets",
|
||
|
entitiesRequired:["dataset"],
|
||
|
routeRequired:["/participate/deposit-datasets"]}
|
||
|
]
|
||
|
},
|
||
|
|
||
|
{rootItem:{
|
||
|
id:"link",
|
||
|
title: "Link",
|
||
|
url:"",
|
||
|
route:"/participate/claim",
|
||
|
entitiesRequired:[],
|
||
|
routeRequired:["/participate/claim"]
|
||
|
|
||
|
},items:[]
|
||
|
},
|
||
|
|
||
|
|
||
|
{rootItem:{
|
||
|
id:"dataproviders",
|
||
|
title: "Content Providers",
|
||
|
url:"",
|
||
|
route:""
|
||
|
|
||
|
|
||
|
},items:[
|
||
|
{title: "Data Policies",
|
||
|
url:"https://beta.openaire.eu/oa-policies-mandates",
|
||
|
route:"",
|
||
|
entitiesRequired:[],
|
||
|
routeRequired:[]},
|
||
|
{title: "Repositories",
|
||
|
url:"",
|
||
|
route:"/search/content-providers",
|
||
|
entitiesRequired:[],
|
||
|
routeRequired:["/search/content-providers"]},
|
||
|
{title: "Journals",
|
||
|
url:"",
|
||
|
route:"/search/journals",
|
||
|
entitiesRequired:[],
|
||
|
routeRequired:["/search/journals"]},
|
||
|
{title: "Registries",
|
||
|
url:"",
|
||
|
route:"/search/entity-registries",
|
||
|
entitiesRequired:[],
|
||
|
routeRequired:["/search/entity-registries"]},
|
||
|
{title: "Browse all",
|
||
|
url:"",
|
||
|
route:"/search/find/dataproviders",
|
||
|
entitiesRequired:[],
|
||
|
routeRequired:["/search/find/dataproviders"]}
|
||
|
]
|
||
|
}
|
||
|
|
||
|
];
|
||
|
logInUrl = OpenaireProperties.getLoginURL();
|
||
|
logOutUrl = OpenaireProperties.getLogoutURL();
|
||
|
ngOnInit() {
|
||
|
|
||
|
if (typeof document !== 'undefined') {
|
||
|
try{
|
||
|
this.isClient = true;
|
||
|
}catch (e) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|