diff options
author | Yorhel <git@yorhel.nl> | 2019-11-15 15:10:52 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-11-15 15:11:02 +0100 |
commit | 3306d14d9465f5a4d6a961bdca5c0db770c2ae1e (patch) | |
tree | fe08105c6c3e02daf042f62da7e62310da952d7b /lib/VNDB/Handler/Discussions.pm | |
parent | 3e100f4937a0af760bc73c6f2149f55e355705ee (diff) |
v2rw: Convert discussion board index
Not super happy with the layout of the thread listing table, maybe I'll
revisit that after converting the board listings.
Also not super happy with the overall (lack of) structure in the board
listing pages, should be able to find something for that as well.
Diffstat (limited to 'lib/VNDB/Handler/Discussions.pm')
-rw-r--r-- | lib/VNDB/Handler/Discussions.pm | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/lib/VNDB/Handler/Discussions.pm b/lib/VNDB/Handler/Discussions.pm index 82dcdfa1..add0e51c 100644 --- a/lib/VNDB/Handler/Discussions.pm +++ b/lib/VNDB/Handler/Discussions.pm @@ -3,7 +3,7 @@ package VNDB::Handler::Discussions; use strict; use warnings; -use TUWF ':html', 'xml_escape', 'uri_escape'; +use TUWF ':html', 'xml_escape'; use POSIX 'ceil'; use VNDB::Func; use VNDB::Types; @@ -18,7 +18,6 @@ TUWF::register( qr{t([1-9]\d*)/reply} => \&edit, qr{t([1-9]\d*)\.([1-9]\d*)/edit} => \&edit, qr{t/(db|an|ge|[vpu])([1-9]\d*)?/new} => \&edit, - qr{t} => \&index, ); @@ -449,43 +448,6 @@ sub board { } -sub index { - my $self = shift; - - $self->htmlHeader(title => 'Discussion board index', noindex => 1, feeds => [ 'posts', 'announcements' ]); - form action => '/t/search', method => 'get'; - div class => 'mainbox'; - h1 'Discussion board index'; - fieldset class => 'search'; - input type => 'text', name => 'bq', id => 'bq', class => 'text'; - input type => 'submit', class => 'submit', value => 'Search!'; - end 'fieldset'; - p class => 'browseopts'; - a href => '/t/all', 'All boards'; - a href => '/t/'.$_, $BOARD_TYPE{$_}{txt} for (keys %BOARD_TYPE); - end; - end; - end; - - for (keys %BOARD_TYPE) { - my $list = $self->dbThreadGet( - type => $_, - results => $BOARD_TYPE{$_}{index_rows}, - page => 1, - what => 'firstpost lastpost boardtitles', - sort => 'lastpost', reverse => 1, - asuser => $self->authInfo()->{id}, - ); - h1 class => 'boxtitle'; - a href => "/t/$_", $BOARD_TYPE{$_}{txt}; - end; - _threadlist($self, $list, {p=>1}, 0, "/t", $_); - } - - $self->htmlFooter; -} - - sub _threadlist { my($self, $list, $f, $np, $url, $board) = @_; $self->htmlBrowse( |