Skip to content
Snippets Groups Projects
Commit 72c19f00 authored by Xiao Gui's avatar Xiao Gui
Browse files

feat: add KG link to receptor

parent ae0f56f7
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ import { BsRegionInputBase } from "../../bsRegionInputBase";
import { REGISTERED_FEATURE_INJECT_DATA } from "../../constants";
import { BsFeatureService, TFeatureCmpInput } from "../../service";
import { TBSDetail } from "../type";
import { ARIA_LABELS } from 'common/constants'
@Component({
selector: 'bs-features-receptor-entry',
......@@ -17,6 +18,7 @@ import { TBSDetail } from "../type";
export class BsFeatureReceptorEntry extends BsRegionInputBase implements OnDestroy{
private sub: Subscription[] = []
public ARIA_LABELS = ARIA_LABELS
private selectedREntryId$ = new Subject<string>()
private _selectedREntryId: string
......
......@@ -8,6 +8,26 @@
<ng-container *ngIf="selectedReceptor$ | async as selectedRec">
<h3 class="mat-h3">
<span>
{{ selectedRec.name }}
</span>
</h3>
<ng-container *ngFor="let info of (selectedRec.origin_datainfos || [])">
<a *ngFor="let url of (info.urls || [])"
mat-icon-button
color="primary"
[href]="url.doi | doiParserPipe"
target="_blank"
[matTooltip]="ARIA_LABELS.EXPLORE_DATASET_IN_KG"
[attr.aria-label]="ARIA_LABELS.EXPLORE_DATASET_IN_KG">
<i class="fas fa-external-link-alt"></i>
</a>
</ng-container>
<mat-divider class="m-2"></mat-divider>
<bs-features-receptor-fingerprint
(onSelectReceptor)="onSelectReceptor($event)"
[bsFeature]="selectedRec">
......
......@@ -32,7 +32,6 @@ export type TBSSummary = {
origin_datainfos?: ({
name: string
description: string
} | {
urls: {
doi: string
cite?: string
......
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