[Library|Trunk]
Search page: fix for undefined properties add page prefix as an input() attribute (for connect) git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60986 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
ac16d505d6
commit
3d7a6e7260
|
@ -35,6 +35,7 @@ export class NewSearchPageComponent {
|
|||
@ViewChild('offcanvas_element') offcanvasElement: ElementRef;
|
||||
@Input() piwikSiteId = null;
|
||||
@Input() hasPrefix: boolean = true;
|
||||
@Input() prefix: "OpenAIRE | ";
|
||||
@Input() pageTitle = "";
|
||||
pageTitleWithFilters = "";
|
||||
@Input() results = [];
|
||||
|
@ -138,7 +139,6 @@ export class NewSearchPageComponent {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
// this.properties = properties;
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
this.pagingLimit = this.properties.pagingLimit;
|
||||
|
@ -166,6 +166,7 @@ export class NewSearchPageComponent {
|
|||
this.basicMetaDescription.push(this.pageTitle)
|
||||
}
|
||||
}
|
||||
console.log("title " + this.pageTitle, this.basicMetaDescription)
|
||||
this.updateMeta(this.pageTitle);
|
||||
});
|
||||
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
||||
|
@ -248,11 +249,7 @@ export class NewSearchPageComponent {
|
|||
}
|
||||
|
||||
updateTitle(title: string, filters:string) {
|
||||
let _prefix = "";
|
||||
if (this.hasPrefix) {
|
||||
_prefix = "OpenAIRE | ";
|
||||
}
|
||||
let _title = _prefix + filters + title;
|
||||
let _title = (this.hasPrefix?this.prefix:"") + filters + title;
|
||||
// _title = ((_title.length > 50) ? _title.substring(0, 50) : _title);
|
||||
this.pageTitleWithFilters = _title;
|
||||
this._title.setTitle(_title);
|
||||
|
|
Loading…
Reference in New Issue