diff options
author | Yorhel <git@yorhel.nl> | 2019-08-26 16:51:18 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-08-26 16:51:22 +0200 |
commit | 0ddae62c5f1ed386f2a87ffa2636dcccf2dd4a9f (patch) | |
tree | 50ce84934344dda36a8cf95c3c7d43d7a4c2644e /lib/VNDB/Handler/VNPage.pm | |
parent | 27ff73213928994e7e1117293c4a751fe99b215b (diff) |
Add release links dropdown to VN pages
As suggested in https://vndb.org/t12755.15 - although this
implementation is a little bit quirky.
Diffstat (limited to 'lib/VNDB/Handler/VNPage.pm')
-rw-r--r-- | lib/VNDB/Handler/VNPage.pm | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm index fed9f5a1..a3314418 100644 --- a/lib/VNDB/Handler/VNPage.pm +++ b/lib/VNDB/Handler/VNPage.pm @@ -835,10 +835,25 @@ sub _releases { } end; td class => 'tc6'; - if($rel->{website}) { - a href => $rel->{website}, rel => 'nofollow'; + my $links = $self->entryLinks(r => $rel); + my $has_dd = @$links > ($rel->{website} ? 1 : 0); + if(@$links) { + a href => $rel->{website}||'#', class => 'rllinks'; + txt scalar @$links if $has_dd; cssicon 'external', 'External link'; end; + if($has_dd) { + ul class => 'hidden rllinks_dd'; + for (@$links) { + li; + a href => $_->[1]; + span $_->[2] if $_->[2]; + txt $_->[0]; + end; + end; + }; + end; + } } else { txt ' '; } |