Skip to content

Commit

Permalink
fix links for #56
Browse files Browse the repository at this point in the history
  • Loading branch information
kltm committed Nov 30, 2023
1 parent 5db564b commit 80d4b48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 10 additions & 1 deletion perl/lib/AmiGO/WebApp/HTMLClient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1595,12 +1595,21 @@ sub mode_term_details {
my $tc = [];
foreach my $parent (@{$nay_info->{parents}}){
if( $parent->{acc} =~ /^NCBITaxon/ ){

## Use the general abbs linker.
my $tlink = undef;
my($cdb, $ckey) = $self->{CORE}->split_gene_product_acc($parent->{acc});
my $link_try = $self->{CORE}->database_link($cdb, $ckey);
if( $link_try ){
$tlink = $link_try;
}

push @$tc,
{
taxon_rel_acc => $parent->{rel},
taxon_name => $parent->{name},
taxon_acc => $parent->{acc},
taxon_link => $parent->{link}
taxon_link => $tlink
};
}
}
Expand Down
4 changes: 4 additions & 0 deletions templates/html/bs3/common/term_details_main.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@
[% ELSE %]
[% xtrain.taxon_rel_acc %]
[% END %]
[% IF xtrain.taxon_link %]
<a href="[% xtrain.taxon_link %]">[% xtrain.taxon_name %]</a>
[% ELSE %]
[% xtrain.taxon_name %]
[% END %]
</dd>
[% END %]
[% END %]
Expand Down

0 comments on commit 80d4b48

Please sign in to comment.