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 = g("Package Contents Search Results -- %s", keyword_enc)
16 print_search_field = 'packages'
17 navigation = [ { title => '', name => g('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') %]">
34 [%- g('Search for <em>%s</em> within filenames', keyword_enc) %]</a>
37 [% IF mode != 'exactfilename' %]
38 <li><a href="[% make_search_url('',"keywords=$keyword_esc",'mode','exactfilename') %]">
39 [%- g('Search exact filename <em>%s</em>', keyword_enc) %]</a>
42 [% IF mode == 'exactfilename' || mode == 'filename' %]
43 <li><a href="[% make_search_url('',"keywords=$keyword_esc",'mode','') %]">
44 [%- g('Search for paths ending with <em>%s</em>', keyword_enc) %]</a>
48 <p>[% g('Search in other suite:') %]
49 [% FOREACH s IN all_suites %]
51 [<a href="[% make_search_url('',"keywords=$keyword_esc",'suite',s) %]">[% s %]</a>]
57 [% UNLESS search_architectures.size == 1 || all_architectures.size == 1 %]
58 <p>[% g('Limit search to a specific architecture:') %]
59 [% FOREACH a IN all_architectures %] [<a href="[% make_search_url('',"keywords=$keyword_esc",'arch',a) %]">[% a %]</a>][% END %]
62 [% IF search_architectures.size == 1 %]
63 <p>[% g('Search in <a href="%s">all architectures</a>',
64 make_search_url('',"keywords=$keyword_esc",'arch','any')) %]
69 [%- PROCESS 'html/messages.tmpl' -%]
70 <div id="pcontentsres">
72 [%# @translators: I'm really sorry :/ %]
73 [% section_wording = ( section_enc == 'all' ? g("all sections") : g("section(s) <em>%s</em>", section_enc) );
74 arch_wording = ( architectures_enc == 'any' ? g("all architectures") : g("architecture(s) <em>%s</em>", architectures_enc) );
75 wording = g("paths that end with");
76 IF mode == 'filename';
77 wording = g("files named");
78 ELSIF mode == 'exactfilename';
79 wording = g("filenames that contain");
81 <p>[% g('You have searched for %s <em>%s</em> in suite <em>%s</em>, %s, and %s.',
82 wording, keyword_enc, suite, section_wording, arch_wording) %]
85 [% g('Found <strong>%u results</strong>.', results.size) %]
87 [% IF too_many_hits %]
88 <p id="psearchtoomanyhits">[% g('Note: Your search was too wide so we will only display only the first about 100 matches. Please consider using a longer keyword or more keywords.') %]</p>
97 <th><a title="[% g('Sort results by filename') %]" href="[% make_search_url('',"keywords=$keyword_esc&sort_by=file") %]">
98 [%- g('File') %]</a></th>
99 <th><a title="[% g('Sort results by package name') %]" href="[% make_search_url('',"keywords=$keyword_esc&sort_by=pkg") %]">
100 [%- g('Packages') %]</a></th>
102 [% FOREACH results %]
103 [% file = html_encode(file);
104 FOREACH k IN search_keywords;
105 k_enc = html_encode(k);
106 k_quo = quotemeta(k);
107 file = file.replace(k_quo, "<span class=\"keyword\">$k_enc</span>");
110 <td class="file">[% file %]</td>
112 [% FOREACH packages %]
113 [% arch_str = architectures.join(', ');
114 SET arch_str = g("not %s", arch_str) IF ( arch_str && architectures_are_rev );
115 SET arch_str = " [$arch_str]" IF arch_str;
116 pkg_esc = uri_escape(pkg) %]
117 <a href="[% make_url(pkg_esc,'','suite',suite,'arch','') %]">[% pkg | html %]</a>[% arch_str %][% ', ' UNLESS loop.last %]
123 [% IF results.size > 20 %]
124 <tr><th>[% g('File') %]</th><th>[% g('Packages') %]</th></tr>
131 <p id="psearchnoresult">[% g('Sorry, your search gave no results') %]</p>
135 [%- PROCESS 'html/foot.tmpl' -%]