summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Traits.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-04-06 11:55:38 +0200
committerYorhel <git@yorhel.nl>2011-04-06 11:55:38 +0200
commit446112f425251cd319df7c46771dc077a5385022 (patch)
treecb999c0b4b46a77f14cd58f3018c3506e22a0cb7 /lib/VNDB/Handler/Traits.pm
parent6da8f418ed9d7baa068140eebe0b8cf7e84c4bb9 (diff)
Use same browsing-table on trait pages and char browser
Diffstat (limited to 'lib/VNDB/Handler/Traits.pm')
-rw-r--r--lib/VNDB/Handler/Traits.pm23
1 files changed, 4 insertions, 19 deletions
diff --git a/lib/VNDB/Handler/Traits.pm b/lib/VNDB/Handler/Traits.pm
index 3e08f6bf..1f3c2872 100644
--- a/lib/VNDB/Handler/Traits.pm
+++ b/lib/VNDB/Handler/Traits.pm
@@ -86,7 +86,9 @@ sub traitpage {
my($chars, $np) = $self->dbCharGet(
trait_inc => $trait,
traitspoil => $f->{m},
- results => 50, page => $f->{p},
+ results => 50,
+ page => $f->{p},
+ what => 'vns',
);
div class => 'mainbox';
@@ -106,24 +108,7 @@ sub traitpage {
# p; br; txt mt '_traitp_cached'; end;
end 'div';
- # TODO: proper table with info and such
- $self->htmlBrowse(
- class => 'traitchars',
- options => $f,
- nextpage => $np,
- items => $chars,
- pageurl => "/i$trait?m=$f->{m}",
- sorturl => "/i$trait?m=$f->{m}",
- header => [
- [ 'Name' ],
- ],
- row => sub {
- my($s, $n, $l) = @_;
- Tr $n%2?(class => 'odd') : ();
- td class => 'tc1'; a href => "/c$l->{id}", $l->{name}; end;
- end;
- },
- ) if @$chars;
+ @$chars && $self->charBrowseTable($chars, $np, $f, "/i$trait?m=$f->{m}");
}
$self->htmlFooter;