[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:
parent
c22e64c46c
commit
7526ef56e3
|
@ -362,7 +362,7 @@ export class ClaimContextSearchFormComponent {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl": this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import {Dates} from "../../../utils/string-utils.class";
|
||||||
import {HelperService} from "../../../utils/helper/helper.service";
|
import {HelperService} from "../../../utils/helper/helper.service";
|
||||||
import {Meta, Title} from "@angular/platform-browser";
|
import {Meta, Title} from "@angular/platform-browser";
|
||||||
import {PiwikService} from "../../../utils/piwik/piwik.service";
|
import {PiwikService} from "../../../utils/piwik/piwik.service";
|
||||||
|
import {properties} from "../../../../../environments/environment";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -89,10 +90,9 @@ export class DisplayClaimsComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.data
|
|
||||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
this.properties = properties;
|
||||||
this.properties = data.envSpecific;
|
this.url = properties.domain + properties.baseLink + this._router.url;
|
||||||
this.url = data.envSpecific.baseLink + this._router.url;
|
|
||||||
|
|
||||||
var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community";
|
var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community";
|
||||||
this.updateTitle(this.title);
|
this.updateTitle(this.title);
|
||||||
|
@ -142,7 +142,7 @@ export class DisplayClaimsComponent {
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ export class LinkingGenericComponent {
|
||||||
this.route.data
|
this.route.data
|
||||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||||
this.properties = data.envSpecific;
|
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.";
|
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);
|
this.updateTitle(this.pageTitle);
|
||||||
|
|
|
@ -112,7 +112,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl": this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -140,7 +140,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl": this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -180,7 +180,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl":this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -246,7 +246,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl":this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -264,7 +264,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl": this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -97,7 +97,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
|
||||||
|
|
||||||
private getPageHelpContent(pageContentId: string) {
|
private getPageHelpContent(pageContentId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
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 {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
|
@ -127,7 +127,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
|
||||||
|
|
||||||
public saveCustom() {
|
public saveCustom() {
|
||||||
if(!Session.isLoggedIn()){
|
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 {
|
} else {
|
||||||
if(this.formComponent.myForm.valid) {
|
if(this.formComponent.myForm.valid) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
|
|
@ -78,7 +78,7 @@ export class NewPageHelpContentComponent {
|
||||||
|
|
||||||
public saveCustom() {
|
public saveCustom() {
|
||||||
if(!Session.isLoggedIn()){
|
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 {
|
} else {
|
||||||
//this.errorMessage = null;
|
//this.errorMessage = null;
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl": this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -132,7 +132,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl": this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -172,7 +172,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl": this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -242,7 +242,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl": this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -260,7 +260,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl": this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -312,7 +312,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
"redirectUrl": this.router.url
|
"redirectUrl":this.properties.baseLink + this.router.url
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -241,7 +241,7 @@ export class DepositFirstPageComponent {
|
||||||
this.route.data
|
this.route.data
|
||||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||||
this.properties = data.envSpecific;
|
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);
|
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.";
|
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.";
|
||||||
|
|
|
@ -63,7 +63,7 @@ export class ErrorPageComponent {
|
||||||
this.route.data
|
this.route.data
|
||||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||||
let properties = data.envSpecific;
|
let properties = data.envSpecific;
|
||||||
this.seoService.createLinkForCanonicalURL(properties.domain + "/error");
|
this.seoService.createLinkForCanonicalURL(properties.domain + properties.baseLink + "/error");
|
||||||
|
|
||||||
this.route.queryParams.subscribe(data => {
|
this.route.queryParams.subscribe(data => {
|
||||||
this.page = data['page'];
|
this.page = data['page'];
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<div *ngIf="dataProviderInfo != null" class="uk-grid uk-margin-remove-left uk-margin-large-bottom">
|
<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">
|
<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
|
<schema2jsonld *ngIf="dataProviderInfo" [data]=dataProviderInfo
|
||||||
[URL]="properties.baseLink+'/search/dataprovider?datasourceId='+datasourceId"
|
[URL]="properties.domain+ properties.baseLink +properties.searchLinkToDataProvider +datasourceId"
|
||||||
type="datasource"
|
type="datasource"
|
||||||
[otherURL]="(dataProviderInfo.openDoarId)?(properties.openDoarURL+dataProviderInfo.openDoarId):((dataProviderInfo.r3DataId)?properties.r3DataURL+dataProviderInfo.r3DataId:nul)"></schema2jsonld>
|
[otherURL]="(dataProviderInfo.openDoarId)?(properties.openDoarURL+dataProviderInfo.openDoarId):((dataProviderInfo.r3DataId)?properties.r3DataURL+dataProviderInfo.r3DataId:nul)"></schema2jsonld>
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ export class DataProviderComponent {
|
||||||
}
|
}
|
||||||
//this.getDivContents();
|
//this.getDivContents();
|
||||||
this.getPageContents();
|
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.sub = this.route.queryParams.subscribe(data => {
|
||||||
this.updateTitle("Content provider");
|
this.updateTitle("Content provider");
|
||||||
this.updateDescription("");
|
this.updateDescription("");
|
||||||
|
@ -247,7 +247,7 @@ export class DataProviderComponent {
|
||||||
this.subInfo = this._dataproviderService.getDataproviderInfo(this.datasourceId, this.properties).subscribe(
|
this.subInfo = this._dataproviderService.getDataproviderInfo(this.datasourceId, this.properties).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.dataProviderInfo = 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') {
|
if (typeof document !== 'undefined') {
|
||||||
this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId);
|
this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId);
|
||||||
} else {
|
} else {
|
||||||
|
@ -282,7 +282,7 @@ export class DataProviderComponent {
|
||||||
}
|
}
|
||||||
this.errorMessage = 'No dataProvider found';
|
this.errorMessage = 'No dataProvider found';
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToDataProviders);
|
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToDataProviders);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ export class HtmlProjectReportComponent {
|
||||||
//this.getDivContents();
|
//this.getDivContents();
|
||||||
this.getPageContents();
|
this.getPageContents();
|
||||||
this.updateUrl(data.envSpecific.baseLink + this._router.url);
|
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 => {
|
this.sub = this.route.queryParams.subscribe(params => {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<div *ngIf="organizationInfo != null" class="uk-grid uk-margin-remove">
|
<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">
|
<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
|
<schema2jsonld *ngIf="organizationInfo" [data]=organizationInfo
|
||||||
[URL]="properties.baseLink+'/search/organization?organizationId='+organizationId"
|
[URL]="properties.domain + properties.baseLink+'/search/organization?organizationId='+organizationId"
|
||||||
type="organization"></schema2jsonld>
|
type="organization"></schema2jsonld>
|
||||||
<landing-header [properties]="properties" [title]="organizationInfo.title.name"
|
<landing-header [properties]="properties" [title]="organizationInfo.title.name"
|
||||||
titleClass="uk-margin-remove-bottom"
|
titleClass="uk-margin-remove-bottom"
|
||||||
|
|
|
@ -333,7 +333,7 @@ export class OrganizationComponent {
|
||||||
this.errorMessage = 'No organization found';
|
this.errorMessage = 'No organization found';
|
||||||
} else {
|
} else {
|
||||||
this.organizationInfo = data;
|
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.updateTitle((this.organizationInfo.title.name?this.organizationInfo.title.name:(this.organizationInfo.name?this.organizationInfo.name:'No title available')));
|
||||||
this.updateDescription("Organization, country, " +
|
this.updateDescription("Organization, country, " +
|
||||||
(this.organizationInfo.title.name?this.organizationInfo.title.name:'No title available') +
|
(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.errorMessage = 'No organization found';
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
<div *ngIf="projectInfo != null" class="uk-grid uk-margin-remove-left uk-margin-large-bottom">
|
<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">
|
<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
|
<schema2jsonld *ngIf="projectInfo" [data]=projectInfo
|
||||||
[URL]="properties.baseLink+properties.searchLinkToProject+projectId"
|
[URL]="properties.domain+properties.baseLink+properties.searchLinkToProject+projectId"
|
||||||
type="project"></schema2jsonld>
|
type="project"></schema2jsonld>
|
||||||
<landing-header [properties]="properties" [title]="projectName"
|
<landing-header [properties]="properties" [title]="projectName"
|
||||||
[subTitle]="projectInfo.acronym ? projectInfo.title : ''"
|
[subTitle]="projectInfo.acronym ? projectInfo.title : ''"
|
||||||
|
|
|
@ -356,7 +356,7 @@ export class ProjectComponent {
|
||||||
if(err.status == 404) {
|
if(err.status == 404) {
|
||||||
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
|
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.errorMessage = 'No project found';
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ export class ProjectComponent {
|
||||||
if(err.status == 404) {
|
if(err.status == 404) {
|
||||||
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
|
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.errorMessage = 'No project found';
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
@ -397,7 +397,7 @@ export class ProjectComponent {
|
||||||
if (this.projectName == undefined || this.projectName == '') {
|
if (this.projectName == undefined || this.projectName == '') {
|
||||||
this.projectName = this.projectInfo.title;
|
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.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:"")));
|
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')) {
|
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||||
|
|
|
@ -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">
|
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-->
|
<!-- schema.org-->
|
||||||
<schema2jsonld *ngIf="resultLandingInfo.record" [data]=resultLandingInfo.record
|
<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"
|
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
|
||||||
[subTitle]="resultLandingInfo.subtitle"
|
[subTitle]="resultLandingInfo.subtitle"
|
||||||
[authors]="resultLandingInfo.authors" [authorLimit]="10" [showAllAuthors]="false"
|
[authors]="resultLandingInfo.authors" [authorLimit]="10" [showAllAuthors]="false"
|
||||||
|
|
|
@ -129,7 +129,7 @@ export class ResultLandingComponent {
|
||||||
}
|
}
|
||||||
//this.getDivContents();
|
//this.getDivContents();
|
||||||
this.getPageContents();
|
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.sub = this.route.queryParams.subscribe(data => {
|
||||||
this.resultLandingInfo = null;
|
this.resultLandingInfo = null;
|
||||||
if (data['articleId']) {
|
if (data['articleId']) {
|
||||||
|
@ -321,7 +321,7 @@ export class ResultLandingComponent {
|
||||||
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
|
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
|
||||||
this.updateUrlWithType();
|
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')) {
|
if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) {
|
||||||
this.getOpenCitations();
|
this.getOpenCitations();
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ export class ResultLandingComponent {
|
||||||
this.errorMessage += "No research product found";
|
this.errorMessage += "No research product found";
|
||||||
}
|
}
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.linkToSearchPage);
|
this.seoService.createLinkForCanonicalURL(this.properties.domain+ properties.baseLink + this.linkToSearchPage);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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" >
|
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle" >
|
||||||
|
|
|
@ -134,7 +134,7 @@ export class SearchComponent {
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
this._meta.updateTag({content: description}, "property='og:description'");
|
||||||
this._meta.updateTag({content: title}, "property='og:title'");
|
this._meta.updateTag({content: title}, "property='og:title'");
|
||||||
this._meta.updateTag({content: url}, "property='og:url'");
|
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')) {
|
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||||
this.subs.push(this._piwikService.trackView(this.properties, "OpenAIRE |Search publications, research data, projects...", this.piwikSiteId).subscribe());
|
this.subs.push(this._piwikService.trackView(this.properties, "OpenAIRE |Search publications, research data, projects...", this.piwikSiteId).subscribe());
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.baseLink+'/search/find'"
|
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.domain+ properties.baseLink +'/search/find'"
|
||||||
[logoURL]="properties.baseLink+logoURL" type="search" [name]=name
|
[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>
|
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">
|
<div class="uk-container-large uk-container">
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ export class SearchAllComponent {
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
this._meta.updateTag({content: description}, "property='og:description'");
|
||||||
this._meta.updateTag({content: title}, "property='og:title'");
|
this._meta.updateTag({content: title}, "property='og:title'");
|
||||||
this._meta.updateTag({content: url}, "property='og:url'");
|
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')) {
|
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||||
this.subs.push(this._piwikService.trackView(this.properties, title, this.piwikSiteId).subscribe());
|
this.subs.push(this._piwikService.trackView(this.properties, title, this.piwikSiteId).subscribe());
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ export class AdvancedSearchPageComponent {
|
||||||
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
||||||
|
|
||||||
this.updateBaseUrlWithParameters();
|
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*/
|
/* Code For Piwik*/
|
||||||
if (typeof localStorage !== 'undefined') {
|
if (typeof localStorage !== 'undefined') {
|
||||||
//console.log("In PreviousRouteRecorder : "+this.router.url );
|
//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')) {
|
if (this.isPiwikEnabled && (typeof document !== 'undefined')) {
|
||||||
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe();
|
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe();
|
||||||
|
|
|
@ -134,21 +134,18 @@ export class NewSearchPageComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.data
|
this.properties = properties;
|
||||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
|
||||||
this.properties = data.envSpecific;
|
|
||||||
//this.getDivContents();
|
//this.getDivContents();
|
||||||
this.getPageContents();
|
this.getPageContents();
|
||||||
this.pagingLimit = data.envSpecific.pagingLimit;
|
this.pagingLimit = this.properties.pagingLimit;
|
||||||
this.resultsPerPage = data.envSpecific.resultsPerPage;
|
this.resultsPerPage = this.properties.resultsPerPage;
|
||||||
this.csvLimit = data.envSpecific.csvLimit;
|
this.csvLimit = this.properties.csvLimit;
|
||||||
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;
|
this.isPiwikEnabled = this.properties.enablePiwikTrack;
|
||||||
this.updateUrl(data.envSpecific.baseLink + this.router.url);
|
this.updateUrl(this.properties.domain + this.properties.baseLink + this.router.url);
|
||||||
this.url = data.envSpecific.baseLink + this.router.url;
|
this.url = this.properties.domain + this.properties.baseLink + this.router.url;
|
||||||
if (typeof document !== 'undefined' && this.isPiwikEnabled && !this.includeOnlyResultsAndFilter) {
|
if (typeof document !== 'undefined' && this.isPiwikEnabled && !this.includeOnlyResultsAndFilter) {
|
||||||
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe();
|
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
this.route.queryParams.subscribe(params => {
|
this.route.queryParams.subscribe(params => {
|
||||||
if (params['page'] && params['page'] != 1) {
|
if (params['page'] && params['page'] != 1) {
|
||||||
HelperFunctions.scrollToId("searchForm");
|
HelperFunctions.scrollToId("searchForm");
|
||||||
|
@ -173,7 +170,7 @@ export class NewSearchPageComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
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: '/'});
|
this.breadcrumbs.push({name: 'home', route: '/'});
|
||||||
if(this.simpleView) {
|
if(this.simpleView) {
|
||||||
this.breadcrumbs.push( {name: "Search", route: null});
|
this.breadcrumbs.push( {name: "Search", route: null});
|
||||||
|
|
|
@ -89,7 +89,7 @@ export class PortalSearchResultComponent implements OnInit, OnChanges{
|
||||||
}
|
}
|
||||||
|
|
||||||
public getStakeholderPageUrl(stakeholder: Stakeholder) {
|
public getStakeholderPageUrl(stakeholder: Stakeholder) {
|
||||||
return this.properties.baseLink + '/dashboard/' + stakeholder.alias;
|
return this.properties.domain + this.properties.baseLink +"/" + stakeholder.alias;
|
||||||
}
|
}
|
||||||
|
|
||||||
public goToPage(data: any) {
|
public goToPage(data: any) {
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</div>
|
</div>
|
||||||
</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 id="tm-main" class=" uk-section uk-padding-remove-top tm-middle">
|
||||||
<div *ngIf="breadcrumbs" class="uk-container uk-margin-small-top">
|
<div *ngIf="breadcrumbs" class="uk-container uk-margin-small-top">
|
||||||
|
|
|
@ -117,7 +117,7 @@ export class SearchPageComponent {
|
||||||
this.updateTitle(this.pageTitle);
|
this.updateTitle(this.pageTitle);
|
||||||
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle;
|
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle;
|
||||||
this.updateDescription(description);
|
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() {
|
private getPageContents() {
|
||||||
|
|
|
@ -114,7 +114,7 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
|
||||||
this.updateTitle(this.pageTitle);
|
this.updateTitle(this.pageTitle);
|
||||||
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle;
|
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle;
|
||||||
this.updateDescription(description);
|
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});
|
this.breadcrumbs.push({name: 'home', route: '/'}, {name: this.pageTitle, route: null});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ export class OpenAireJsonldConverterService {
|
||||||
if(description){
|
if(description){
|
||||||
organization["description"] = 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",
|
const sameAs = ["https://www.openaire.eu",
|
||||||
"https://www.facebook.com/groups/openaire/",
|
"https://www.facebook.com/groups/openaire/",
|
||||||
"https://www.twitter.com/OpenAIRE_eu",
|
"https://www.twitter.com/OpenAIRE_eu",
|
||||||
|
@ -82,7 +82,7 @@ export class OpenAireJsonldConverterService {
|
||||||
buffer["url"] = URL;
|
buffer["url"] = URL;
|
||||||
buffer["@id"] = URL;
|
buffer["@id"] = URL;
|
||||||
buffer["logo"] = logoURL;
|
buffer["logo"] = logoURL;
|
||||||
buffer["isPartOf"] = properties.baseLink+"/#search";
|
buffer["isPartOf"] = properties.domain+ properties.baseLink +"/#search";
|
||||||
if(searchAction){
|
if(searchAction){
|
||||||
return [buffer,this.createDefaultSearchPage(name, URL,logoURL,description,searchActionRoute) ]
|
return [buffer,this.createDefaultSearchPage(name, URL,logoURL,description,searchActionRoute) ]
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ export class OpenAireJsonldConverterService {
|
||||||
doc.identifier = new Array<Identifier>();
|
doc.identifier = new Array<Identifier>();
|
||||||
doc.identifier.push({id:project.funding.code, schema: "grantid"});
|
doc.identifier.push({id:project.funding.code, schema: "grantid"});
|
||||||
let funder = new Organization();
|
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;
|
funder.title = project.funding.funderName;
|
||||||
doc.funder = funder;
|
doc.funder = funder;
|
||||||
doc.url = URL;
|
doc.url = URL;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {EnvProperties} from "../properties/env-properties";
|
||||||
target="_blank">
|
target="_blank">
|
||||||
Manage
|
Manage
|
||||||
</a>
|
</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'"
|
[class]=" ((buttonSizeSmall)?'uk-button-small':'')+' uk-button portal-button'"
|
||||||
target="_blank">
|
target="_blank">
|
||||||
Manage
|
Manage
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { CanDeactivate, Router} from '@angular/router';
|
import { CanDeactivate, Router} from '@angular/router';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
|
import {properties} from "../../../../environments/environment";
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
@ -11,8 +12,8 @@ export class PreviousRouteRecorder implements CanDeactivate<any> {
|
||||||
}
|
}
|
||||||
canDeactivate(component: any): Observable<boolean> | boolean {
|
canDeactivate(component: any): Observable<boolean> | boolean {
|
||||||
if (typeof localStorage !== 'undefined') {
|
if (typeof localStorage !== 'undefined') {
|
||||||
// console.log("In PreviousRouteRecorder : "+this.router.url );
|
// console.log("In PreviousRouteRecorder : "+properties.baseLink + this.router.url );
|
||||||
localStorage.setItem('previousRoute', this.router.url);
|
localStorage.setItem('previousRoute', properties.baseLink + this.router.url);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,12 @@ export class EnvironmentSpecificService {
|
||||||
public envSpecific: EnvProperties;
|
public envSpecific: EnvProperties;
|
||||||
public domain: string;
|
public domain: string;
|
||||||
private envSpecificSubject: BehaviorSubject<EnvProperties> = new BehaviorSubject<EnvProperties>(null);
|
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) {
|
constructor(private http: HttpClient, @Optional() @Inject(REQUEST) private request: Request) {
|
||||||
|
if(properties.adminToolsCommunity == "connect") {
|
||||||
properties.domain = "https://" + this.getDomain();
|
properties.domain = "https://" + this.getDomain();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public loadEnvironment() {
|
public loadEnvironment() {
|
||||||
this.envSpecific = properties;
|
this.envSpecific = properties;
|
||||||
|
|
Loading…
Reference in New Issue