[Library|Trunk]
errorPage: page=-1 parameter for private data message git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60744 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
7a000c3183
commit
fc2ab4046f
|
@ -14,13 +14,17 @@ import {properties} from "../../../environments/environment";
|
||||||
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
||||||
<div class="uk-container">
|
<div class="uk-container">
|
||||||
<h3>
|
<h3>
|
||||||
Bad karma: we can't find that page!
|
<span *ngIf="page !='-1'">Bad karma: we can't find that page!</span>
|
||||||
|
<div *ngIf="page =='-1'" class="uk-text-center uk-margin-large-top">
|
||||||
|
<svg _ngcontent-my-app-c8="" fill="black" height="24px" viewBox="0 0 24 24" width="24px" xmlns="http://www.w3.org/2000/svg"><path _ngcontent-my-app-c8="" d="M0 0h24v24H0z" fill="none"></path><path _ngcontent-my-app-c8="" d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"></path></svg>
|
||||||
|
Private Data</div>
|
||||||
</h3>
|
</h3>
|
||||||
<h6 *ngIf="page_type" class="uk-margin-remove">
|
<h6 *ngIf="page_type" class="uk-margin-remove">
|
||||||
Not valid or missing {{page_type_name}} id.
|
Not valid or missing {{page_type_name}} id.
|
||||||
<a *ngIf="page_type" routerLinkActive="router-link-active" [routerLink]="searchPage">Search </a>another {{page_type_name}}?
|
<a *ngIf="page_type" routerLinkActive="router-link-active" [routerLink]="searchPage">Search </a>another {{page_type_name}}?
|
||||||
</h6>
|
</h6>
|
||||||
<br>
|
<br>
|
||||||
|
<div *ngIf="page !='-1'">
|
||||||
<p>
|
<p>
|
||||||
You asked for {{page}}, but despite our computers looking very hard, we could not find it. What happened ?
|
You asked for {{page}}, but despite our computers looking very hard, we could not find it. What happened ?
|
||||||
</p>
|
</p>
|
||||||
|
@ -29,6 +33,7 @@ import {properties} from "../../../environments/environment";
|
||||||
<li>or somehow we removed that page, or gave it another name</li>
|
<li>or somehow we removed that page, or gave it another name</li>
|
||||||
<li>or, quite unlikely for sure, maybe you typed it yourself and there was a little mistake ?</li>
|
<li>or, quite unlikely for sure, maybe you typed it yourself and there was a little mistake ?</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,18 +61,27 @@ export class ErrorPageComponent {
|
||||||
//this.page = location.href;
|
//this.page = location.href;
|
||||||
}
|
}
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if(this.response) {
|
|
||||||
this.response.statusCode = 404;
|
|
||||||
this.response.statusMessage = '404 - Page not found';
|
|
||||||
}
|
|
||||||
this.seoService.createLinkForCanonicalURL(properties.domain + properties.baseLink + "/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'];
|
||||||
|
|
||||||
if (!this.page) {
|
if (!this.page) {
|
||||||
this.page = this._location.path(true);
|
this.page = this._location.path(true);
|
||||||
}
|
}
|
||||||
|
if(this.response && this.page!="-1") {
|
||||||
|
this.response.statusCode = 404;
|
||||||
|
this.response.statusMessage = '404 - Page not found';
|
||||||
|
var title = "OpenAIRE | Error page";
|
||||||
|
|
||||||
|
this._meta.updateTag({content:title},"property='og:title'");
|
||||||
|
this._title.setTitle(title);
|
||||||
|
}else{
|
||||||
|
var title = "OpenAIRE | Private data";
|
||||||
|
this._meta.updateTag({content:title},"property='og:title'");
|
||||||
|
this._title.setTitle(title);
|
||||||
|
}
|
||||||
this.page_type = data['page_type'];
|
this.page_type = data['page_type'];
|
||||||
if(this.page_type) {
|
if(this.page_type) {
|
||||||
if (this.page_type == "publication") {
|
if (this.page_type == "publication") {
|
||||||
|
|
Loading…
Reference in New Issue