diff options
author | Yorhel <git@yorhel.nl> | 2011-04-06 11:55:38 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2011-04-06 11:55:38 +0200 |
commit | 446112f425251cd319df7c46771dc077a5385022 (patch) | |
tree | cb999c0b4b46a77f14cd58f3018c3506e22a0cb7 /lib/VNDB/Handler/Chars.pm | |
parent | 6da8f418ed9d7baa068140eebe0b8cf7e84c4bb9 (diff) |
Use same browsing-table on trait pages and char browser
Diffstat (limited to 'lib/VNDB/Handler/Chars.pm')
-rw-r--r-- | lib/VNDB/Handler/Chars.pm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/VNDB/Handler/Chars.pm b/lib/VNDB/Handler/Chars.pm index ed7b5388..06c2ecde 100644 --- a/lib/VNDB/Handler/Chars.pm +++ b/lib/VNDB/Handler/Chars.pm @@ -7,7 +7,7 @@ use TUWF ':html', 'uri_escape'; use Exporter 'import'; use VNDB::Func; -our @EXPORT = ('charTable'); +our @EXPORT = ('charTable', 'charBrowseTable'); TUWF::register( qr{c([1-9]\d*)(?:\.([1-9]\d*))?} => \&page, @@ -474,8 +474,17 @@ sub list { end; } - my $uri = "/c/$fch?q=$quri"; - @$list && $self->htmlBrowse( + @$list && $self->charBrowseTable($list, $np, $f, "/c/$fch?q=$quri"); + + $self->htmlFooter; +} + + +# Also used on Handler::Traits +sub charBrowseTable { + my($self, $list, $np, $f, $uri) = @_; + + $self->htmlBrowse( class => 'charb', items => $list, options => $f, @@ -504,9 +513,7 @@ sub list { end; end; } - ); - - $self->htmlFooter; + ) } |