Revision 59452
Added by Konstantina Galouni almost 4 years ago
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/reload/reload.component.ts | ||
---|---|---|
32 | 32 |
var paramsObject = ((URL["params"] && URL["params"] != null)? Session.getParamsObj(URL["params"]):null); |
33 | 33 |
if(host == (location.protocol+"//"+location.host)){ |
34 | 34 |
let baseUrl = (document && document.getElementsByTagName('base'))?document.getElementsByTagName('base')[0].href.split(document.location.host)[1]:"/"; |
35 |
url = (baseUrl.length>1)?"/"+url.split(baseUrl)[1]:url;
|
|
35 |
url = (baseUrl.length>1 && url.indexOf(baseUrl)!=-1 )?("/"+url.split(baseUrl)[1]):url;
|
|
36 | 36 |
if(paramsObject && paramsObject != null){ |
37 | 37 |
Session.setReloadUrl("","","") |
38 | 38 |
this._router.navigate([url],{ queryParams: paramsObject}); |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/find/searchAll.component.html | ||
---|---|---|
30 | 30 |
</div> |
31 | 31 |
</div> |
32 | 32 |
</div> |
33 |
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.baseLink+'/search/find'"
|
|
34 |
[logoURL]="properties.baseLink+logoURL" type="search" [name]=name |
|
33 |
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.domain+ properties.baseLink +'/search/find'"
|
|
34 |
[logoURL]="properties.domain + properties.baseLink+logoURL" type="search" [name]=name
|
|
35 | 35 |
description="Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Research Graph. "></schema2jsonld> |
36 | 36 |
<div class="uk-container-large uk-container"> |
37 | 37 |
|
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/login/userMini.component.ts | ||
---|---|---|
5 | 5 |
import {RouterHelper} from '../utils/routerHelper.class'; |
6 | 6 |
import {StringUtils} from '../utils/string-utils.class'; |
7 | 7 |
import {EnvProperties} from '../utils/properties/env-properties'; |
8 |
import {properties} from "../../../environments/environment"; |
|
8 | 9 |
|
9 | 10 |
// declare var logoutClicked; |
10 | 11 |
@Component({ |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/claims/claim-utils/displayClaims/displayClaims.component.ts | ||
---|---|---|
16 | 16 |
import {HelperService} from "../../../utils/helper/helper.service"; |
17 | 17 |
import {Meta, Title} from "@angular/platform-browser"; |
18 | 18 |
import {PiwikService} from "../../../utils/piwik/piwik.service"; |
19 |
import {properties} from "../../../../../environments/environment"; |
|
19 | 20 |
|
20 | 21 |
|
21 | 22 |
@Component({ |
... | ... | |
89 | 90 |
} |
90 | 91 |
|
91 | 92 |
ngOnInit() { |
92 |
this.route.data |
|
93 |
.subscribe((data: { envSpecific: EnvProperties }) => { |
|
94 |
this.properties = data.envSpecific; |
|
95 |
this.url = data.envSpecific.baseLink + this._router.url; |
|
96 | 93 |
|
94 |
this.properties = properties; |
|
95 |
this.url = properties.domain + properties.baseLink + this._router.url; |
|
96 |
|
|
97 | 97 |
var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community"; |
98 | 98 |
this.updateTitle(this.title); |
99 | 99 |
this.updateDescription(description); |
... | ... | |
142 | 142 |
}); |
143 | 143 |
|
144 | 144 |
}); |
145 |
}); |
|
146 | 145 |
|
147 | 146 |
|
147 |
|
|
148 | 148 |
} |
149 | 149 |
|
150 | 150 |
ngOnDestroy() { |
... | ... | |
262 | 262 |
if (error.code && error.code == 403) { |
263 | 263 |
this.showErrorMessage = false; |
264 | 264 |
this.showForbiddenMessage = true; |
265 |
this._router.navigate(['/user-info'], { |
|
266 |
queryParams: { |
|
267 |
"errorCode": LoginErrorCodes.NOT_VALID, |
|
268 |
"redirectUrl": this._router.url |
|
269 |
} |
|
270 |
}); |
|
265 |
if(!Session.isLoggedIn()) { |
|
271 | 266 |
|
267 |
this._router.navigate(['/user-info'], { |
|
268 |
queryParams: { |
|
269 |
"errorCode": LoginErrorCodes.NOT_VALID, |
|
270 |
"redirectUrl": this._router.url |
|
271 |
} |
|
272 |
}); |
|
273 |
} |
|
274 |
|
|
272 | 275 |
} |
273 | 276 |
} catch (e) { |
274 | 277 |
|
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/authors/showAuthors.component.ts | ||
---|---|---|
13 | 13 |
template: ` |
14 | 14 |
<div *ngIf="authors" class="uk-height-max-medium uk-overflow-auto"> |
15 | 15 |
<span *ngFor="let author of authors.slice(0,numberOfAuthors) let i=index"> |
16 |
<span *ngIf="!author.orcid || (properties.environment == 'production') || !testBrowser"
|
|
16 |
<span *ngIf="!author.orcid || !testBrowser" |
|
17 | 17 |
[class.uk-text-small]="small"> |
18 | 18 |
{{author.fullName + "; "}} |
19 | 19 |
</span> |
20 |
<a *ngIf="author.orcid && (properties.environment != 'production') && testBrowser">
|
|
20 |
<a *ngIf="author.orcid && testBrowser"> |
|
21 | 21 |
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}} |
22 | 22 |
<span [class.uk-text-small]="small"> |
23 | 23 |
{{author.fullName + "; "}} |
24 | 24 |
</span> |
25 | 25 |
</a> |
26 |
<div *ngIf="author.orcid && (properties.environment != 'production')"
|
|
26 |
<div *ngIf="author.orcid && testBrowser"
|
|
27 | 27 |
class="default-dropdown uk-margin-remove-top uk-padding-medium uk-dropdown" |
28 | 28 |
uk-dropdown="pos: bottom-left; mode:click" style="min-width: 70px !important;"> |
29 | 29 |
<b class="uk-margin-top">{{author.fullName}}</b> |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/full-page-slider/full-page-slider.component.ts | ||
---|---|---|
1 | 1 |
import {AfterContentInit, Component, ContentChildren, Input, OnInit, QueryList} from "@angular/core"; |
2 | 2 |
import {SlideComponent} from "./slide.component"; |
3 |
import {BehaviorSubject, Observable} from 'rxjs'; |
|
3 | 4 |
|
4 | 5 |
@Component({ |
5 | 6 |
selector: 'fp-slider', |
6 | 7 |
template: ` |
7 | 8 |
<div class="menu"> |
8 | 9 |
<img class="logo" *ngIf="logoURL" [src]="logoURL"> |
9 |
<a *ngIf="state > 1" class="previous" (click)="onClick(state - 1)">
|
|
10 |
<a *ngIf="stateValue > 1" class="previous" (click)="onClick(stateValue - 1)">
|
|
10 | 11 |
<svg xmlns="http://www.w3.org/2000/svg" width="17.155" height="17.155" viewBox="0 0 17.155 17.155"> |
11 | 12 |
<g id="Group_3053" data-name="Group 3053" transform="translate(0)"> |
12 | 13 |
<path id="arrow-down-left2" |
... | ... | |
17 | 18 |
</a> |
18 | 19 |
<nav> |
19 | 20 |
<ul> |
20 |
<li *ngFor="let slide of slides.toArray();let i=index" [class.uk-active]="i === (state - 1)"> |
|
21 |
<li *ngFor="let slide of slides.toArray();let i=index" [class.uk-active]="i === (stateValue - 1)">
|
|
21 | 22 |
<a (click)="onClick(i + 1)"></a> |
22 | 23 |
</li> |
23 | 24 |
</ul> |
24 | 25 |
</nav> |
25 |
<a *ngIf="state < slides.length" class="next" (click)="onClick(state + 1)">
|
|
26 |
<a *ngIf="stateValue < slides.length" class="next" (click)="onClick(stateValue + 1)">
|
|
26 | 27 |
<svg xmlns="http://www.w3.org/2000/svg" width="17.155" height="17.155" viewBox="0 0 17.155 17.155"> |
27 | 28 |
<g id="Group_2442" data-name="Group 2442" transform="translate(-1221 -675)"> |
28 | 29 |
<path id="arrow-down-left2" |
... | ... | |
33 | 34 |
</a> |
34 | 35 |
</div> |
35 | 36 |
<div [ngClass]="topBar" class="top-bar"></div> |
36 |
<section (wheel)="onWheel($event)"> |
|
37 |
<section (wheel)="onWheel($event)" [class.has-footer]="hasFooter && state.value === slides.length">
|
|
37 | 38 |
<ng-content></ng-content> |
38 |
</section>`, |
|
39 |
</section> |
|
40 |
<bottom *ngIf="hasFooter && state.value === slides.length" class="bottom-bar uk-animation-slide-bottom" |
|
41 |
[shortView]="true" [ngClass]="footerClass" |
|
42 |
[showOpenaire]="true" [darkBackground]="false"></bottom> |
|
43 |
`, |
|
39 | 44 |
styleUrls: ['full-page-slider.component.css'] |
40 | 45 |
}) |
41 | 46 |
export class FullPageSliderComponent implements AfterContentInit { |
... | ... | |
46 | 51 |
@Input() |
47 | 52 |
public logoURL; |
48 | 53 |
@Input() topBar: string = null; |
54 |
@Input() hasFooter: boolean = null; |
|
55 |
@Input() footerClass: string; |
|
49 | 56 |
public animate: boolean = false; |
50 |
public state = 0;
|
|
57 |
public state: BehaviorSubject<number> = new BehaviorSubject<number>(0);
|
|
51 | 58 |
|
52 | 59 |
ngAfterContentInit() { |
53 |
this.state = this.initSlide;
|
|
54 |
this.setSlides(this.state); |
|
60 |
this.state.next(this.initSlide);
|
|
61 |
this.setSlides(this.state.value);
|
|
55 | 62 |
} |
56 | 63 |
|
57 | 64 |
setSlides(state = 1) { |
... | ... | |
64 | 71 |
onWheel(event) { |
65 | 72 |
if (!this.animate) { |
66 | 73 |
this.animate = true; |
67 |
if (event.deltaY > 0 && (this.state < this.slides.length)) { |
|
68 |
this.state++;
|
|
69 |
this.setSlides(this.state); |
|
74 |
if (event.deltaY > 0 && (this.state.value < this.slides.length)) {
|
|
75 |
this.state.next(+this.state.value + 1);
|
|
76 |
this.setSlides(this.state.value);
|
|
70 | 77 |
setTimeout(() => { |
71 | 78 |
this.animate = false; |
72 | 79 |
}, 500); |
73 |
} else if (event.deltaY < 0 && (this.state !== 1)) { |
|
74 |
this.state--;
|
|
75 |
this.setSlides(this.state); |
|
80 |
} else if (event.deltaY < 0 && (this.state.value !== 1)) {
|
|
81 |
this.state.next(this.state.value - 1);
|
|
82 |
this.setSlides(this.state.value);
|
|
76 | 83 |
setTimeout(() => { |
77 | 84 |
this.animate = false; |
78 | 85 |
}, 500); |
... | ... | |
85 | 92 |
public onClick(index: number) { |
86 | 93 |
if (!this.animate) { |
87 | 94 |
this.animate = true; |
88 |
this.state = index;
|
|
89 |
this.setSlides(this.state); |
|
95 |
this.state.next(index);
|
|
96 |
this.setSlides(this.state.value);
|
|
90 | 97 |
setTimeout(() => { |
91 | 98 |
this.animate = false; |
92 | 99 |
}, 500); |
93 | 100 |
} |
94 | 101 |
} |
102 |
|
|
103 |
public get stateValue() { |
|
104 |
return this.state.value; |
|
105 |
} |
|
106 |
|
|
107 |
public get stateAsObservable(): Observable<number> { |
|
108 |
return this.state.asObservable(); |
|
109 |
} |
|
95 | 110 |
} |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/full-page-slider/full-page-slider.module.ts | ||
---|---|---|
2 | 2 |
import {CommonModule} from "@angular/common"; |
3 | 3 |
import {FullPageSliderComponent} from "./full-page-slider.component"; |
4 | 4 |
import {SlideComponent} from "./slide.component"; |
5 |
import {BottomModule} from '../../sharedComponents/bottom.module'; |
|
5 | 6 |
|
6 | 7 |
@NgModule({ |
7 |
imports: [CommonModule], |
|
8 |
imports: [CommonModule, BottomModule],
|
|
8 | 9 |
declarations: [FullPageSliderComponent, SlideComponent], |
9 | 10 |
exports: [FullPageSliderComponent, SlideComponent], |
10 | 11 |
}) |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/properties/env-properties.ts | ||
---|---|---|
123 | 123 |
altMetricsAPIURL?: string; |
124 | 124 |
b2noteAPIURL?: string; |
125 | 125 |
adminPortalURL?: string; |
126 |
sushiliteURL?: string; |
|
126 | 127 |
} |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/indexInfo.service.ts | ||
---|---|---|
15 | 15 |
|
16 | 16 |
getLastIndexDate(properties: EnvProperties): Observable<any> { |
17 | 17 |
let url = properties.indexInfoAPI; |
18 |
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url).pipe(map(res => res['claim_load_date'])).pipe(catchError(err => {return of(null)})); |
|
18 |
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url).pipe(map(res => res['claim_load_date'])).pipe(catchError(err => {return of(null)}));
|
|
19 | 19 |
} |
20 | 20 |
} |
21 | 21 |
|
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/login/loginGuard.guard.ts | ||
---|---|---|
19 | 19 |
return user !== null; |
20 | 20 |
})); |
21 | 21 |
obs.pipe(filter(isLoggedIn => !isLoggedIn)).subscribe(() => { |
22 |
this.router.navigate(['/user-info'], {queryParams: {'errorCode': LoginErrorCodes.NOT_LOGIN, path}}); |
|
22 |
this.router.navigate(['/user-info'], {queryParams: {'errorCode': LoginErrorCodes.NOT_LOGIN,'redirectUrl': path}});
|
|
23 | 23 |
}); |
24 | 24 |
return obs; |
25 | 25 |
} else { |
26 |
this.router.navigate(['/user-info'], {queryParams: {'errorCode': LoginErrorCodes.NOT_LOGIN, path}}); |
|
26 |
this.router.navigate(['/user-info'], {queryParams: {'errorCode': LoginErrorCodes.NOT_LOGIN, 'redirectUrl':path}});
|
|
27 | 27 |
return false; |
28 | 28 |
} |
29 | 29 |
} |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/claims/claim-utils/displayClaims/displayClaims.component.html | ||
---|---|---|
142 | 142 |
An Error occured. |
143 | 143 |
</div> |
144 | 144 |
<div *ngIf="showForbiddenMessage " class="uk-alert uk-alert-danger "> |
145 |
You are not allowed to access this page.
|
|
145 |
You are not authorized to view the results.
|
|
146 | 146 |
</div> |
147 | 147 |
<div *ngIf="userValidMessage.length > 0 " class="uk-alert uk-alert-danger "> |
148 | 148 |
User session is not valid. Please login again. |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/find/searchAll.component.ts | ||
---|---|---|
147 | 147 |
var description = "Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Research Graph. "; |
148 | 148 |
var title = "OpenAIRE |Search for research outcomes, projects, content providers & organizations"; |
149 | 149 |
this.properties = data.envSpecific; |
150 |
var url = data.envSpecific.baseLink + this._router.url;
|
|
150 |
var url = this.properties.domain + this.properties.baseLink + this._router.url;
|
|
151 | 151 |
this._title.setTitle(title); |
152 | 152 |
this._meta.updateTag({content: description}, "name='description'"); |
153 | 153 |
this._meta.updateTag({content: description}, "property='og:description'"); |
154 | 154 |
this._meta.updateTag({content: title}, "property='og:title'"); |
155 | 155 |
this._meta.updateTag({content: url}, "property='og:url'"); |
156 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url, false);
|
|
156 |
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url, false);
|
|
157 | 157 |
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { |
158 | 158 |
this.subs.push(this._piwikService.trackView(this.properties, title, this.piwikSiteId).subscribe()); |
159 | 159 |
|
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/find/search.component.html | ||
---|---|---|
18 | 18 |
</div> |
19 | 19 |
</div> |
20 | 20 |
</div> |
21 |
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.baseLink+'/search/find'" [logoURL] = "properties.baseLink+logoURL" type="search" [name]=name></schema2jsonld> |
|
21 |
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.domain + properties.baseLink +'/search/find'" [logoURL] = |
|
22 |
"properties.domain+ properties.baseLink +logoURL" type="search" [name]=name></schema2jsonld> |
|
22 | 23 |
|
23 | 24 |
|
24 | 25 |
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle" > |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/find/search.component.ts | ||
---|---|---|
90 | 90 |
showProjects: boolean = false; |
91 | 91 |
showDataProviders: boolean = false; |
92 | 92 |
showOrganizations: boolean = false; |
93 |
advancedSearchLink: string = "/search/advanced/publications"; |
|
94 | 93 |
properties: EnvProperties; |
94 |
advancedSearchLink: string = this.properties.searchLinkToAdvancedResults; |
|
95 | 95 |
@Input() logoURL; |
96 | 96 |
@Input() name; |
97 | 97 |
@Input() customFilter: SearchCustomFilter = null; |
... | ... | |
128 | 128 |
var description = "open access, research, scientific publication, European Commission, EC, FP7, ERC, Horizon 2020, H2020, search, projects "; |
129 | 129 |
var title = "OpenAIRE | Search publications, research data, projects... | OpenAIRE"; |
130 | 130 |
this.properties = data.envSpecific; |
131 |
var url = data.envSpecific.baseLink + this._router.url;
|
|
131 |
var url = this.properties.domain + this.properties.baseLink + this._router.url;
|
|
132 | 132 |
this._title.setTitle(title); |
133 | 133 |
this._meta.updateTag({content: description}, "name='description'"); |
134 | 134 |
this._meta.updateTag({content: description}, "property='og:description'"); |
135 | 135 |
this._meta.updateTag({content: title}, "property='og:title'"); |
136 | 136 |
this._meta.updateTag({content: url}, "property='og:url'"); |
137 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url, false);
|
|
137 |
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url, false);
|
|
138 | 138 |
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { |
139 | 139 |
this.subs.push(this._piwikService.trackView(this.properties, "OpenAIRE |Search publications, research data, projects...", this.piwikSiteId).subscribe()); |
140 | 140 |
|
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.component.html | ||
---|---|---|
42 | 42 |
</div> |
43 | 43 |
</div> |
44 | 44 |
|
45 |
<schema2jsonld [URL]="properties.baseLink+baseUrl" type="search" [name]=pageTitle></schema2jsonld>
|
|
45 |
<schema2jsonld [URL]="properties.domain+baseUrl" type="search" [name]=pageTitle></schema2jsonld>
|
|
46 | 46 |
|
47 | 47 |
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle"> |
48 | 48 |
<div *ngIf="breadcrumbs" class="uk-container uk-margin-small-top"> |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.component.ts | ||
---|---|---|
106 | 106 |
this.csvLimit = data.envSpecific.csvLimit; |
107 | 107 |
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack; |
108 | 108 |
if(typeof window !== 'undefined') { |
109 |
this.updateUrl(data.envSpecific.baseLink+location.pathname);
|
|
109 |
this.updateUrl(this.properties.domain + this.properties.baseLink+location.pathname);
|
|
110 | 110 |
} |
111 | 111 |
if(typeof document !== 'undefined' && this.isPiwikEnabled){ |
112 | 112 |
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe(); |
... | ... | |
117 | 117 |
this.updateTitle(this.pageTitle); |
118 | 118 |
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle; |
119 | 119 |
this.updateDescription(description); |
120 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this.router.url,false);
|
|
120 |
this.seoService.createLinkForCanonicalURL(this.properties.domain+this.properties.baseLink + this.router.url,false);
|
|
121 | 121 |
} |
122 | 122 |
|
123 | 123 |
private getPageContents() { |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/searchUtils/searchPageTableView.component.ts | ||
---|---|---|
98 | 98 |
this.getPageContents(); |
99 | 99 |
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack; |
100 | 100 |
if(typeof window !== 'undefined') { |
101 |
this.updateUrl(data.envSpecific.baseLink+location.pathname);
|
|
102 |
this.url =data.envSpecific.baseLink+location.pathname;
|
|
101 |
this.updateUrl(this.properties.domain+this.properties.baseLink+location.pathname);
|
|
102 |
this.url =this.properties.domain+this.properties.baseLink+location.pathname;
|
|
103 | 103 |
} |
104 | 104 |
if(typeof document !== 'undefined' && this.isPiwikEnabled){ |
105 | 105 |
this.piwiksub = this._piwikService.trackView(data.envSpecific, this.pageTitle, this.piwikSiteId).subscribe(); |
... | ... | |
114 | 114 |
this.updateTitle(this.pageTitle); |
115 | 115 |
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle; |
116 | 116 |
this.updateDescription(description); |
117 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this.router.url,false);
|
|
117 |
this.seoService.createLinkForCanonicalURL(this.properties.domain+ this.properties.baseLink +this.router.url,false);
|
|
118 | 118 |
this.breadcrumbs.push({name: 'home', route: '/'}, {name: this.pageTitle, route: null}); |
119 | 119 |
|
120 | 120 |
|
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/sharedComponents/menu.ts | ||
---|---|---|
7 | 7 |
entitiesRequired: string[] = []; // openaire entities used in page "publication, dataset, organization, software, project, datasource" |
8 | 8 |
routeRequired: string[] = []; // the routes that if aren't enable the menu item doesn't make sense |
9 | 9 |
params: any = {}; |
10 |
fragment: string; |
|
10 | 11 |
markAsActive: boolean; |
11 | 12 |
items: MenuItem[] = []; |
12 | 13 |
icon: string; |
13 | 14 |
open: boolean; |
14 | 15 |
|
15 |
constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[], routeRequired: string[], params, icon=null) { |
|
16 |
constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[], routeRequired: string[], params, icon=null, fragment = null) {
|
|
16 | 17 |
this.id = id; |
17 | 18 |
this.title = title; |
18 | 19 |
this.url = url; |
... | ... | |
24 | 25 |
this.markAsActive = true; |
25 | 26 |
this.items = []; |
26 | 27 |
this.icon = icon; |
28 |
this.fragment = fragment; |
|
27 | 29 |
} |
28 | 30 |
|
29 | 31 |
public setMarkAsActive(showActive: boolean) { |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/sharedComponents/navigationBar.component.html | ||
---|---|---|
87 | 87 |
<!--a routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a--> |
88 | 88 |
<a *ngIf="menu.rootItem.route.length > 0 && isEnabled([menu.rootItem.route], showPage) || !menu.rootItem.routeRequired " |
89 | 89 |
routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" |
90 |
[queryParams]=menu.rootItem.params
|
|
90 |
[queryParams]="menu.rootItem.params" [fragment]="menu.rootItem.fragment"
|
|
91 | 91 |
class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a> |
92 | 92 |
<a *ngIf="menu.rootItem.route.length == 0 && menu.rootItem.url.length > 0" |
93 | 93 |
routerLinkActive="uk-link" href="{{menu.rootItem.url}}" target="_blank" |
... | ... | |
99 | 99 |
<ng-container *ngFor="let submenu of menu.items"> |
100 | 100 |
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)"> |
101 | 101 |
<a *ngIf="submenu.route.length > 0" routerLinkActive="uk-link" |
102 |
routerLink="{{submenu.route}}" [queryParams]=submenu.params |
|
102 |
routerLink="{{submenu.route}}" [queryParams]=submenu.params [fragment]="submenu.fragment"
|
|
103 | 103 |
class="uk-offcanvas-close custom-offcanvas-close">{{submenu.title}}</a> |
104 | 104 |
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0" routerLinkActive="uk-link" |
105 | 105 |
href="{{submenu.url}}" target="_blank" |
... | ... | |
264 | 264 |
<!--a routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="" aria-expanded="false">{{menu.rootItem.title}}</a--> |
265 | 265 |
<a *ngIf="menu.rootItem.route.length > 0 && (isEnabled([menu.rootItem.route], showPage) || !menu.rootItem.routeRequired )" |
266 | 266 |
routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" |
267 |
[queryParams]=menu.rootItem.params> {{menu.rootItem.title}}</a>
|
|
267 |
[queryParams]="menu.rootItem.params" [fragment]="menu.rootItem.fragment"> {{menu.rootItem.title}}</a>
|
|
268 | 268 |
<a *ngIf="menu.rootItem.route.length == 0 && menu.rootItem.url.length > 0" routerLinkActive="uk-link" |
269 | 269 |
href="{{menu.rootItem.url}}" target="_blank" aria-expanded="false">{{menu.rootItem.title}}</a> |
270 | 270 |
<a *ngIf="(menu.rootItem.route.length == 0 && menu.rootItem.url.length == 0) || ( menu.rootItem.route.length >0 && menu.rootItem.routeRequired && !isEnabled([menu.rootItem.route], showPage) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)) " |
... | ... | |
279 | 279 |
<ng-container *ngFor="let submenu of menu.items"> |
280 | 280 |
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)"> |
281 | 281 |
<a *ngIf="submenu.route.length > 0" routerLinkActive="uk-link" |
282 |
routerLink="{{submenu.route}}" [queryParams]=submenu.params>{{submenu.title}}</a>
|
|
282 |
routerLink="{{submenu.route}}" [queryParams]="submenu.params" [fragment]="submenu.fragment">{{submenu.title}}</a>
|
|
283 | 283 |
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0" routerLinkActive="uk-link" |
284 | 284 |
href="{{submenu.url}}" target="_blank">{{submenu.title}}</a> |
285 | 285 |
</li> |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/searchUtils/newSearchPage.component.ts | ||
---|---|---|
134 | 134 |
} |
135 | 135 |
|
136 | 136 |
ngOnInit() { |
137 |
this.route.data |
|
138 |
.subscribe((data: { envSpecific: EnvProperties }) => { |
|
139 |
this.properties = data.envSpecific; |
|
140 |
//this.getDivContents(); |
|
141 |
this.getPageContents(); |
|
142 |
this.pagingLimit = data.envSpecific.pagingLimit; |
|
143 |
this.resultsPerPage = data.envSpecific.resultsPerPage; |
|
144 |
this.csvLimit = data.envSpecific.csvLimit; |
|
145 |
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack; |
|
146 |
this.updateUrl(data.envSpecific.baseLink + this.router.url); |
|
147 |
this.url = data.envSpecific.baseLink + this.router.url; |
|
148 |
if (typeof document !== 'undefined' && this.isPiwikEnabled && !this.includeOnlyResultsAndFilter) { |
|
149 |
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe(); |
|
150 |
} |
|
151 |
}); |
|
137 |
this.properties = properties; |
|
138 |
//this.getDivContents(); |
|
139 |
this.getPageContents(); |
|
140 |
this.pagingLimit = this.properties.pagingLimit; |
|
141 |
this.resultsPerPage = this.properties.resultsPerPage; |
|
142 |
this.csvLimit = this.properties.csvLimit; |
|
143 |
this.isPiwikEnabled = this.properties.enablePiwikTrack; |
|
144 |
this.updateUrl(this.properties.domain + this.properties.baseLink + this.router.url); |
|
145 |
this.url = this.properties.domain + this.properties.baseLink + this.router.url; |
|
146 |
if (typeof document !== 'undefined' && this.isPiwikEnabled && !this.includeOnlyResultsAndFilter) { |
|
147 |
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe(); |
|
148 |
} |
|
152 | 149 |
this.route.queryParams.subscribe(params => { |
153 | 150 |
if (params['page'] && params['page'] != 1) { |
154 | 151 |
HelperFunctions.scrollToId("searchForm"); |
... | ... | |
173 | 170 |
} |
174 | 171 |
|
175 | 172 |
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl; |
176 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.router.url, false); |
|
173 |
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.router.url, false);
|
|
177 | 174 |
this.breadcrumbs.push({name: 'home', route: '/'}); |
178 | 175 |
if(this.simpleView) { |
179 | 176 |
this.breadcrumbs.push( {name: "Search", route: null}); |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/searchUtils/portal-search-result.component.ts | ||
---|---|---|
87 | 87 |
} |
88 | 88 |
return url; |
89 | 89 |
} |
90 |
|
|
90 |
|
|
91 | 91 |
public getStakeholderPageUrl(stakeholder: Stakeholder) { |
92 |
return this.properties.baseLink + '/dashboard/' + stakeholder.alias;
|
|
92 |
return this.properties.domain + this.properties.baseLink +"/" + stakeholder.alias;
|
|
93 | 93 |
} |
94 | 94 |
|
95 | 95 |
public goToPage(data: any) { |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/searchPages/searchUtils/advancedSearchPage.component.ts | ||
---|---|---|
81 | 81 |
this.csvLimit = data.envSpecific.csvLimit; |
82 | 82 |
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack; |
83 | 83 |
if (typeof window !== 'undefined') { |
84 |
this.updateUrl(data.envSpecific.baseLink + location.pathname);
|
|
85 |
this.url = data.envSpecific.baseLink + location.pathname
|
|
84 |
this.updateUrl(this.properties.domain + this.properties.baseLink + location.pathname);
|
|
85 |
this.url = this.properties.domain + this.properties.baseLink + location.pathname
|
|
86 | 86 |
} |
87 | 87 |
if (typeof document !== 'undefined' && this.isPiwikEnabled) { |
88 | 88 |
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe(); |
... | ... | |
97 | 97 |
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl; |
98 | 98 |
|
99 | 99 |
this.updateBaseUrlWithParameters(); |
100 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.router.url, false); |
|
100 |
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this.router.url, false);
|
|
101 | 101 |
|
102 | 102 |
|
103 | 103 |
} |
... | ... | |
295 | 295 |
/* Code For Piwik*/ |
296 | 296 |
if (typeof localStorage !== 'undefined') { |
297 | 297 |
//console.log("In PreviousRouteRecorder : "+this.router.url ); |
298 |
localStorage.setItem('previousRoute', this.router.url); |
|
298 |
localStorage.setItem('previousRoute', this.properties.domain + this.properties.baseLink + this.router.url);
|
|
299 | 299 |
} |
300 | 300 |
if (this.isPiwikEnabled && (typeof document !== 'undefined')) { |
301 | 301 |
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe(); |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/dashboard/helpTexts/edit-page-help-content.component.ts | ||
---|---|---|
10 | 10 |
import {LoginErrorCodes} from '../../login/utils/guardHelper.class'; |
11 | 11 |
import {HelperFunctions} from "../../utils/HelperFunctions.class"; |
12 | 12 |
import {Page} from "../../utils/entities/adminTool/page"; |
13 |
import {properties} from "../../../../environments/environment"; |
|
13 | 14 |
|
14 | 15 |
@Component({ |
15 | 16 |
selector: 'edit-page-help-content', |
... | ... | |
95 | 96 |
|
96 | 97 |
private getPageHelpContent(pageContentId: string) { |
97 | 98 |
if(!Session.isLoggedIn()){ |
98 |
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
|
99 |
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} }); |
|
99 | 100 |
} else { |
100 | 101 |
this.showLoading = true; |
101 | 102 |
this.errorMessage = ""; |
... | ... | |
125 | 126 |
|
126 | 127 |
public saveCustom() { |
127 | 128 |
if(!Session.isLoggedIn()){ |
128 |
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
|
129 |
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} }); |
|
129 | 130 |
} else { |
130 | 131 |
if(this.formComponent.myForm.valid) { |
131 | 132 |
this.showLoading = true; |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/dashboard/helpTexts/page-help-contents.component.ts | ||
---|---|---|
14 | 14 |
import {LoginErrorCodes} from '../../login/utils/guardHelper.class'; |
15 | 15 |
import {HelperFunctions} from "../../utils/HelperFunctions.class"; |
16 | 16 |
import {Subscriber} from "rxjs"; |
17 |
import {properties} from "../../../../environments/environment"; |
|
17 | 18 |
|
18 | 19 |
@Component({ |
19 | 20 |
selector: 'page-help-contents', |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/dashboard/helpTexts/new-page-help-content.component.ts | ||
---|---|---|
9 | 9 |
import {LoginErrorCodes} from '../../login/utils/guardHelper.class'; |
10 | 10 |
import {HelperFunctions} from "../../utils/HelperFunctions.class"; |
11 | 11 |
import {Page} from "../../utils/entities/adminTool/page"; |
12 |
import {properties} from "../../../../environments/environment"; |
|
12 | 13 |
|
13 | 14 |
@Component({ |
14 | 15 |
selector: 'new-page-help-content', |
... | ... | |
76 | 77 |
|
77 | 78 |
public saveCustom() { |
78 | 79 |
if(!Session.isLoggedIn()){ |
79 |
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
|
80 |
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} }); |
|
80 | 81 |
} else { |
81 | 82 |
//this.errorMessage = null; |
82 | 83 |
|
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/error/errorPage.component.ts | ||
---|---|---|
64 | 64 |
//this.route.data |
65 | 65 |
//.subscribe((data: { envSpecific: EnvProperties }) => { |
66 | 66 |
//let properties = data.envSpecific; |
67 |
this.seoService.createLinkForCanonicalURL(properties.baseLink + "/error"); |
|
67 |
this.seoService.createLinkForCanonicalURL(properties.domain + properties.baseLink + "/error");
|
|
68 | 68 |
|
69 | 69 |
this.route.queryParams.subscribe(data => { |
70 | 70 |
this.page = data['page']; |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.component.html | ||
---|---|---|
15 | 15 |
<div *ngIf="dataProviderInfo != null" class="uk-grid uk-margin-remove-left uk-margin-large-bottom"> |
16 | 16 |
<div class="uk-width-2-3@m uk-width-1-1@s uk-margin-bottom uk-padding uk-padding-remove-left uk-padding-remove-vertical"> |
17 | 17 |
<schema2jsonld *ngIf="dataProviderInfo" [data]=dataProviderInfo |
18 |
[URL]="properties.baseLink+'/search/dataprovider?datasourceId='+datasourceId"
|
|
18 |
[URL]="properties.domain+ properties.baseLink +properties.searchLinkToDataProvider +datasourceId"
|
|
19 | 19 |
type="datasource" |
20 | 20 |
[otherURL]="(dataProviderInfo.openDoarId)?(properties.openDoarURL+dataProviderInfo.openDoarId):((dataProviderInfo.r3DataId)?properties.r3DataURL+dataProviderInfo.r3DataId:nul)"></schema2jsonld> |
21 | 21 |
|
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.component.ts | ||
---|---|---|
161 | 161 |
} |
162 | 162 |
//this.getDivContents(); |
163 | 163 |
this.getPageContents(); |
164 |
this.updateUrl(this.properties.baseLink + this._router.url);
|
|
164 |
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
|
|
165 | 165 |
this.sub = this.route.queryParams.subscribe(data => { |
166 | 166 |
this.updateTitle("Content provider"); |
167 | 167 |
this.updateDescription(""); |
... | ... | |
247 | 247 |
this.subInfo = this._dataproviderService.getDataproviderInfo(this.datasourceId, this.properties).subscribe( |
248 | 248 |
data => { |
249 | 249 |
this.dataProviderInfo = data; |
250 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url);
|
|
250 |
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url);
|
|
251 | 251 |
if (typeof document !== 'undefined') { |
252 | 252 |
this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId); |
253 | 253 |
} else { |
... | ... | |
282 | 282 |
} |
283 | 283 |
this.errorMessage = 'No dataProvider found'; |
284 | 284 |
this.showLoading = false; |
285 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToDataProviders); |
|
285 |
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToDataProviders);
|
|
286 | 286 |
} |
287 | 287 |
); |
288 | 288 |
} |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/sharedComponents/bottom.component.ts | ||
---|---|---|
5 | 5 |
import { ConfigurationService } from '../utils/configuration/configuration.service'; |
6 | 6 |
import {EnvProperties} from "../utils/properties/env-properties"; |
7 | 7 |
import {Subscription} from "rxjs"; |
8 |
import {properties} from '../../../environments/environment'; |
|
8 | 9 |
|
9 | 10 |
@Component({ |
10 | 11 |
selector: 'bottom', |
... | ... | |
25 | 26 |
@Input() grantAdvance:boolean = true; |
26 | 27 |
grantAdvanceText = "OpenAIRE-Advance receives funding from the European Union's Horizon 2020 Research and Innovation programme under Grant Agreement No. 777541."; |
27 | 28 |
grantConenctText = "OpenAIRE-Connect receives funding from the European Union's Horizon 2020 Research and Innovation programme under grant agreement No. 731011 and No. 777541."; |
28 |
@Input() properties:EnvProperties; |
|
29 |
@Input() properties:EnvProperties = properties;
|
|
29 | 30 |
@Input() darkBackground:boolean=true; |
30 | 31 |
@Input() centered:boolean=false; |
32 |
@Input() shortView: boolean = false; |
|
31 | 33 |
sectionClass= "uk-section-primary"; |
32 | 34 |
|
33 | 35 |
subs: Subscription[] = []; |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/sharedComponents/bottom.component.html | ||
---|---|---|
1 |
<ng-container *ngIf="shortView;else longView"> |
|
2 |
<div class="uk-padding uk-flex uk-flex-middle"> |
|
3 |
<div *ngIf="showCommision" class="uk-width-1-2"> |
|
4 |
<div class="uk-flex uk-flex-middle" > |
|
5 |
<div> |
|
6 |
<img style="margin-right: 8px; float: left;" |
|
7 |
[src]="assetsPath + 'common/commission.jpg'" |
|
8 |
alt="flag black white low" width="50" height="33"> |
|
9 |
</div> |
|
10 |
<div class="uk-margin-left"> |
|
11 |
<div *ngIf="!grantAdvance" class=""> |
|
12 |
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml] = "grantConenctText"></span> |
|
13 |
</div> |
|
14 |
<div *ngIf="grantAdvance" class=""> |
|
15 |
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml] = "grantAdvanceText"></span> |
|
16 |
</div> |
|
17 |
</div> |
|
18 |
</div> |
|
19 |
</div> |
|
20 |
<div *ngIf="showOpenaire" class="uk-text-right uk-width-1-2"> |
|
21 |
<img [src]="assetsPath + 'common/Logo_Horizontal_'+(darkBackground?'white':'dark')+'_small.png'" |
|
22 |
data-width="126" |
|
23 |
data-height="30" class="el-image" alt="OpenAIRE"> |
|
24 |
</div> |
|
25 |
</div> |
|
26 |
</ng-container> |
|
27 |
<ng-template #longView> |
|
1 | 28 |
<div [class]="sectionClass + ' uk-section uk-section-small uk-padding-remove-bottom'"> |
2 | 29 |
<div [class]="'uk-container ' +(centered?'uk-container-small':'uk-container-expand') "> |
3 | 30 |
<!-- <div class="uk-container uk-container-expand uk-margin-small">--> |
... | ... | |
176 | 203 |
|
177 | 204 |
|
178 | 205 |
</div> |
179 |
<!--<div [class]="sectionClass + ' uk-section uk-section-xsmall'"> |
|
180 |
<div class="uk-container"> |
|
181 |
<div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid=""> |
|
182 |
<div class="uk-width-expand@m"> |
|
183 |
</div> |
|
184 |
</div> |
|
185 |
</div> |
|
186 |
</div>--> |
|
187 | 206 |
<div [class]="sectionClass + ' uk-section uk-section-xsmall'"> |
188 | 207 |
<div class="uk-container uk-container-expand"> |
189 | 208 |
<div class="uk-grid-margin uk-grid" uk-grid=""> |
... | ... | |
240 | 259 |
</div> |
241 | 260 |
</div> |
242 | 261 |
</div> |
262 |
</ng-template> |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/landingPages/organization/organization.component.html | ||
---|---|---|
14 | 14 |
<div *ngIf="organizationInfo != null" class="uk-grid uk-margin-remove"> |
15 | 15 |
<div class="uk-width-2-3@m uk-width-1-1@s uk-padding uk-padding-remove-left uk-padding-remove-vertical uk-margin-bottom"> |
16 | 16 |
<schema2jsonld *ngIf="organizationInfo" [data]=organizationInfo |
17 |
[URL]="properties.baseLink+'/search/organization?organizationId='+organizationId"
|
|
17 |
[URL]="properties.domain + properties.baseLink+this.properties.searchLinkToOrganization+organizationId"
|
|
18 | 18 |
type="organization"></schema2jsonld> |
19 | 19 |
<landing-header [properties]="properties" [title]="organizationInfo.title.name" |
20 | 20 |
titleClass="uk-margin-remove-bottom" |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/landingPages/organization/organization.component.ts | ||
---|---|---|
148 | 148 |
} |
149 | 149 |
//this.getDivContents(); |
150 | 150 |
this.getPageContents(); |
151 |
this.updateUrl(data.envSpecific.baseLink + this._router.url);
|
|
151 |
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
|
|
152 | 152 |
}); |
153 | 153 |
this.sub = this.route.queryParams.subscribe(params => { |
154 | 154 |
this.organizationInfo = null; |
... | ... | |
333 | 333 |
this.errorMessage = 'No organization found'; |
334 | 334 |
} else { |
335 | 335 |
this.organizationInfo = data; |
336 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToOrganization + this.organizationInfo.relcanId);
|
|
336 |
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToOrganization + this.organizationInfo.relcanId);
|
|
337 | 337 |
this.updateTitle((this.organizationInfo.title.name?this.organizationInfo.title.name:(this.organizationInfo.name?this.organizationInfo.name:'No title available'))); |
338 | 338 |
this.updateDescription("Organization, country, " + |
339 | 339 |
(this.organizationInfo.title.name?this.organizationInfo.title.name:'No title available') + |
... | ... | |
364 | 364 |
} |
365 | 365 |
}); |
366 | 366 |
} |
367 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToOrganizations);
|
|
367 |
this.seoService.createLinkForCanonicalURL(this.properties.domain+ this.properties.baseLink + this.properties.searchLinkToOrganizations);
|
|
368 | 368 |
this.errorMessage = 'No organization found'; |
369 | 369 |
this.showLoading = false; |
370 | 370 |
} |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/landingPages/project/project.component.html | ||
---|---|---|
92 | 92 |
<div *ngIf="projectInfo != null" class="uk-grid uk-margin-remove-left uk-margin-large-bottom"> |
93 | 93 |
<div class="uk-width-2-3@m uk-width-1-1@s uk-margin-bottom uk-padding uk-padding-remove-left uk-padding-remove-vertical"> |
94 | 94 |
<schema2jsonld *ngIf="projectInfo" [data]=projectInfo |
95 |
[URL]="properties.baseLink+properties.searchLinkToProject+projectId" |
|
95 |
[URL]="properties.domain+properties.baseLink+properties.searchLinkToProject+projectId"
|
|
96 | 96 |
type="project"></schema2jsonld> |
97 | 97 |
<landing-header [properties]="properties" [title]="projectName" |
98 | 98 |
[subTitle]="projectInfo.acronym ? projectInfo.title : ''" |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/landingPages/project/project.component.ts | ||
---|---|---|
161 | 161 |
} |
162 | 162 |
//this.getDivContents(); |
163 | 163 |
this.getPageContents(); |
164 |
this.updateUrl(data.envSpecific.baseLink + this._router.url);
|
|
164 |
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
|
|
165 | 165 |
|
166 | 166 |
}); |
167 | 167 |
this.sub = this.route.queryParams.subscribe(params => { |
... | ... | |
356 | 356 |
if(err.status == 404) { |
357 | 357 |
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}}); |
358 | 358 |
} |
359 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects); |
|
359 |
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToProjects);
|
|
360 | 360 |
this.errorMessage = 'No project found'; |
361 | 361 |
this.showLoading = false; |
362 | 362 |
} |
... | ... | |
385 | 385 |
if(err.status == 404) { |
386 | 386 |
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}}); |
387 | 387 |
} |
388 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects); |
|
388 |
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToProjects);
|
|
389 | 389 |
this.errorMessage = 'No project found'; |
390 | 390 |
this.showLoading = false; |
391 | 391 |
} |
... | ... | |
397 | 397 |
if (this.projectName == undefined || this.projectName == '') { |
398 | 398 |
this.projectName = this.projectInfo.title; |
399 | 399 |
} |
400 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url); |
|
400 |
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this._router.url);
|
|
401 | 401 |
this.updateTitle(this.projectName); |
402 | 402 |
this.updateDescription(this.projectInfo.description?this.projectInfo.description: ("project" + (this.projectInfo.title?"," + this.projectInfo.title:"") + (this.projectInfo.funding && this.projectInfo.funding.funderName?", funder: " + this.projectInfo.funding.funderName:"") + (this.projectInfo.acronym?"," + this.projectInfo.acronym:""))); |
403 | 403 |
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/landingPages/htmlProjectReport/htmlProjectReport.component.ts | ||
---|---|---|
91 | 91 |
this.properties = data.envSpecific; |
92 | 92 |
//this.getDivContents(); |
93 | 93 |
this.getPageContents(); |
94 |
this.updateUrl(data.envSpecific.baseLink + this._router.url);
|
|
95 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url); |
|
94 |
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
|
|
95 |
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this._router.url);
|
|
96 | 96 |
|
97 | 97 |
}); |
98 | 98 |
this.sub = this.route.queryParams.subscribe(params => { |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/landingPages/result/resultLanding.component.html | ||
---|---|---|
18 | 18 |
class="uk-width-2-3@m uk-width-1-1@s uk-padding uk-padding-remove-left uk-padding-remove-vertical uk-margin-bottom"> |
19 | 19 |
<!-- schema.org--> |
20 | 20 |
<schema2jsonld *ngIf="resultLandingInfo.record" [data]=resultLandingInfo.record |
21 |
[URL]="properties.baseLink+linkToLandingPage+id"></schema2jsonld>
|
|
21 |
[URL]="properties.domain+ properties.baseLink +linkToLandingPage+id"></schema2jsonld>
|
|
22 | 22 |
<landing-header [properties]="properties" [title]="resultLandingInfo.title" |
23 | 23 |
[subTitle]="resultLandingInfo.subtitle" |
24 |
[authors]="resultLandingInfo.authors" [authorLimit]="10" [showAllAuthors]="false"
|
|
24 |
[authors]="resultLandingInfo.authors" [authorLimit]="10" |
|
25 | 25 |
[underCuration]="resultLandingInfo.underCurationMessage" |
26 | 26 |
[entityType]="getTypeName()" [types]="resultLandingInfo.types" |
27 | 27 |
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate"> |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/landingPages/result/resultLanding.component.ts | ||
---|---|---|
129 | 129 |
} |
130 | 130 |
//this.getDivContents(); |
131 | 131 |
this.getPageContents(); |
132 |
this.updateUrl(this.properties.baseLink + this._router.url);
|
|
132 |
this.updateUrl(this.properties.domain +this.properties.baseLink + this._router.url);
|
|
133 | 133 |
this.sub = this.route.queryParams.subscribe(data => { |
134 | 134 |
this.resultLandingInfo = null; |
135 | 135 |
if (data['articleId']) { |
... | ... | |
321 | 321 |
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType |
322 | 322 |
this.updateUrlWithType(); |
323 | 323 |
} |
324 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.linkToLandingPage + this.resultLandingInfo.relcanId);
|
|
324 |
this.seoService.createLinkForCanonicalURL(this.properties.domain+ properties.baseLink + this.linkToLandingPage + this.resultLandingInfo.relcanId);
|
|
325 | 325 |
if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) { |
326 | 326 |
this.getOpenCitations(); |
327 | 327 |
} |
... | ... | |
369 | 369 |
this.errorMessage += "No research product found"; |
370 | 370 |
} |
371 | 371 |
this.showLoading = false; |
372 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.linkToSearchPage);
|
|
372 |
this.seoService.createLinkForCanonicalURL(this.properties.domain+ properties.baseLink + this.linkToSearchPage);
|
|
373 | 373 |
} |
374 | 374 |
); |
375 | 375 |
} |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/iframe.component.ts | ||
---|---|---|
5 | 5 |
selector: 'i-frame', |
6 | 6 |
template: ` |
7 | 7 |
<div *ngIf="!style" class="iframeContainer uk-height-large"> |
8 |
<iframe [src]="safeUrl"></iframe> |
|
8 |
<iframe allowtransparency="true" [src]="safeUrl"></iframe>
|
|
9 | 9 |
</div> |
10 | 10 |
<div *ngIf="style" class="iframeContainer" [ngStyle]="style"> |
11 | 11 |
<iframe [src]="safeUrl"></iframe> |
... | ... | |
17 | 17 |
@Input() url ; |
18 | 18 |
@Input() width: number; |
19 | 19 |
@Input() height: number; |
20 |
@Input() unit: string = 'px'; |
|
20 | 21 |
public style: any; |
21 | 22 |
|
22 | 23 |
constructor(private sanitizer: DomSanitizer) { |
23 | 24 |
} |
24 | 25 |
ngOnInit() { |
25 | 26 |
this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.url); |
27 |
let width = 'width.' + this.unit; |
|
28 |
let height = 'height.' + this.unit; |
|
26 | 29 |
if(this.width && this.height) { |
27 |
this.style = { |
|
28 |
"width.px": this.width, |
|
29 |
"height.px": this.height |
|
30 |
}; |
|
30 |
this.style = {}; |
|
31 |
this.style[width] = this.width; |
|
32 |
this.style[height] = this.height; |
|
31 | 33 |
} else if(this.height) { |
32 |
this.style = { |
|
33 |
"height.px": this.height |
|
34 |
}; |
|
34 |
this.style = {}; |
|
35 |
this.style[height] = this.height; |
|
35 | 36 |
} |
36 | 37 |
} |
37 | 38 |
} |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/piwik/previousRouteRecorder.guard.ts | ||
---|---|---|
2 | 2 |
import { Injectable } from '@angular/core'; |
3 | 3 |
import { CanDeactivate, Router} from '@angular/router'; |
4 | 4 |
import {Observable} from 'rxjs'; |
5 |
import {properties} from "../../../../environments/environment"; |
|
5 | 6 |
|
6 | 7 |
@Injectable({ |
7 | 8 |
providedIn: 'root' |
... | ... | |
11 | 12 |
} |
12 | 13 |
canDeactivate(component: any): Observable<boolean> | boolean { |
13 | 14 |
if (typeof localStorage !== 'undefined') { |
14 |
// console.log("In PreviousRouteRecorder : "+this.router.url );
|
|
15 |
localStorage.setItem('previousRoute', this.router.url); |
|
15 |
console.log("In PreviousRouteRecorder : " + properties.domain +properties.baseLink + this.router.url );
|
|
16 |
localStorage.setItem('previousRoute', properties.domain + properties.baseLink + this.router.url);
|
|
16 | 17 |
} |
17 | 18 |
return true; |
18 | 19 |
} |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/manage/manage.component.ts | ||
---|---|---|
8 | 8 |
target="_blank"> |
9 | 9 |
Manage |
10 | 10 |
</a> |
11 |
<a *ngIf="alias" [href]="properties.baseLink + '/dashboard/admin/' + alias"
|
|
11 |
<a *ngIf="alias" [href]="properties.domain + properties.baseLink + '/admin/' + alias"
|
|
12 | 12 |
[class]=" ((buttonSizeSmall)?'uk-button-small':'')+' uk-button portal-button'" |
13 | 13 |
target="_blank"> |
14 | 14 |
Manage |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/full-page-slider/full-page-slider.component.css | ||
---|---|---|
1 | 1 |
.top-bar { |
2 | 2 |
position: fixed; |
3 | 3 |
top: 0; |
4 |
left: 0;
|
|
4 |
left: 121px;
|
|
5 | 5 |
height: 100px; |
6 |
width: 100%;
|
|
6 |
width: calc(100% - 121px);
|
|
7 | 7 |
z-index: 1; |
8 | 8 |
} |
9 | 9 |
|
10 |
.bottom-bar { |
|
11 |
position: fixed; |
|
12 |
bottom: 0; |
|
13 |
left: 121px; |
|
14 |
height: 100px; |
|
15 |
width: calc(100% - 121px); |
|
16 |
z-index: 1; |
|
17 |
} |
|
18 |
|
|
10 | 19 |
section { |
11 | 20 |
position: fixed; |
12 |
top:10%;
|
|
21 |
top: 100px;
|
|
13 | 22 |
left: 120px; |
14 | 23 |
height: calc(100% - 100px); |
15 | 24 |
width: calc(100% - 120px); |
16 | 25 |
} |
17 | 26 |
|
27 |
section.has-footer { |
|
28 |
height: calc(100% - 200px); |
|
29 |
} |
|
30 |
|
|
18 | 31 |
.menu { |
19 | 32 |
position: fixed; |
20 | 33 |
top: 0; |
... | ... | |
23 | 36 |
width: 120px; |
24 | 37 |
border-right: 1px solid #4687E6; |
25 | 38 |
background-color: white; |
26 |
z-index: 2;
|
|
39 |
z-index: 1;
|
|
27 | 40 |
} |
28 | 41 |
|
29 | 42 |
.menu .logo { |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/full-page-slider/slide.component.ts | ||
---|---|---|
1 |
import {Component} from "@angular/core";
|
|
1 |
import {Component, Input} from '@angular/core';
|
|
2 | 2 |
import {animation} from "./animation"; |
3 | 3 |
import {transition, trigger} from "@angular/animations"; |
4 | 4 |
|
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/utils/properties/environment-specific.service.ts | ||
---|---|---|
7 | 7 |
|
8 | 8 |
import {EnvProperties} from './env-properties'; |
9 | 9 |
import {properties} from "../../../../environments/environment"; |
10 |
import {ConnectHelper} from "../../connect/connectHelper"; |
|
10 | 11 |
|
11 | 12 |
@Injectable() |
12 | 13 |
export class EnvironmentSpecificService { |
... | ... | |
14 | 15 |
public envSpecific: EnvProperties; |
15 | 16 |
public domain: string; |
16 | 17 |
private envSpecificSubject: BehaviorSubject<EnvProperties> = new BehaviorSubject<EnvProperties>(null); |
17 |
private propertiesPath = "/assets/env-properties.json?v=2"; |
|
18 |
|
|
18 |
|
|
19 | 19 |
constructor(private http: HttpClient, @Optional() @Inject(REQUEST) private request: Request) { |
20 |
properties.domain = "https://" + this.getDomain(); |
|
20 |
if(properties.adminToolsCommunity == "connect") { |
|
21 |
if(properties.environment == "development"){ |
|
22 |
properties.domain = "https://beta."+(ConnectHelper.getCommunityFromDomain(properties.domain)?ConnectHelper.getCommunityFromDomain(properties.domain):"connect")+".openaire.eu"; |
|
23 |
}else{ |
|
24 |
properties.domain = "https://" + this.getDomain(); |
|
25 |
} |
|
26 |
} |
|
21 | 27 |
} |
22 | 28 |
|
23 | 29 |
public loadEnvironment() { |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/deposit/depositFirstPage.component.ts | ||
---|---|---|
241 | 241 |
this.route.data |
242 | 242 |
.subscribe((data: { envSpecific: EnvProperties }) => { |
243 | 243 |
this.properties = data.envSpecific; |
244 |
this.url = this.properties.baseLink+this._router.url;
|
|
244 |
this.url = this.properties.domain+this.properties.baseLink + this._router.url;
|
|
245 | 245 |
this.seoService.createLinkForCanonicalURL(this.url, false); |
246 | 246 |
|
247 | 247 |
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."; |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/login/user.component.ts | ||
---|---|---|
7 | 7 |
|
8 | 8 |
import {EnvProperties} from '../utils/properties/env-properties'; |
9 | 9 |
import {UserManagementService} from "../services/user-management.service"; |
10 |
import {properties} from "../../../environments/environment"; |
|
10 | 11 |
|
11 | 12 |
@Component({ |
12 | 13 |
selector: 'user', |
... | ... | |
76 | 77 |
redirect() { |
77 | 78 |
if (this.redirectUrl && this.redirectUrl != "") { |
78 | 79 |
this.redirectUrl = decodeURIComponent(this.redirectUrl); |
79 |
var baseUrl = this.redirectUrl;
|
|
80 |
var route = this.redirectUrl;
|
|
80 | 81 |
var queryParams = ""; |
81 | 82 |
var paramsArray = []; |
82 | 83 |
var valuesArray = []; |
83 | 84 |
if (this.redirectUrl.indexOf('?') != -1) { |
84 |
baseUrl = this.redirectUrl.split('?')[0];
|
|
85 |
route = this.redirectUrl.split('?')[0];
|
|
85 | 86 |
queryParams = this.redirectUrl.split('?')[1]; |
86 | 87 |
} |
87 | 88 |
if (queryParams != "") { |
... | ... | |
90 | 91 |
paramsArray.push(queryParamsArray[i].split("=")[0]); |
91 | 92 |
valuesArray.push(queryParamsArray[i].split("=")[1]); |
92 | 93 |
} |
93 |
this.router.navigate([baseUrl], {queryParams: this.routerHelper.createQueryParams(paramsArray, valuesArray)});
|
|
94 |
this.router.navigate([route], {queryParams: this.routerHelper.createQueryParams(paramsArray, valuesArray)});
|
|
94 | 95 |
} else { |
95 |
this.router.navigate([baseUrl]);
|
|
96 |
this.router.navigate([route]);
|
|
96 | 97 |
} |
97 | 98 |
} |
98 | 99 |
// else{ |
... | ... | |
103 | 104 |
logIn() { |
104 | 105 |
if (this.redirectUrl && this.redirectUrl != "") { |
105 | 106 |
this.redirectUrl = decodeURIComponent(this.redirectUrl); |
106 |
var baseUrl = this.redirectUrl;
|
|
107 |
var route = this.redirectUrl;
|
|
107 | 108 |
var queryParams = ""; |
108 | 109 |
if (this.redirectUrl.indexOf('?') != -1) { |
109 | 110 |
var splits = this.redirectUrl.split('?'); |
110 | 111 |
if (splits.length > 0) { |
111 |
baseUrl = splits[0];
|
|
112 |
route = splits[0];
|
|
112 | 113 |
} |
113 | 114 |
if (splits.length > 1) { |
114 | 115 |
queryParams = splits[1]; |
115 | 116 |
} |
116 | 117 |
} |
117 |
Session.setReloadUrl(location.protocol + "//" + location.host, baseUrl, queryParams);
|
|
118 |
Session.setReloadUrl(location.protocol + "//" + location.host,properties.baseLink + route, queryParams);
|
|
118 | 119 |
} |
119 | 120 |
console.log(Session.getReloadUrl()); |
120 | 121 |
window.location.href = this.properties.loginUrl; |
121 | 122 |
} |
122 |
|
|
123 |
|
|
123 | 124 |
getTheRolesFormatted(roles: string[]) { |
124 | 125 |
let formattedRoles = []; |
125 | 126 |
for (let role of roles) { |
126 |
let formattedRole = role.split("urn:geant:openaire.eu:group:")[1]; |
|
127 |
formattedRole = formattedRole.split("#aai.openaire.eu")[0] |
|
128 |
formattedRole = formattedRole.replace("+", " "); |
|
129 |
formattedRole = formattedRole.split("+").join(" "); |
|
130 |
formattedRoles.push(formattedRole); |
|
127 |
if(role.includes("urn:geant:openaire.eu:group:")) { |
|
128 |
let formattedRole = role.split("urn:geant:openaire.eu:group:")[1]; |
|
129 |
formattedRole = formattedRole.split("#aai.openaire.eu")[0] |
|
130 |
formattedRole = formattedRole.replace("+", " "); |
|
131 |
formattedRole = formattedRole.split("+").join(" "); |
|
132 |
formattedRoles.push(formattedRole); |
|
133 |
} |
|
131 | 134 |
} |
132 | 135 |
return formattedRoles.join(", "); |
133 | 136 |
} |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/claims/linking/linkingGeneric.component.ts | ||
---|---|---|
58 | 58 |
this.route.data |
59 | 59 |
.subscribe((data: { envSpecific: EnvProperties }) => { |
60 | 60 |
this.properties = data.envSpecific; |
61 |
this.url = data.envSpecific.baseLink+this._router.url;
|
|
61 |
this.url = this.properties.domain + this.properties.baseLink+this._router.url;
|
|
62 | 62 |
|
63 | 63 |
var description = "Linking is a functionality provided by OpenAIRE, in order to link research results with a project, a research community or other research results."; |
64 | 64 |
this.updateTitle(this.pageTitle); |
modules/uoa-services-library/branches/use-UoaAdminToolsLibrary/ng-openaire-library/src/app/sharedComponents/schema2jsonld/service/open-aire-jsonld-converter.service.ts | ||
---|---|---|
23 | 23 |
if(description){ |
24 | 24 |
organization["description"] = description; |
25 | 25 |
} |
26 |
if(URL.indexOf(properties.baseLink) != -1) {
|
|
26 |
if((properties.domain.indexOf("connect.openaire.eu")!=-1 || properties.domain.indexOf("explore.openaire.eu")!=-1|| properties.domain.indexOf("monitor.openaire.eu")!=-1) && properties.baseLink == "/") {
|
|
27 | 27 |
const sameAs = ["https://www.openaire.eu", |
28 | 28 |
"https://www.facebook.com/groups/openaire/", |
29 | 29 |
"https://www.twitter.com/OpenAIRE_eu", |
... | ... | |
44 | 44 |
searchPage["@type"] = "Website"; |
45 | 45 |
searchPage["name"] = name; |
46 | 46 |
searchPage["url"] = URL + searchRoute; |
47 |
searchPage["logo"] = logoURL; |
|
47 |
if(logoURL && logoURL.length > 0 ) { |
|
48 |
searchPage["logo"] = logoURL; |
|
49 |
} |
|
48 | 50 |
if (description) { |
49 | 51 |
searchPage["description"] = description; |
50 | 52 |
} |
... | ... | |
82 | 84 |
buffer["url"] = URL; |
83 | 85 |
buffer["@id"] = URL; |
84 | 86 |
buffer["logo"] = logoURL; |
85 |
buffer["isPartOf"] = properties.baseLink+"/#search";
|
|
87 |
buffer["isPartOf"] = properties.domain+ properties.baseLink +"/#search";
|
|
86 | 88 |
if(searchAction){ |
87 | 89 |
return [buffer,this.createDefaultSearchPage(name, URL,logoURL,description,searchActionRoute) ] |
88 | 90 |
} |
... | ... | |
116 | 118 |
doc.identifier = new Array<Identifier>(); |
117 | 119 |
doc.identifier.push({id:project.funding.code, schema: "grantid"}); |
118 | 120 |
let funder = new Organization(); |
119 |
funder.id = properties.baseLink+"#funder-"+project.funding.funderShortName; |
|
121 |
funder.id = properties.domain + properties.baseLink+"#funder-"+project.funding.funderShortName;
|
|
120 | 122 |
funder.title = project.funding.funderName; |
121 | 123 |
doc.funder = funder; |
122 | 124 |
doc.url = URL; |
... | ... | |
196 | 198 |
private getDescription(result: any): String[] { |
197 | 199 |
const item = _.get(result, "result.metadata.oaf:entity.oaf:result.description", null); |
198 | 200 |
if (!item) return this.getTitle(result); |
199 |
let descr = Array.isArray(item) ? item[0]:item + ""; // +"" to make string: if description is number descr.substring returns error |
|
201 |
let descr = Array.isArray(item) ? item[0]+ "":item + ""; // +"" to make string: if description is number descr.substring returns error
|
|
200 | 202 |
return [descr?(descr.substring(0,4997)+(descr.substring(0,4997).length == 4997?'...':'')):"" as String]; |
201 | 203 |
} |
202 | 204 |
|
Also available in: Unified diff
[use-UoaAdminToolsLibrary | Library]: Merge trunk into branch.