1 [%- PROCESS 'config/archive_layout.tmpl' -%]
2 [%- PROCESS 'config/mirrors.tmpl' -%]
3 [%- keyword_str = search_keywords.join(' ');
4 keyword_esc = uri_escape(keyword_str);
5 keyword_enc = html_encode(keyword_str);
7 section_str = params.values.section.no_replace.join(', ');
8 section_esc = uri_escape(section_str);
9 section_enc = html_encode(section_str);
11 suite_str = params.values.suite.no_replace.join(', ');
12 suite_esc = uri_escape(suite_str);
13 suite_enc = html_encode(suite_str);
15 architectures_str = params.values.arch.no_replace.join(', ');
16 architectures_esc = uri_escape(architectures_str);
17 architectures_enc = html_encode(architectures_str);
19 [%- PROCESS 'html/head.tmpl'
20 title_tag = g("Package Search Results -- %s", keyword_enc)
21 print_search_field = 'packages'
22 search_field_values = {
23 keywords => search_keywords.join(' '),
24 searchon => opts.searchon_form,
25 suite => params.values.suite.no_replace.join(','),
26 architectures => params.values.arch.no_replace.join(','),
27 sections => params.values.section.no_replace.join(','),
29 navigation = [ { name => g('Package Search Results') } ]
31 [%- PROCESS 'html/util.inc' -%]
35 [% IF opts.searchon != "names" && opts.exact %]
36 <p>[% g('You have searched only for words exactly matching your keywords. You can try to search <a href="%s">allowing subword matching</a>.',
37 make_search_url('',"keywords=$keyword_esc",'exact',0) ) %]</p>
41 <p>[% g('Search in specific suite:') %]
42 [% FOREACH s IN all_suites %]
43 [% IF s != suite_str %]
44 [<a href="[% make_search_url('',"keywords=$keyword_esc",'suite',s) %]">[% s %]</a>]
49 [% IF search_suites.size == 1 %]
50 <p>[% g('Search in <a href="%s">all suites</a>',
51 make_search_url('',"keywords=$keyword_esc",'suite','all')) %]
54 <p>[% g('Limit search to a specific architecture:') %]
55 [% FOREACH a IN all_architectures %]
56 [% IF a != arch_str %]
57 [<a href="[% make_search_url('',"keywords=$keyword_esc",'arch',a) %]">[% a %]</a>]
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 [% IF opts.searchon == "names" && non_results %]
70 <p>[% g('<a href="%s">Some</a> results have not been displayed due to the search parameters.',
71 "$search_url?keywords=$keyword_esc") %]</p>
75 [%- PROCESS 'html/messages.tmpl' -%]
79 [% suite_wording = suite_enc.match("^(default|all)$") ? g("all suites") : g("suite(s) <em>%s</em>", suite_enc);
80 section_wording = (section_enc == 'all') ? g("all sections") : g("section(s) <em>%s</em>", section_enc);
81 arch_wording = (architectures_enc == 'any') ? g("all architectures") : g("architecture(s) <em>%s</em>", architectures_enc);
82 IF opts.searchon == "names";
83 source_wording = opts.source ? g("source packages") : g("packages");
84 msg = g("You have searched for %s that names contain <em>%s</em> in %s, %s, and %s.",
85 source_wording, keyword_enc, suite_wording, section_wording, arch_wording);
87 exact_wording = opts.exact ? "" : g(" (including subword matching)");
88 # @translators: I'm really sorry :/
89 msg = g("You have searched for <em>%s</em> in packages names and descriptions in %s, %s, and %s%s.",
90 keyword_enc, suite_wording, section_wording, arch_wording, exact_wording);
95 [% g('Found <strong>%u</strong> matching packages.', results) %]</p>
98 [% IF too_many_hits %]
99 [% IF opts.searchon != "names" %]
100 <p id="psearchtoomanyhits">[% g("Note that this only shows the best matches, sorted by relevance. If the first few packages don't match what you searched for, try using more keywords or alternative keywords.") %]</p>
102 <p id="psearchtoomanyhits">
104 [% g("Your keyword was too generic, for optimizing reasons some results might have been suppressed.<br>Please consider using a longer keyword or more keywords.") %]
106 [% g("Your keyword was too generic.<br>Please consider using a longer keyword or more keywords.") %]
111 [% UNLESS results || too_many_hits %]
112 <p id="psearchnoresult">[% g('Sorry, your search gave no results') %]</p>
115 [% FOREACH categories %]
116 [% "<h2>$name</h2>" IF name %]
118 [% FOREACH packages %]
119 <h3>[% g('Package %s', pkg) %]</h3>
121 [% FOREACH s IN suites;
122 suite = s.suite ; section = s.section %]
123 <li class="[% suite %]"><a class="resultlink" href="[% make_url(pkg,'','suite',suite,'arch','','section','') %]">[% suite %]
124 [%- ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite %]</a>[% ' (' _ s.subsection _ ')' IF s.subsection %]:
125 [% PROCESS desc_i18n trans_desc=s.trans_desc desc=s.desc %]
126 [%- PROCESS marker text=section title=section_titles.$section IF section && section != main_section %]
127 [% FOREACH s.versions %]
128 <br>[% version %] [%- IF archive != main_archive %] [<strong class="pmarker" title="[% mirrors.$archive.title %]">[% archive %]</strong>][% END %]: [% architectures.join(' ') %]
131 <br>[% IF s.versions.size > 0; g('also provided by:'); ELSE; g('provided by:'); END %]
132 [% FOREACH provider IN s.providers.sort %]<a href="[% make_url(provider,'','suite',suite) %]">[% provider %]</a>[% ', ' UNLESS loop.last %][% END %]
139 [% FOREACH src_packages %]
140 <h3>[% g('Source Package %s', pkg) %]</h3>
142 [% FOREACH origins %]
143 [% origin = (archive == main_archive) ? suite : "$suite/$archive";
144 js_id = string2id("$pkg$suite$archive") %]
145 <li><a class="resultlink" href="[% make_url(pkg,'','source','source','suite',origin,'section','','arch','') %]">[% origin %]</a> ([% subsection %]): [% version %]
146 [%- PROCESS marker text=section title=section_titles.$section IF section %] [%- PROCESS marker text=real_archive title=mirrors.$real_archive.title IF real_archive %]
147 <br>[% g('Binary packages:') %] <span id="js_[% js_id %]" class="p_js_elem"></span> <span id="html_[% js_id %]" class="binaries">[% FOREACH binary IN binaries.sort %]<a href="[% make_url(binary,'','source','','suite',suite,'archive',archive,'arch','','archive','') %]">[% binary %]</a>[% ', ' UNLESS loop.last %][% END %]</span>
148 [% IF binaries.size > 10 %]
149 <script type="text/javascript">init_toggle_elem("[% js_id %]","[% g('show %u binary packages', binaries.size) %]","[% g('hide %u binary packages', binaries.size) %]")</script>
159 <p>[% g('<a href="%s">%u</a> results have not been displayed because you requested only exact matches.',
160 make_search_url('',"keywords=$keyword_esc",'exact', 0), skipped) %]
165 [%- PROCESS 'html/foot.tmpl' -%]