[Library|Trunk]

properties changes: 
	domain:
	  -is https://{explore,connect,monitor, etc}.openaire.eu 
	  -initialized in environment files
	  -reset for communities in EnvironmentSpecificService
	baseLink: is the prefix after the domain / or /dahsboard for monitor_dashboard
apply in all pages domain and baseLink changes

	


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59411 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-09-18 07:57:42 +00:00
parent c22e64c46c
commit 7526ef56e3
32 changed files with 76 additions and 76 deletions

View File

@ -362,7 +362,7 @@ export class ClaimContextSearchFormComponent {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
}

View File

@ -16,6 +16,7 @@ import {Dates} from "../../../utils/string-utils.class";
import {HelperService} from "../../../utils/helper/helper.service";
import {Meta, Title} from "@angular/platform-browser";
import {PiwikService} from "../../../utils/piwik/piwik.service";
import {properties} from "../../../../../environments/environment";
@Component({
@ -89,10 +90,9 @@ export class DisplayClaimsComponent {
}
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.url = data.envSpecific.baseLink + this._router.url;
this.properties = properties;
this.url = properties.domain + properties.baseLink + this._router.url;
var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community";
this.updateTitle(this.title);
@ -142,7 +142,7 @@ export class DisplayClaimsComponent {
});
});
});
}

View File

@ -58,7 +58,7 @@ export class LinkingGenericComponent {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.url = data.envSpecific.baseLink+this._router.url;
this.url = this.properties.domain + this.properties.baseLink+this._router.url;
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.";
this.updateTitle(this.pageTitle);

View File

@ -112,7 +112,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
} else {
@ -140,7 +140,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
} else {
@ -180,7 +180,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl":this.properties.baseLink + this.router.url
}
});
} else {
@ -246,7 +246,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl":this.properties.baseLink + this.router.url
}
});
} else {
@ -264,7 +264,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
} else {

View File

@ -97,7 +97,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
private getPageHelpContent(pageContentId: string) {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.properties.baseLink + this.router.url} });
} else {
this.showLoading = true;
this.errorMessage = "";
@ -127,7 +127,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
public saveCustom() {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.properties.baseLink + this.router.url} });
} else {
if(this.formComponent.myForm.valid) {
this.showLoading = true;

View File

@ -78,7 +78,7 @@ export class NewPageHelpContentComponent {
public saveCustom() {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.properties.baseLink + this.router.url} });
} else {
//this.errorMessage = null;

View File

@ -104,7 +104,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
} else {
@ -132,7 +132,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
} else {
@ -172,7 +172,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
} else {
@ -242,7 +242,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
} else {
@ -260,7 +260,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl": this.properties.baseLink + this.router.url
}
});
} else {
@ -312,7 +312,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
"redirectUrl":this.properties.baseLink + this.router.url
}
});
} else {

View File

@ -241,7 +241,7 @@ export class DepositFirstPageComponent {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.url = this.properties.domain+this._router.url;
this.url = this.properties.domain+this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url, false);
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.";

View File

@ -63,7 +63,7 @@ export class ErrorPageComponent {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
let properties = data.envSpecific;
this.seoService.createLinkForCanonicalURL(properties.domain + "/error");
this.seoService.createLinkForCanonicalURL(properties.domain + properties.baseLink + "/error");
this.route.queryParams.subscribe(data => {
this.page = data['page'];

View File

@ -15,7 +15,7 @@
<div *ngIf="dataProviderInfo != null" class="uk-grid uk-margin-remove-left uk-margin-large-bottom">
<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">
<schema2jsonld *ngIf="dataProviderInfo" [data]=dataProviderInfo
[URL]="properties.baseLink+'/search/dataprovider?datasourceId='+datasourceId"
[URL]="properties.domain+ properties.baseLink +properties.searchLinkToDataProvider +datasourceId"
type="datasource"
[otherURL]="(dataProviderInfo.openDoarId)?(properties.openDoarURL+dataProviderInfo.openDoarId):((dataProviderInfo.r3DataId)?properties.r3DataURL+dataProviderInfo.r3DataId:nul)"></schema2jsonld>

View File

@ -161,7 +161,7 @@ export class DataProviderComponent {
}
//this.getDivContents();
this.getPageContents();
this.updateUrl(this.properties.domain + this._router.url);
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
this.sub = this.route.queryParams.subscribe(data => {
this.updateTitle("Content provider");
this.updateDescription("");
@ -247,7 +247,7 @@ export class DataProviderComponent {
this.subInfo = this._dataproviderService.getDataproviderInfo(this.datasourceId, this.properties).subscribe(
data => {
this.dataProviderInfo = data;
this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url);
if (typeof document !== 'undefined') {
this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId);
} else {
@ -282,7 +282,7 @@ export class DataProviderComponent {
}
this.errorMessage = 'No dataProvider found';
this.showLoading = false;
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToDataProviders);
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToDataProviders);
}
);
}

View File

@ -92,7 +92,7 @@ export class HtmlProjectReportComponent {
//this.getDivContents();
this.getPageContents();
this.updateUrl(data.envSpecific.baseLink + this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this._router.url);
});
this.sub = this.route.queryParams.subscribe(params => {

View File

@ -14,7 +14,7 @@
<div *ngIf="organizationInfo != null" class="uk-grid uk-margin-remove">
<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">
<schema2jsonld *ngIf="organizationInfo" [data]=organizationInfo
[URL]="properties.baseLink+'/search/organization?organizationId='+organizationId"
[URL]="properties.domain + properties.baseLink+'/search/organization?organizationId='+organizationId"
type="organization"></schema2jsonld>
<landing-header [properties]="properties" [title]="organizationInfo.title.name"
titleClass="uk-margin-remove-bottom"

View File

@ -333,7 +333,7 @@ export class OrganizationComponent {
this.errorMessage = 'No organization found';
} else {
this.organizationInfo = data;
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToOrganization + this.organizationInfo.relcanId);
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToOrganization + this.organizationInfo.relcanId);
this.updateTitle((this.organizationInfo.title.name?this.organizationInfo.title.name:(this.organizationInfo.name?this.organizationInfo.name:'No title available')));
this.updateDescription("Organization, country, " +
(this.organizationInfo.title.name?this.organizationInfo.title.name:'No title available') +
@ -364,7 +364,7 @@ export class OrganizationComponent {
}
});
}
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToOrganizations);
this.seoService.createLinkForCanonicalURL(this.properties.domain+ this.properties.baseLink + this.properties.searchLinkToOrganizations);
this.errorMessage = 'No organization found';
this.showLoading = false;
}

View File

@ -92,7 +92,7 @@
<div *ngIf="projectInfo != null" class="uk-grid uk-margin-remove-left uk-margin-large-bottom">
<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">
<schema2jsonld *ngIf="projectInfo" [data]=projectInfo
[URL]="properties.baseLink+properties.searchLinkToProject+projectId"
[URL]="properties.domain+properties.baseLink+properties.searchLinkToProject+projectId"
type="project"></schema2jsonld>
<landing-header [properties]="properties" [title]="projectName"
[subTitle]="projectInfo.acronym ? projectInfo.title : ''"

View File

@ -356,7 +356,7 @@ export class ProjectComponent {
if(err.status == 404) {
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
}
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToProjects);
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToProjects);
this.errorMessage = 'No project found';
this.showLoading = false;
}
@ -385,7 +385,7 @@ export class ProjectComponent {
if(err.status == 404) {
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
}
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToProjects);
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToProjects);
this.errorMessage = 'No project found';
this.showLoading = false;
}
@ -397,7 +397,7 @@ export class ProjectComponent {
if (this.projectName == undefined || this.projectName == '') {
this.projectName = this.projectInfo.title;
}
this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this._router.url);
this.updateTitle(this.projectName);
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:"")));
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {

View File

@ -18,7 +18,7 @@
class="uk-width-2-3@m uk-width-1-1@s uk-padding uk-padding-remove-left uk-padding-remove-vertical uk-margin-bottom">
<!-- schema.org-->
<schema2jsonld *ngIf="resultLandingInfo.record" [data]=resultLandingInfo.record
[URL]="properties.baseLink+linkToLandingPage+id"></schema2jsonld>
[URL]="properties.domain+ properties.baseLink +linkToLandingPage+id"></schema2jsonld>
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
[subTitle]="resultLandingInfo.subtitle"
[authors]="resultLandingInfo.authors" [authorLimit]="10" [showAllAuthors]="false"

View File

@ -129,7 +129,7 @@ export class ResultLandingComponent {
}
//this.getDivContents();
this.getPageContents();
this.updateUrl(this.properties.domain + this._router.url);
this.updateUrl(this.properties.domain +this.properties.baseLink + this._router.url);
this.sub = this.route.queryParams.subscribe(data => {
this.resultLandingInfo = null;
if (data['articleId']) {
@ -321,7 +321,7 @@ export class ResultLandingComponent {
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
this.updateUrlWithType();
}
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.linkToLandingPage + this.resultLandingInfo.relcanId);
this.seoService.createLinkForCanonicalURL(this.properties.domain+ properties.baseLink + this.linkToLandingPage + this.resultLandingInfo.relcanId);
if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) {
this.getOpenCitations();
}
@ -369,7 +369,7 @@ export class ResultLandingComponent {
this.errorMessage += "No research product found";
}
this.showLoading = false;
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.linkToSearchPage);
this.seoService.createLinkForCanonicalURL(this.properties.domain+ properties.baseLink + this.linkToSearchPage);
}
);
}

