Skip to content

Commit

Permalink
update pass for #706
Browse files Browse the repository at this point in the history
  • Loading branch information
kltm committed Dec 4, 2023
1 parent 80d4b48 commit b2b9c89
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
27 changes: 27 additions & 0 deletions perl/lib/AmiGO/WebApp/HTMLClient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,33 @@ sub mode_term_details {
}
$self->set_template_parameter('TAXON_CONSTRAINTS', $tc);

###
### Chemical reaction participants.
###

my $crp = [];
foreach my $parent (@{$nay_info->{parents}}){
if( $parent->{rel} eq 'RO:0000057' ){

## 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 @$crp,
{
crp_rel_acc => $parent->{rel},
crp_name => $parent->{name},
crp_acc => $parent->{acc},
crp_link => $tlink
};
}
}
$self->set_template_parameter('CHEMICAL_REACTION_PARTICIPANTS', $crp);

###
### Bridge variables from old system.
###
Expand Down
17 changes: 17 additions & 0 deletions templates/html/bs3/common/term_details_main.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,23 @@
[% END %]
[% END %]

<!-- Chemical reaction participants. -->
<dt>Chem. react.</dt>
[% IF CHEMICAL_REACTION_PARTICIPANTS.size == 0 %]
<dd>None</dd>
[% ELSE %]
[% FOREACH crp = CHEMICAL_REACTION_PARTICIPANTS %]
<dd>
<i>has participant</i>
[% IF crp.crp_link %]
<a href="[% crp.crp_link %]">[% crp.crp_name %]</a>
[% ELSE %]
[% crp.crp_name %]
[% END %]
</dd>
[% END %]
[% END %]

<!-- Subsets -->
<dt>Subset</dt>
[% IF TERM_INFO.subsets.size != 0 %]
Expand Down

0 comments on commit b2b9c89

Please sign in to comment.