summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Producers.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-21 12:36:49 +0200
committerYorhel <git@yorhel.nl>2009-10-21 12:36:49 +0200
commitbd2251939c7e4c9903aa3a6eb838f489b0328bcd (patch)
tree2878c58c7a1e8599cab3d9392e44e3fb96812724 /lib/VNDB/Handler/Producers.pm
parent25bbbe2d974ea83fc01c2053354b05b62c5d6167 (diff)
Display producer relations on producer pages
Diffstat (limited to 'lib/VNDB/Handler/Producers.pm')
-rw-r--r--lib/VNDB/Handler/Producers.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/VNDB/Handler/Producers.pm b/lib/VNDB/Handler/Producers.pm
index 97260dde..f662ba3e 100644
--- a/lib/VNDB/Handler/Producers.pm
+++ b/lib/VNDB/Handler/Producers.pm
@@ -62,6 +62,23 @@ sub page {
}
end;
+ if(@{$p->{relations}}) {
+ my %rel;
+ push @{$rel{$_->{relation}}}, $_
+ for (sort { $a->{name} cmp $b->{name} } @{$p->{relations}});
+ p class => 'center';
+ txt "\n";
+ for my $r (sort keys %rel) {
+ txt mt("_prodrel_$r").' ';
+ for (@{$rel{$r}}) {
+ a href => "/p$_->{id}", title => $_->{original}||$_->{name}, shorten $_->{name}, 40;
+ txt ', ' if $_ ne $rel{$r}[$#{$rel{$r}}];
+ }
+ txt "\n";
+ }
+ end;
+ }
+
if($p->{desc}) {
p class => 'description';
lit bb2html $p->{desc};