View File

@ -18,7 +18,8 @@
</div>
</div>
</div>
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.baseLink+'/search/find'" [logoURL] = "properties.baseLink+logoURL" type="search" [name]=name></schema2jsonld>
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.domain + properties.baseLink +'/search/find'" [logoURL] =
"properties.domain+ properties.baseLink +logoURL" type="search" [name]=name></schema2jsonld>
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle" >

View File

@ -134,7 +134,7 @@ export class SearchComponent {
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: title}, "property='og:title'");
this._meta.updateTag({content: url}, "property='og:url'");
this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url, false);
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url, false);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, "OpenAIRE |Search publications, research data, projects...", this.piwikSiteId).subscribe());

View File

@ -30,8 +30,8 @@
</div>
</div>
</div>
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.baseLink+'/search/find'"
[logoURL]="properties.baseLink+logoURL" type="search" [name]=name
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.domain+ properties.baseLink +'/search/find'"
[logoURL]="properties.domain + properties.baseLink+logoURL" type="search" [name]=name
description="Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Research Graph. "></schema2jsonld>
<div class="uk-container-large uk-container">

View File

@ -153,7 +153,7 @@ export class SearchAllComponent {
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: title}, "property='og:title'");
this._meta.updateTag({content: url}, "property='og:url'");
this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url, false);
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url, false);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, title, this.piwikSiteId).subscribe());

View File

