aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterWebInterface/Util/CommonHTML.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MasterWebInterface/Util/CommonHTML.pm')
-rwxr-xr-xlib/MasterWebInterface/Util/CommonHTML.pm26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/MasterWebInterface/Util/CommonHTML.pm b/lib/MasterWebInterface/Util/CommonHTML.pm
new file mode 100755
index 0000000..5390740
--- /dev/null
+++ b/lib/MasterWebInterface/Util/CommonHTML.pm
@@ -0,0 +1,26 @@
+package MasterWebInterface::Util::CommonHTML;
+use strict;
+use warnings;
+use TUWF ':html';
+use Exporter 'import';
+our @EXPORT = qw| htmlSearchBox |;
+
+################################################################################
+# Search box with first letters
+# for games, servers and possibly later on players
+################################################################################
+sub htmlSearchBox {
+ my($self, $sel, $v) = @_;
+
+ fieldset class => 'search';
+ p id => 'searchtabs';
+ a href => '/g/all', $sel eq 'g' ? (class => 'sel') : (), 'Games';
+ a href => '/s/all', $sel eq 's' ? (class => 'sel') : (), 'Servers';
+ #a href => '/p/all', $sel eq 'p' ? (class => 'sel') : (), 'Players';
+ end;
+ input type => 'text', name => 'q', id => 'q', class => 'text', value => $v;
+ input type => 'submit', class => 'submit', value => 'search';
+ end 'fieldset';
+}
+
+1;