Revision 53258
Added by Argiro Kokogiannaki over 5 years ago
publicationTitleFormatter.component.ts | ||
---|---|---|
1 | 1 |
import {Component, Input} from '@angular/core'; |
2 |
import {RouterHelper} from '../../../utils/routerHelper.class'; |
|
2 | 3 |
|
3 | 4 |
//Usage Example "<publication-title [title]="X" [url]="X" > </publication-title>" |
4 | 5 |
|
... | ... | |
6 | 7 |
selector: 'publication-title', |
7 | 8 |
template: ` |
8 | 9 |
<span class="publication-title"> |
9 |
<span *ngIf="url" ><a target="_blank" href="{{url}}" ><span class="custom-external custom-icon" ></span> {{title}}</a></span> |
|
10 |
<span *ngIf="!url" >{{title}}</span> |
|
11 |
</span> |
|
10 |
|
|
11 |
<span *ngIf="id" ><a [queryParams]="routerHelper.createQueryParam(param,id)" routerLinkActive="router-link-active" [routerLink]="path" > {{title}}</a></span> |
|
12 |
<!--span *ngIf="url" class="uk-margin-small-left" ><a target="_blank" href="{{url}}" > |
|
13 |
(<span class="custom-external custom-icon" ></span>link)</a></span--> |
|
14 |
</span> |
|
12 | 15 |
` |
13 | 16 |
}) |
14 | 17 |
|
15 | 18 |
export class PublicationTitleFormatter { |
16 |
@Input() title: string[]; |
|
17 |
@Input() url: string[]; |
|
18 |
|
|
19 |
@Input() title: string; |
|
20 |
@Input() url: string; |
|
21 |
@Input() id: string; |
|
22 |
@Input() param: string; |
|
23 |
@Input() path: string; |
|
24 |
public routerHelper:RouterHelper = new RouterHelper(); |
|
19 | 25 |
constructor () {} |
20 | 26 |
|
21 | 27 |
ngOnInit() { |
Also available in: Unified diff
Dispaly claims:
show the link to openaire
change claims to links
Change stats url to use production stats
Change widget url to use production
Hide Orp/software for production