Properties

add property environment
	remove unused property production mode
	in navbar and bottom use environment property to show links to beta or production
Images: remove old images


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54347 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-12-13 09:21:26 +00:00
parent b1009769b7
commit 549778c2eb
8 changed files with 20 additions and 28 deletions

View File

@ -14,7 +14,7 @@ import{MenuItem,RootMenuItem} from './sharedComponents/menu';
`],
template: `
<navbar *ngIf= "properties" portal="explore" onlyTop=false userMenu=true [(communityId)]="properties.adminToolsCommunity" [userMenuItems]=userMenuItems [menuItems]=menuItems
<navbar *ngIf= "properties" portal="explore" [environment]=properties.environment [onlyTop]=false [userMenu]=true [(communityId)]="properties.adminToolsCommunity" [userMenuItems]=userMenuItems [menuItems]=menuItems
[(APIUrl)]="properties.adminToolsAPIURL" [(logInUrl)]="properties.loginUrl" [(logOutUrl)]="properties.logoutUrl" [(cookieDomain)]="properties.cookieDomain"></navbar>
<h1>Openaire Lib Component</h1>
@ -41,7 +41,7 @@ import{MenuItem,RootMenuItem} from './sharedComponents/menu';
<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" [assetsPath]=assetsPath></bottom>
<bottom *ngIf= "isClient && properties" [assetsPath]=assetsPath [environment]=properties.environment></bottom>
`

View File

@ -17,8 +17,6 @@ export class OrganizationService {
getOrganizationInfo (id: string, properties:EnvProperties):any {
console.info("getOrganizationInfo in service");
let url = properties.searchAPIURLLAst+'resources?format=json&query=( (oaftype exact organization) and (reldatasourcecompatibilityid=driver or reldatasourcecompatibilityid=driver-openaire2.0 or reldatasourcecompatibilityid=openaire2.0 or reldatasourcecompatibilityid=openaire3.0 or reldatasourcecompatibilityid=openaire2.0_data or reldatasourcecompatibilityid=hostedBy or relprojectid=* or reldatasourcecompatibilityid = native)) and ( objIdentifier ='+id+')';
//let url = "http://beta.services.openaire.eu:8480/search/rest/v2/api/resources?format=json&query=(%20(oaftype%20exact%20organization)%20and%20(reldatasourcecompatibilityid=driver%20or%20reldatasourcecompatibilityid=driver-openaire2.0%20or%20reldatasourcecompatibilityid=openaire2.0%20or%20reldatasourcecompatibilityid=openaire3.0%20or%20reldatasourcecompatibilityid=openaire2.0_data%20or%20reldatasourcecompatibilityid=hostedBy%20or%20relprojectid=*))%20and%20(%20objIdentifier%20=dedup_wf_001%3A%3Af1e63493def7cedfa5b497cdbea26faa)";
return this.http.get((properties.useCache)? (properties.cacheUrl +encodeURIComponent(url)): url)
.map(res => <any> res.json())

View File

@ -95,9 +95,9 @@
<div id="footer#10" class="uk-width-medium uk-text-left@s uk-text-center uk-panel">
<h3 class="el-title uk-h6">Dashboards</h3>
<ul class="uk-nav uk-nav-default uk-nav-parent-icon uk-nav-accordion" uk-nav="">
<li><a href="https://beta.explore.openaire.eu" target="_blank">Explore</a></li>
<li><a href="https://beta.provide.openaire.eu" target="_blank">Provide</a></li>
<li><a href="https://beta.connect.openaire.eu/" target="_blank">Connect</a></li>
<li><a [href]="'https://'+(environment =='beta'?'beta.':'')+'explore.openaire.eu'" target="_blank">Explore</a></li>
<li><a [href]="'https://'+(environment =='beta'?'beta.':'')+'provide.openaire.eu'" target="_blank">Provide</a></li>
<li><a [href]="'https://'+(environment =='beta'?'beta.':'')+'connect.openaire.eu'" target="_blank">Connect</a></li>
<li><a href="https://monitor.openaire.eu" target="_blank">Monitor</a></li>
<li><a href="https://develop.openaire.eu" target="_blank">Develop</a></li>
</ul>

View File

@ -16,15 +16,10 @@ export class BottomComponent {
@Input() showDnet:boolean = true;
@Input() assetsPath:string ='assets/common-assets/';
@Input() menuItems:MenuItem [];
// [
// new MenuItem("","About","https://beta.openaire.eu/project-factsheets","",false,[],[],{}),
// // new MenuItem("","Services","","",false,[],[],{}),
// new MenuItem("","News - Events","https://beta.openaire.eu/news-events","",false,[],[],{}),
// new MenuItem("","Blog","https://blogs.openaire.eu/","",false,[],[],{}),
// new MenuItem("","Contact us","https://beta.openaire.eu/contact-us","",false,[],[],{})
// ];
@Input() APIUrl;
@Input() communityId;
@Input() environment:string = "beta";
showPage ={};
constructor(private config: ConfigurationService, private route: ActivatedRoute,) {
}

View File

@ -10,7 +10,7 @@
<a *ngIf="!community" class="uk-navbar-item uk-logo" routerLinkActive="uk-link" routerLink="/" >
<img src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
</a>
<a *ngIf="community && !homeurl" class="uk-navbar-item uk-logo" [href]="'https://beta.'+community.id+'.openaire.eu'" target="_blank">
<a *ngIf="community && !homeurl" class="uk-navbar-item uk-logo" [href]="'https://'+(environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank">
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
@ -34,9 +34,9 @@
<li class="uk-nav-header uk-parent" >
Dashboards
<ul class="uk-nav-sub">
<li *ngIf="portal!='explore'"><a href="https://beta.explore.openaire.eu" target="_blank" class="uk-heading-bullet explore-heading-bullet">EXPLORE</a></li>
<li *ngIf="portal!='provide'"><a href="https://beta.provide.openaire.eu" target="_blank" class="uk-heading-bullet provide-heading-bullet">PROVIDE</a></li>
<li *ngIf="portal!='connect'"><a href="https://beta.connect.openaire.eu" target="_blank" class="uk-heading-bullet connect-heading-bullet">CONNECT</a></li>
<li *ngIf="portal!='explore'"><a [href]="'https://'+(environment =='beta'?'beta.':'')+'explore.openaire.eu'" target="_blank" class="uk-heading-bullet explore-heading-bullet">EXPLORE</a></li>
<li *ngIf="portal!='provide'"><a [href]="'https://'+(environment =='beta'?'beta.':'')+'provide.openaire.eu'" target="_blank" class="uk-heading-bullet provide-heading-bullet">PROVIDE</a></li>
<li *ngIf="portal!='connect'"><a [href]="'https://'+(environment =='beta'?'beta.':'')+'connect.openaire.eu'" target="_blank" class="uk-heading-bullet connect-heading-bullet">CONNECT</a></li>
<li *ngIf="portal!='monitor'"><a href="https://monitor.openaire.eu" target="_blank" class="uk-heading-bullet monitor-heading-bullet">MONITOR</a></li>
<li *ngIf="portal!='develop'"><a href="https://develop.openaire.eu" target="_blank" class="uk-heading-bullet develop-heading-bullet">DEVELOP</a></li>
</ul>
@ -83,12 +83,12 @@
<div class="uk-first-column">
<div class="uk-panel inner" id="module-119">
<ul class="uk-subnav uk-subnav-line">
<li ><a href="https://beta.openaire.eu" target="_blank" class="home-icon"><span class="uk-responsive-height" >
<li ><a [href]="'https://'+(environment =='beta'?'beta.':'www')+'.openaire.eu'" target="_blank" class="home-icon"><span class="uk-responsive-height" >
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 20 20" height="20px" id="Layer_1" version="1.1" viewBox="0 0 48 48" width="20px" xml:space="preserve"><path id="home" clip-rule="evenodd" d="M44.715,23.711c-0.381,0.382-1,0.382-1.381,0l-8.939-8.938 c-0.064-0.051-0.119-0.106-0.17-0.171l-3.83-3.829c-0.064-0.051-0.119-0.106-0.17-0.171L24,4.377L4.667,23.711 c-0.381,0.382-1,0.382-1.381,0c-0.381-0.381-0.381-1,0-1.381L23.191,2.425c0.031-0.047,0.053-0.101,0.094-0.144 C23.482,2.085,23.742,1.994,24,2c0.258-0.006,0.518,0.084,0.715,0.281c0.043,0.042,0.062,0.096,0.096,0.144L30,7.616V4.997 c0,0,0,0,0,0c0-0.552,0.447-1,1-1h4c0.277,0,0.527,0.112,0.707,0.293C35.889,4.471,36,4.721,36,4.997v8.619l8.715,8.714 C45.096,22.711,45.096,23.33,44.715,23.711z M34,5.997h-2v3.619l2,2V5.997z M10,21.997c0.552,0,1,0.448,1,1v19c0,1.105,0.896,2,2,2 h6l0,0v-13c0-0.553,0.447-1,1-1h8c0.553,0,1,0.447,1,1v13l0,0h6c1.105,0,2-0.895,2-2v-19c0-0.552,0.447-1,1-1s1,0.448,1,1v19 c0,2.209-1.791,4-4,4H13c-2.209,0-4-1.791-4-4v-19C9,22.444,9.448,21.997,10,21.997z M27,43.996v-12h-6v12l0,0H27L27,43.996z" fill-rule="evenodd" fill="#fff"/></svg>
</span></a></li>
<li [class]="(portal=='explore')?'custom-'+portal+'-li':''"><a href="https://beta.explore.openaire.eu" title="Search in OA. Link your research">Explore</a></li>
<li [class]="(portal=='provide')?'custom-'+portal+'-li':''"><a href="http://beta.provide.openaire.eu/" target="_blank" title="Content Provider Dashboard">Provide</a></li>
<li [class]="(portal=='connect'||portal=='connect-admin')?'custom-'+portal+'-li':''"><a href="https://beta.connect.openaire.eu" target="_blank" title="Research Community Dashboard">Connect</a></li>
<li [class]="(portal=='explore')?'custom-'+portal+'-li':''"><a [href]="'https://'+(environment =='beta'?'beta.':'')+'explore.openaire.eu'" title="Search in OA. Link your research">Explore</a></li>
<li [class]="(portal=='provide')?'custom-'+portal+'-li':''"><a [href]="'https://'+(environment =='beta'?'beta.':'')+'provide.openaire.eu'" target="_blank" title="Content Provider Dashboard">Provide</a></li>
<li [class]="(portal=='connect'||portal=='connect-admin')?'custom-'+portal+'-li':''"><a [href]="'https://'+(environment =='beta'?'beta.':'')+'connect.openaire.eu'" target="_blank" title="Research Community Dashboard">Connect</a></li>
<li [class]="(portal=='monitor')?'custom-'+portal+'-li':''"><a href="https://monitor.openaire.eu" target="_blank" title="Monitoring Dashboard">Monitor</a></li>
<li [class]="(portal=='develop')?'custom-'+portal+'-li':''"><a href="https://develop.openaire.eu" target="_blank" title="APIs">Develop</a></li>
</ul>
@ -115,7 +115,7 @@
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
<a *ngIf="community && !homeurl" [href]="'https://beta.'+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item">
<a *ngIf="community && !homeurl" [href]="'https://'+(environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item">
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
@ -129,7 +129,7 @@
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>
<a *ngIf="community && !homeurl" [href]="'https://beta.'+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item">
<a *ngIf="community && !homeurl" [href]="'https://'+(environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item">
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" class="uk-responsive-height">
<div class="uk-margin-left uk-text-large"> {{community.name}} </div>
</a>

View File

@ -25,6 +25,7 @@ export class NavigationBarComponent {
@Input() community: {id:string, name:string, logoUrl:string};
@Input() showMenu:boolean = true;
@Input() homeurl:boolean = true;
@Input() environment:string = "beta";
public isAuthorized: boolean = false;
sub:any;

View File

@ -19,8 +19,6 @@ export class PiwikService {
var ua = this.getUserAgent();
var referrer = this.getReferrer();
console.log("Piwik - id: " + siteId);
if(typeof location !== 'undefined'){
var url = properties.piwikBaseUrl+((siteId!=null)?siteId:properties.piwikSiteId)+"&rec=1&url="+StringUtils.URIEncode(location.href)+"&action_name="+StringUtils.URIEncode(title)+
((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+

View File

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
export class EnvProperties {
productionMode:boolean;
environment:boolean; //{beta,test,prod}
enablePiwikTrack:boolean ;
enableHelper:boolean;
useCache:boolean ;
@ -14,7 +14,7 @@ export class EnvProperties {
loginAPIURL;
claimsAPIURL;;
claimsAPIURL;
searchAPIURLLAst;