--- trunk/vhost/webpac2.cgi 2009/04/29 18:06:15 1176 +++ trunk/vhost/webpac2.cgi 2009/04/29 18:06:19 1177 @@ -142,13 +142,8 @@ push @style, "../../$path/$path.css" if -e "$dir/$path/$path.css"; dump_yaml( 'style', \@style ); -print - start_html( - -title => $db->{name}, - -style => [ @style ], - ), - h1( $db->{name} ), - qq|
|, $db->{description}, qq|
|, +sub search_form { + qq||, start_form( -action => self_url( query => 0 ) ), radio_group( -name => 'attr', @@ -170,14 +165,26 @@ -linebreak=> 'true', ), qq||, + end_form, + ; +} -; -print end_form; +print + start_html( + -title => $db->{name}, + -style => [ @style ], + ), + h1( $db->{name} ), + qq|
|, $db->{description}, qq|
|, +; if ( my $search = param('search') ) { - print qq|
|; + print qq| + +
+ |; my $swish = SWISH::API->new( "$dir/../var/swish/$database" ); $swish->abort_last_error if $swish->Error; @@ -254,7 +261,7 @@ dump_yaml( 'data', $data ); my $li_class = ''; - $li_class = qq| class="z"| if $nr++ % 2 == 0; + $li_class = qq| class="z"| if $nr % 2 == 0; print qq||; foreach my $attr ( @attr ) { next unless defined $data->{$attr}; @@ -283,6 +290,8 @@ } +print search_form; + dump_yaml( "config databases $database", $db ); dump_yaml( 'html_markup_skip', $html_markup_skip );