Commit 8cfa466c authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Fix bug display external link in datatable

parent 3b71a463
......@@ -52,28 +52,36 @@
<td *ngFor="let attribute of searchMeta.attributes_selected" class="align-middle">
<div *ngIf="datum[attribute.label]" [ngSwitch]="getAttributeRenderer(attribute.name)">
<div *ngSwitchCase="'img'">
<app-img [src]="getAttributeUriAction(attribute.name, datum[attribute.label])">
<app-img
[src]="getAttributeUriAction(attribute.name, datum[attribute.label])">
</app-img>
</div>
<div *ngSwitchCase="'thumbnail'">
<app-thumbnail [attributeName]="attribute.name"
<app-thumbnail
[attributeName]="attribute.name"
[src]="getAttributeUriAction(attribute.name, datum[attribute.label])">
</app-thumbnail>
</div>
<div *ngSwitchCase="'link'">
<app-link [href]="getAttributeUriAction(attribute.name, datum[attribute.label])"
[data]="datum[attribute.name]"></app-link>
<app-link
[href]="getAttributeUriAction(attribute.name, datum[attribute.label])">
</app-link>
</div>
<div *ngSwitchCase="'btn'">
<app-btn [href]="getAttributeUriAction(attribute.name, datum[attribute.label])"
[data]="datum[attribute.name]"></app-btn>
<app-btn
[href]="getAttributeUriAction(attribute.name, datum[attribute.label])">
</app-btn>
</div>
<div *ngSwitchCase="'detail-link'">
<app-detail-link [datasetName]="datasetName" [data]="datum[attribute.label]">
<app-detail-link
[datasetName]="datasetName"
[data]="datum[attribute.label]">
</app-detail-link>
</div>
<div *ngSwitchCase="'detail-btn'">
<app-detail-btn [datasetName]="datasetName" [data]="datum[attribute.label]">
<app-detail-btn
[datasetName]="datasetName"
[data]="datum[attribute.label]">
</app-detail-btn>
</div>
<div *ngSwitchCase="'download'">
......@@ -82,7 +90,8 @@
</app-download>
</div>
<div *ngSwitchCase="'json'" class="text-center">
<app-json-renderer [attributeName]="attribute.name"
<app-json-renderer
[attributeName]="attribute.name"
[json]="datum[attribute.label]">
</app-json-renderer>
</div>
......
<a [href]="href" target="_blank" class="btn btn-outline-primary btn-sm">
{{ data }}
{{ href }}
</a>
\ No newline at end of file
......@@ -7,5 +7,4 @@ import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
})
export class BtnComponent {
@Input() href: string;
@Input() data: string | number;
}
<a [href]="href" target="_blank">
{{ data }}
{{ href }}
</a>
\ No newline at end of file
......@@ -5,7 +5,6 @@ import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
templateUrl: 'link.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class LinkComponent {
export class LinkComponent{
@Input() href: string;
@Input() data: string | number;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment