summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-09-17 16:59:08 +0200
committerYorhel <git@yorhel.nl>2015-09-17 16:59:08 +0200
commitcf8e093eace0f3a86fc42726b09e4f2c9979f40e (patch)
treec1ac73b0089218d13046b5f8872c2a653886e03b /lib
parente603d905e48762014bbb8fa735dd918dd83e1942 (diff)
Handler::Discussions: Add search box to non-item thread lists
As requested at https://vndb.org/t6862.28
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Handler/Discussions.pm53
1 files changed, 31 insertions, 22 deletions
diff --git a/lib/VNDB/Handler/Discussions.pm b/lib/VNDB/Handler/Discussions.pm
index 0b1e5254..7be4f3fe 100644
--- a/lib/VNDB/Handler/Discussions.pm
+++ b/lib/VNDB/Handler/Discussions.pm
@@ -308,29 +308,38 @@ sub board {
$self->htmlHeader(title => $title, noindex => 1, feeds => [ $type eq 'an' ? 'announcements' : 'posts' ]);
$self->htmlMainTabs($type, $obj, 'disc') if $iid;
- div class => 'mainbox';
- h1 $title;
- p;
- a href => '/t', mt '_disboard_rootlink';
- txt ' > ';
- a href => "/t/$type", mt $type eq 'all' ? '_disboard_item_all' : "_dboard_$type";
- if($iid) {
- txt ' > ';
- a style => 'font-weight: bold', href => "/t/$type$iid", "$type$iid";
- txt ':';
- a href => "/$type$iid", $ititle;
- }
- end;
- p class => 'center';
- if(!@$list) {
- b mt '_disboard_nothreads';
- br; br;
- a href => "/t/$type$iid/new", mt '_disboard_createyourown';
- } else {
- a href => '/t/'.($iid ? $type.$iid : $type ne 'ge' ? 'db' : $type).'/new', mt '_disboard_startnew' if $type ne 'all';
+ form action => '/t/search', method => 'get';
+ div class => 'mainbox';
+ h1 $title;
+ p;
+ a href => '/t', mt '_disboard_rootlink';
+ txt ' > ';
+ a href => "/t/$type", mt $type eq 'all' ? '_disboard_item_all' : "_dboard_$type";
+ if($iid) {
+ txt ' > ';
+ a style => 'font-weight: bold', href => "/t/$type$iid", "$type$iid";
+ txt ':';
+ a href => "/$type$iid", $ititle;
+ }
+ end;
+ if(!$iid) {
+ fieldset class => 'search';
+ input type => 'text', name => 'bq', id => 'bq', class => 'text';
+ input type => 'hidden', name => 'b', value => $type if $type ne 'all';
+ input type => 'submit', class => 'submit', value => mt '_searchbox_submit';
+ end 'fieldset';
}
- end;
- end 'div';
+ p class => 'center';
+ if(!@$list) {
+ b mt '_disboard_nothreads';
+ br; br;
+ a href => "/t/$type$iid/new", mt '_disboard_createyourown';
+ } else {
+ a href => '/t/'.($iid ? $type.$iid : $type ne 'ge' ? 'db' : $type).'/new', mt '_disboard_startnew' if $type ne 'all';
+ }
+ end;
+ end 'div';
+ end 'form';
_threadlist($self, $list, $f, $np, "/t/$type$iid", $type.$iid) if @$list;