@ -97,7 +97,7 @@ export class AdvancedSearchPageComponent {
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
this.updateBaseUrlWithParameters();
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.router.url, false);
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this.router.url, false);
}
@ -295,7 +295,7 @@ export class AdvancedSearchPageComponent {
/* Code For Piwik*/
if (typeof localStorage !== 'undefined') {
//console.log("In PreviousRouteRecorder : "+this.router.url );
localStorage.setItem('previousRoute', this.router.url);
localStorage.setItem('previousRoute', this.properties.baseLink + this.router.url);
}
if (this.isPiwikEnabled && (typeof document !== 'undefined')) {
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe();

View File

@ -134,21 +134,18 @@ export class NewSearchPageComponent {
}
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.pagingLimit = data.envSpecific.pagingLimit;
this.resultsPerPage = data.envSpecific.resultsPerPage;
this.csvLimit = data.envSpecific.csvLimit;
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;
this.updateUrl(data.envSpecific.baseLink + this.router.url);
this.url = data.envSpecific.baseLink + this.router.url;
if (typeof document !== 'undefined' && this.isPiwikEnabled && !this.includeOnlyResultsAndFilter) {
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe();
}
});
this.properties = properties;
//this.getDivContents();
this.getPageContents();
this.pagingLimit = this.properties.pagingLimit;
this.resultsPerPage = this.properties.resultsPerPage;
this.csvLimit = this.properties.csvLimit;
this.isPiwikEnabled = this.properties.enablePiwikTrack;
this.updateUrl(this.properties.domain + this.properties.baseLink + this.router.url);
this.url = this.properties.domain + this.properties.baseLink + this.router.url;
if (typeof document !== 'undefined' && this.isPiwikEnabled && !this.includeOnlyResultsAndFilter) {
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe();
}
this.route.queryParams.subscribe(params => {
if (params['page'] && params['page'] != 1) {
HelperFunctions.scrollToId("searchForm");
@ -173,7 +170,7 @@ export class NewSearchPageComponent {
}
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.router.url, false);
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.router.url, false);
this.breadcrumbs.push({name: 'home', route: '/'});
if(this.simpleView) {
this.breadcrumbs.push( {name: "Search", route: null});

View File

@ -87,9 +87,9 @@ export class PortalSearchResultComponent implements OnInit, OnChanges{
}
return url;
}
public getStakeholderPageUrl(stakeholder: Stakeholder) {
return this.properties.baseLink + '/dashboard/' + stakeholder.alias;
return this.properties.domain + this.properties.baseLink +"/" + stakeholder.alias;
}
public goToPage(data: any) {

View File

@ -42,7 +42,7 @@
</div>
</div>
<schema2jsonld [URL]="properties.baseLink+baseUrl" type="search" [name]=pageTitle></schema2jsonld>
<schema2jsonld [URL]="properties.domain+baseUrl" type="search" [name]=pageTitle></schema2jsonld>
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle">
<div *ngIf="breadcrumbs" class="uk-container uk-margin-small-top">

View File

@ -117,7 +117,7 @@ export class SearchPageComponent {
this.updateTitle(this.pageTitle);
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle;
this.updateDescription(description);
this.seoService.createLinkForCanonicalURL(this.properties.domain+this.router.url,false);
this.seoService.createLinkForCanonicalURL(this.properties.domain+this.properties.baseLink + this.router.url,false);
}
private getPageContents() {

View File

@ -114,7 +114,7 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
this.updateTitle(this.pageTitle);
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle;
this.updateDescription(description);
this.seoService.createLinkForCanonicalURL(this.properties.domain+this.router.url,false);
this.seoService.createLinkForCanonicalURL(this.properties.domain+ this.properties.baseLink +this.router.url,false);
this.breadcrumbs.push({name: 'home', route: '/'}, {name: this.pageTitle, route: null});

View File

@ -23,7 +23,7 @@ export class OpenAireJsonldConverterService {
if(description){
organization["description"] = description;
}
if(URL.indexOf(properties.baseLink) != -1) {
if((properties.domain.indexOf("connect.openaire.eu")!=-1 || properties.domain.indexOf("explore.openaire.eu")!=-1|| properties.domain.indexOf("monitor.openaire.eu")!=-1) && properties.baseLink == "/") {
const sameAs = ["https://www.openaire.eu",
"https://www.facebook.com/groups/openaire/",
"https://www.twitter.com/OpenAIRE_eu",
@ -82,7 +82,7 @@ export class OpenAireJsonldConverterService {
buffer["url"] = URL;
buffer["@id"] = URL;
buffer["logo"] = logoURL;
buffer["isPartOf"] = properties.baseLink+"/#search";
buffer["isPartOf"] = properties.domain+ properties.baseLink +"/#search";
if(searchAction){
return [buffer,this.createDefaultSearchPage(name, URL,logoURL,description,searchActionRoute) ]
}
@ -116,7 +116,7 @@ export class OpenAireJsonldConverterService {
doc.identifier = new Array<Identifier>();
doc.identifier.push({id:project.funding.code, schema: "grantid"});
let funder = new Organization();
funder.id = properties.baseLink+"#funder-"+project.funding.funderShortName;
funder.id = properties.domain + properties.baseLink+"#funder-"+project.funding.funderShortName;
funder.title = project.funding.funderName;
doc.funder = funder;
doc.url = URL;

View File

@ -8,7 +8,7 @@ import {EnvProperties} from "../properties/env-properties";
target="_blank">
Manage
</a>
<a *ngIf="alias" [href]="properties.baseLink + '/dashboard/admin/' + alias"
<a *ngIf="alias" [href]="properties.domain + properties.baseLink + '/admin/' + alias"
[class]=" ((buttonSizeSmall)?'uk-button-small':'')+' uk-button portal-button'"
target="_blank">
Manage

View File

@ -2,6 +2,7 @@
import { Injectable } from '@angular/core';
import { CanDeactivate, Router} from '@angular/router';
import {Observable} from 'rxjs';
import {properties} from "../../../../environments/environment";
@Injectable({
providedIn: 'root'
@ -11,8 +12,8 @@ export class PreviousRouteRecorder implements CanDeactivate<any> {
}
canDeactivate(component: any): Observable<boolean> | boolean {
if (typeof localStorage !== 'undefined') {
// console.log("In PreviousRouteRecorder : "+this.router.url );
localStorage.setItem('previousRoute', this.router.url);
// console.log("In PreviousRouteRecorder : "+properties.baseLink + this.router.url );
localStorage.setItem('previousRoute', properties.baseLink + this.router.url);
}
return true;
}

View File

@ -14,10 +14,11 @@ export class EnvironmentSpecificService {
public envSpecific: EnvProperties;
public domain: string;
private envSpecificSubject: BehaviorSubject<EnvProperties> = new BehaviorSubject<EnvProperties>(null);
private propertiesPath = "/assets/env-properties.json?v=2";
constructor(private http: HttpClient, @Optional() @Inject(REQUEST) private request: Request) {
properties.domain = "https://" + this.getDomain();
if(properties.adminToolsCommunity == "connect") {
properties.domain = "https://" + this.getDomain();
}
}
public loadEnvironment() {