2017-12-19 13:53:46 +01:00
|
|
|
import {Component, Input} from '@angular/core';
|
2018-09-26 15:56:21 +02:00
|
|
|
import {RouterHelper} from '../../../utils/routerHelper.class';
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
//Usage Example "<publication-title [title]="X" [url]="X" > </publication-title>"
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'publication-title',
|
|
|
|
template: `
|
2021-02-10 11:24:52 +01:00
|
|
|
<span *ngIf="!externalPortalUrl" class="publication-title uk-text-large">
|
2018-09-26 15:56:21 +02:00
|
|
|
|
2022-05-16 13:07:15 +02:00
|
|
|
<span *ngIf="entity.openaireId" class="uk-h6"><a [queryParams]="routerHelper.createQueryParam(param,entity.openaireId)" routerLinkActive="router-link-active"
|
|
|
|
[routerLink]="path" class="uk-link uk-link-heading"> {{entity.title?entity.title:"[No title available]"}}</a></span>
|
2019-07-23 14:23:12 +02:00
|
|
|
<!--span *ngIf="url" class="uk-margin-small-left" ><a target="_blank" href="{{url}}" >
|
|
|
|
(<span class="custom-external custom-icon" ></span>link)</a></span-->
|
2018-09-26 15:56:21 +02:00
|
|
|
</span>
|
2021-02-10 11:24:52 +01:00
|
|
|
<span *ngIf="externalPortalUrl" class="publication-title uk-text-large">
|
2019-01-29 15:08:29 +01:00
|
|
|
|
2019-07-23 14:23:12 +02:00
|
|
|
<span *ngIf="entity.openaireId"><a [href]="externalPortalUrl + path+'?'+param+'='+entity.openaireId"> {{entity.title}}</a></span>
|
2019-01-29 15:08:29 +01:00
|
|
|
</span>
|
2019-07-23 14:23:12 +02:00
|
|
|
|
|
|
|
<!-- <div *ngIf="entity.accessRights || entity.bestLicense">-->
|
|
|
|
<!-- <span class="uk-text-muted">Access mode </span>{{entity.accessRights}} {{entity.bestLicense}}-->
|
|
|
|
<!-- <span class=" " *ngIf="entity.accessRights == 'EMBARGO' && entity.embargoEndDate"> {{entity.embargoEndDate}}</span>-->
|
|
|
|
<!-- </div>-->
|
2017-12-19 13:53:46 +01:00
|
|
|
`
|
|
|
|
})
|
|
|
|
|
|
|
|
export class PublicationTitleFormatter {
|
2019-07-23 14:23:12 +02:00
|
|
|
// @Input() title: string;
|
|
|
|
// @Input() url: string;
|
|
|
|
// @Input() id: string;
|
2018-09-26 15:56:21 +02:00
|
|
|
@Input() param: string;
|
|
|
|
@Input() path: string;
|
2019-07-23 14:23:12 +02:00
|
|
|
@Input() entity: any;
|
|
|
|
@Input() externalPortalUrl: string = null;
|
|
|
|
public routerHelper: RouterHelper = new RouterHelper();
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
}
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|