[new-UI | Library]:
1. result-preview.component.ts: Added property "@Input() externalUrl: string;" for external links in results. 2. result-preview.component.html: Link in results as they were when there is no "externalUrl", otherwise add: target="_blank" [href]="externalUrl+result.id". git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60690 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
92852d0962
commit
ed98b169f6
|
@ -24,7 +24,7 @@
|
|||
<!-- Title -->
|
||||
<div class="uk-margin-small-bottom">
|
||||
<h6 class="uk-margin-remove">
|
||||
<a *ngIf="result.id && !(result.resultType == 'dataprovider' && result.compatibilityUNKNOWN) "
|
||||
<a *ngIf="!externalUrl && result.id && !(result.resultType == 'dataprovider' && result.compatibilityUNKNOWN) "
|
||||
(click)="onClick()" [queryParams]="createParam()"
|
||||
[routerLink]="url" class="uk-link uk-width-expand">
|
||||
<div *ngIf="(result.title) || result.acronym">
|
||||
|
@ -39,6 +39,23 @@
|
|||
[no title available]
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a *ngIf="externalUrl && result.id && !(result.resultType == 'dataprovider' && result.compatibilityUNKNOWN) "
|
||||
(click)="onClick()"
|
||||
target="_blank" [href]="externalUrl+result.id" class="uk-link uk-width-expand">
|
||||
<div *ngIf="(result.title) || result.acronym">
|
||||
<span *ngIf="result.acronym">
|
||||
{{result.acronym}}
|
||||
</span>
|
||||
<span *ngIf="result.acronym && (result.title)"> (</span>
|
||||
<span *ngIf="result.title" [innerHTML]="result.title"></span>
|
||||
<span *ngIf="result.acronym && result.title">)</span>
|
||||
</div>
|
||||
<div *ngIf="!result.title && !result.acronym">
|
||||
[no title available]
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div *ngIf="!result.id || (result.resultType == 'dataprovider' && result.compatibilityUNKNOWN)"
|
||||
class="uk-width-expand">
|
||||
<div *ngIf="(result.title) || result.acronym">
|
||||
|
|
|
@ -22,6 +22,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
|||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
public urlParam: string;
|
||||
public url: string;
|
||||
@Input() externalUrl: string;
|
||||
public type: string;
|
||||
public beforeTitle: string[] = [];
|
||||
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
||||
|
|
Loading…
Reference in New Issue