Index: src/style.css =================================================================== RCS file: /home/cvs/modperl-docs/src/style.css,v retrieving revision 1.49 diff -u -r1.49 style.css --- src/style.css 17 Apr 2002 07:06:28 -0000 1.49 +++ src/style.css 18 Apr 2002 04:10:56 -0000 @@ -40,6 +40,8 @@ /* dark blue bg-color for selected menu-items */ td.sel-bg { background-color: #525d76; } +li.search { list-style: none; } + div.nonselectedmenuitem { padding: 3px; background-color: #eeeeee; Index: src/search/.swishcgi.conf =================================================================== RCS file: /home/cvs/modperl-docs/src/search/.swishcgi.conf,v retrieving revision 1.4 diff -u -r1.4 .swishcgi.conf --- src/search/.swishcgi.conf 6 Apr 2002 19:17:16 -0000 1.4 +++ src/search/.swishcgi.conf 18 Apr 2002 04:10:56 -0000 @@ -4,6 +4,79 @@ $ENV{TZ} = 'UTC'; +# syntax (amount of spaces doesn't matter): +# indent path title +# +my $items = < $title, + value => $path, + parent => $parent, + }; + + my $diff = $indent - $cur_indent; + #print "$indent, $cur_indent, $path, $title\n"; + if ($diff < 1 ) { + for (0..abs($diff)) { + $parent = $parent->{parent}; + $cur_indent--; + } + } + + if ($indent == 0) { + push @items, $node; + $parent = $items[-1]; + $cur_indent = 0; + next; + } + + if ($diff > 1) { + $cur_indent++; + $parent = @{ $parent->{subs} }[-1]; + push @{ $parent->{subs} }, $node; + } + else { # $indent - $cur_indent = 1 + push @{ $parent->{subs} }, $node; + } + +} +#use Data::Dumper; +#print Dumper \@items; + return { title => 'Search mod_perl Site', prepend_path => '../', # search results are shown one level down @@ -25,26 +98,7 @@ metaname => 'section', # Can't be a metaname used elsewhere! # These are the words (phrases) used for limiting searches to areas of the document tree - values => [qw( - docs - docs/1.0/guide - docs/1.0/faqs - docs/2.0 - maillist - stories - support - )], - - labels => { - docs => 'mod_perl Documentation', - 'docs/1.0/guide' => 'The Guide', - 'docs/1.0/faqs' => 'Faqs', - 'docs/2.0' => '2.0 Docs', - maillist => 'Mailing Lists', - products => 'mod_perl Based Software', - stories => 'Sucess Stories', - support => 'Support Options', - }, + items => \@items, description => 'Limit search to these areas: ', }, Index: src/search/search.tt =================================================================== RCS file: /home/cvs/modperl-docs/src/search/search.tt,v retrieving revision 1.11 diff -u -r1.11 search.tt --- src/search/search.tt 9 Apr 2002 00:58:34 -0000 1.11 +++ src/search/search.tt 18 Apr 2002 04:10:56 -0000 @@ -59,6 +59,17 @@ [% END %] +[% BLOCK sub_items %] + + +[% END %] [% BLOCK search_form %] @@ -74,8 +85,10 @@ [% search.get_meta_name_limits %] [% search.get_sort_select_list %] [% search.get_index_select_list %] - [% search.get_limit_select %] - + [% SET limit = search.get_limit_select %] +
+ [% limit.description %] + [%- INCLUDE sub_items subs=limit.items -%] [% CGI.end_form.join('') %] Index: src/search/modules/TemplateToolkit.pm =================================================================== RCS file: /home/cvs/modperl-docs/src/search/modules/TemplateToolkit.pm,v retrieving revision 1.2 diff -u -r1.2 TemplateToolkit.pm --- src/search/modules/TemplateToolkit.pm 9 Apr 2002 00:58:34 -0000 1.2 +++ src/search/modules/TemplateToolkit.pm 18 Apr 2002 04:10:56 -0000 @@ -153,27 +153,10 @@ sub get_limit_select { my ( $results ) = @_; - my $q = $results->CGI; - - my $limit = $results->config('select_by_meta'); - return '' unless ref $limit eq 'HASH'; - - my $method = $limit->{method} || 'checkbox_group'; - - my @options = ( - -name => 'sbm', - -values => $limit->{values}, - -labels => $limit->{labels} || {}, - ); - - push @options, ( -columns=> $limit->{columns} ) if $limit->{columns}; - - - return join "\n", - '
', - ( $limit->{description} || 'Select: '), - $q->$method( @options ); + return {} unless ref $limit eq 'HASH'; + $limit->{description} = 'Select: ' unless exists $limit->{description}; + return $limit; } sub stopwords_removed {