[% # This template is used for rendering the search results
# It expects the search hash ref to be set.
-%]
[% WRAPPER searchresults.html %]
[%
# Title takes up space for no reason
# PROCESS swish_header;
title = PROCESS title;
IF ! search.results;
PROCESS show_message;
PROCESS search_form;
ELSE;
nav_bar_res = PROCESS nav_bar;
PROCESS search_form;
nav_bar_res;
PROCESS results_list;
nav_bar_res IF search.navigation('hits') > search.config('page_size');
END;
%]
[% END %]
[% BLOCK title %]
[% IF ! search.results %]
[% search.errstr || search.config('title') || "Search page" %]
[% ELSE %]
[% search.navigation('hits') %] Results for [[% search.query_simple | html %]]
[% END %]
[% END %]
[% BLOCK swish_header %]
|
[% search.config('title') || "Search page" %]
|
[% END %]
[% BLOCK show_message %]
[% IF search.errstr %]
[% search.errstr | html %]
[% END %]
[% END %]
[% BLOCK search_form %]
[% CGI.start_form( '-action' => CGI.script_name) %]
[% CGI.textfield( {
name => 'query',
size => 25,
maxlength => 200,
} ) %]
[% CGI.submit('submit','Search') %]
[% search.get_meta_name_limits %]
[% search.get_sort_select_list %]
[% search.get_index_select_list %]
[% search.get_limit_select %]
[% CGI.end_form.join('') %]
[% END %]
[% BLOCK nav_bar %]
[% search.stopwords_removed %]
[% END %]
[% BLOCK results_list %]
[% FOREACH item = search.results %]
-
[% item.swishreccount %]
[% ( item.swishtitle || item.swishdocpath ) %]
-
[% item.swishdescription %]
-
[% item.swishdocpath | replace('#.+', '') %]
Rank: [% item.swishrank %] |
Page: [% item.pagelen / 1000 | format('%2.1f') %]k,
Section: [% item.swishdocsize / 1000 | format('%2.1f') %]k |
[% item.swishlastmodified %]
[% END %]
[% END %]