1 [%- keyword_str = search_keywords.join(' ');
2 keyword_esc = uri_escape(keyword_str);
3 keyword_enc = html_encode(keyword_str);
5 section_str = params.values.section.no_replace.join(', ');
6 section_esc = uri_escape(section_str);
7 section_enc = html_encode(section_str);
9 architectures_str = params.values.arch.no_replace.join(', ');
10 architectures_esc = uri_escape(architectures_str);
11 architectures_enc = html_encode(architectures_str);
13 [%- PROCESS 'html/head.tmpl'
14 title_tag = "Package Contents Search Results -- $keyword_enc"
16 print_search_field = 'packages'
17 navigation = [ { title => '', name => 'Package Contents Search Results', url => '' } ]
18 search_field_values = {
19 keywords => search_keywords.join(' '),
20 searchon => 'contents',
24 architectures => params.values.arch.no_replace.join(','),
25 sections => params.values.section.no_replace.join(','),
32 [% IF mode != 'filename' %]
33 <li><a href="[% make_search_url('',"keywords=$keyword_esc",'mode','filename') %]">Search for <em>[% keyword_enc %]</em> within filenames</a>
36 [% IF mode != 'exactfilename' %]
37 <li><a href="[% make_search_url('',"keywords=$keyword_esc",'mode','exactfilename') %]">Search exact filename <em>[% keyword_enc %]</em></a>
40 [% IF mode == 'exactfilename' || mode == 'filename' %]
41 <li><a href="[% make_search_url('',"keywords=$keyword_esc",'mode','') %]">Search for paths ending with <em>[% keyword_enc %]</em></a>
45 <p>Search in other suite:
46 [% FOREACH s IN all_suites %]
48 [<a href="[% make_search_url('',"keywords=$keyword_esc",'suite',s) %]">[% s %]</a>]
54 [% UNLESS search_architectures.size == 1 || all_architectures.size == 1 %]
55 <p>Limit search to a specific architecture:
56 [% FOREACH a IN all_architectures %] [<a href="[% make_search_url('',"keywords=$keyword_esc",'arch',a) %]">[% a %]</a>][% END %]
59 [% IF search_architectures.size == 1 %]
60 <p>Search in <a href="[% make_search_url('',"keywords=$keyword_esc",'arch','any') %]">all architectures</a>
65 [%- PROCESS 'html/messages.tmpl' -%]
66 <div id="pcontentsres">
68 [% suite_wording = "suite <em>$suite</em>";
69 section_wording = ( section_enc == 'all' ? "all sections" : "section(s) <em>$section_enc</em>" );
70 arch_wording = ( architectures_enc == 'any' ? "all architectures" : "architecture(s) <em>$architectures_enc</em>" );
71 wording = "paths that end with";
72 IF mode == 'filename';
73 wording = "files named";
74 ELSIF mode == 'exactfilename';
75 wording = "filenames that contain";
77 <p>You have searched for [% wording %] <em>[% keyword_enc %]</em> in [% suite_wording %], [% section_wording %], and [% arch_wording %].
80 Found <strong>[% results.size %] results</strong>.
82 [% IF too_many_hits %]
83 <p id="psearchtoomanyhits">Note: Your search was too wide so we will only display only the first about 100 matches.
84 Please consider using a longer keyword or more keywords.</p>
93 <th><a title="Sort results by filename" href="[% make_search_url('',"keywords=$keyword_esc&sort_by=file") %]">File</a></th>
94 <th><a title="Sort results by package name" href="[% make_search_url('',"keywords=$keyword_esc&sort_by=pkg") %]">Packages</a></th>
97 [% file = html_encode(file);
98 FOREACH k IN search_keywords;
99 k_enc = html_encode(k);
100 k_quo = quotemeta(k);
101 file = file.replace(k_quo, "<span class=\"keyword\">$k_enc</span>");
104 <td class="file">[% file %]</td>
106 [% FOREACH packages %]
107 [% arch_str = architectures.join(', ');
108 SET arch_str = "not $arch_str" IF ( arch_str && architectures_are_rev );
109 SET arch_str = " [$arch_str]" IF arch_str;
110 pkg_esc = uri_escape(pkg) %]
111 <a href="[% make_url(pkg_esc,'','suite',suite,'arch','') %]">[% pkg | html %]</a>[% arch_str %][% ', ' UNLESS loop.last %]
117 [% IF results.size > 20 %]
118 <tr><th>File</th><th>Packages</th></tr>
125 <p id="psearchnoresult">Sorry, your search gave no results</p>
129 [%- PROCESS 'html/foot.tmpl' -%]