[Trunk|Library]: Add at search page hasPrefix parameter with default value true
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55343 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
bb3a22be2b
commit
259dc565ff
|
@ -51,6 +51,7 @@ export class SearchPageComponent {
|
||||||
@Input() mapTooltipType: string ="content providers";
|
@Input() mapTooltipType: string ="content providers";
|
||||||
@Input() newQueryButton: boolean = true;
|
@Input() newQueryButton: boolean = true;
|
||||||
@Input() lastIndex: boolean = true;
|
@Input() lastIndex: boolean = true;
|
||||||
|
@Input() hasPrefix: boolean = true;
|
||||||
//@Input() sortBy: string = "";
|
//@Input() sortBy: string = "";
|
||||||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||||
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};
|
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};
|
||||||
|
@ -117,12 +118,19 @@ export class SearchPageComponent {
|
||||||
this._meta.updateTag({content:description},"name='description'");
|
this._meta.updateTag({content:description},"name='description'");
|
||||||
this._meta.updateTag({content:description},"property='og:description'");
|
this._meta.updateTag({content:description},"property='og:description'");
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTitle(title:string) {
|
updateTitle(title:string) {
|
||||||
var _prefix ="OpenAIRE | ";
|
let _title: string;
|
||||||
var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
|
if(this.hasPrefix == true) {
|
||||||
|
let _prefix ="OpenAIRE | ";
|
||||||
|
_title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
||||||
|
} else {
|
||||||
|
_title = ((title.length > 50) ? title.substring(0, 50) : title);
|
||||||
|
}
|
||||||
this._title.setTitle(_title);
|
this._title.setTitle(_title);
|
||||||
this._meta.updateTag({content:_title},"property='og:title'");
|
this._meta.updateTag({content:_title},"property='og:title'");
|
||||||
}
|
}
|
||||||
|
|
||||||
updateUrl(url:string) {
|
updateUrl(url:string) {
|
||||||
this._meta.updateTag({content:url},"property='og:url'");
|
this._meta.updateTag({content:url},"property='og:url'");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue