diff options
author | Yorhel <git@yorhel.nl> | 2010-11-03 09:22:27 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-11-03 09:22:27 +0100 |
commit | 1b6db48e25ffdbce61db30001ac2a36c2dd7856f (patch) | |
tree | e73a5cc1dbff97264b318399f171864b1bae8cb7 /lib | |
parent | 73a2ee4403f75e12922486ca1c12b11a74bbeb4d (diff) |
Compressed the thread listing into one row per thread
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNDB/Handler/Discussions.pm | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/VNDB/Handler/Discussions.pm b/lib/VNDB/Handler/Discussions.pm index c8431c2c..33d20fc9 100644 --- a/lib/VNDB/Handler/Discussions.pm +++ b/lib/VNDB/Handler/Discussions.pm @@ -374,6 +374,17 @@ sub _threadlist { Tr $n % 2 ? ( class => 'odd' ) : (); td class => 'tc1'; a $o->{locked} ? ( class => 'locked' ) : (), href => "/t$o->{id}", shorten $o->{title}, 50; + b class => 'boards'; + my $i = 1; + for(sort { $a->{type}.$a->{iid} cmp $b->{type}.$b->{iid} } @{$o->{boards}}) { + last if $i++ > 4; + txt ', ' if $i > 2; + a href => "/t/$_->{type}".($_->{iid}||''), + title => $_->{original}||mt("_dboard_$_->{type}"), + shorten $_->{title}||mt("_dboard_$_->{type}"), 30; + } + txt ', ...' if @{$o->{boards}} > 4; + end; end; td class => 'tc2', $o->{count}-1; td class => 'tc3'; @@ -387,20 +398,6 @@ sub _threadlist { end; end; end; - Tr $n % 2 ? ( class => 'odd' ) : (); - td colspan => 4, class => 'boards'; - txt ' > '; - my $i = 1; - for(sort { $a->{type}.$a->{iid} cmp $b->{type}.$b->{iid} } @{$o->{boards}}) { - last if $i++ > 5; - txt ', ' if $i > 2; - a href => "/t/$_->{type}".($_->{iid}||''), - title => $_->{original}||mt("_dboard_$_->{type}"), - shorten $_->{title}||mt("_dboard_$_->{type}"), 30; - } - txt ', ...' if @{$o->{boards}} > 5; - end; - end; } ); } |