1 [%- PROCESS 'config/archive_layout.tmpl' -%]
2 [%- keyword_str = search_keywords.join(' ');
3 keyword_esc = uri_escape(keyword_str);
4 keyword_enc = html_encode(keyword_str);
6 section_str = params.values.section.no_replace.join(', ');
7 section_esc = uri_escape(section_str);
8 section_enc = html_encode(section_str);
10 suite_str = params.values.suite.no_replace.join(', ');
11 suite_esc = uri_escape(suite_str);
12 suite_enc = html_encode(suite_str);
14 architectures_str = params.values.arch.no_replace.join(', ');
15 architectures_esc = uri_escape(architectures_str);
16 architectures_enc = html_encode(architectures_str);
18 [%- PROCESS 'html/head.tmpl'
19 title_tag = g("Package Search Results -- %s", keyword_enc)
20 print_search_field = 'packages'
21 search_field_values = {
22 keywords => search_keywords.join(' '),
23 searchon => opts.searchon_form,
24 suite => params.values.suite.no_replace.join(','),
25 architectures => params.values.arch.no_replace.join(','),
26 sections => params.values.section.no_replace.join(','),
28 navigation = [ { name => g('Package Search Results') } ]
33 <p>[% g('You can try a different search on the <a href="%s#search_packages">Packages search page</a>.',
36 [% IF opts.searchon != "names" && opts.exact %]
37 <p>[% g('You have searched only for words exactly matching your keywords. You can try to search <a href="%s">allowing subword matching</a>.',
38 make_search_url('',"keywords=$keyword_esc",'exact',0) ) %]</p>
41 [% IF opts.searchon == "names" && non_results %]
42 <p>[% g('<a href="%s">%u</a> results have not been displayed due to the search parameters.',
43 "$search_url$keyword_esc", non_results) %]</p>
47 [%- PROCESS 'html/messages.tmpl' -%]
51 [% suite_wording = suite_enc.match("^(default|all)$") ? g("all suites") : g("suite(s) <em>%s</em>", suite_enc);
52 section_wording = (section_enc == 'all') ? g("all sections") : g("section(s) <em>%s</em>", section_enc);
53 arch_wording = (architectures_enc == 'any') ? g("all architectures") : g("architecture(s) <em>%s</em>", architectures_enc);
54 IF opts.searchon == "names";
55 source_wording = opts.source ? g("source packages") : g("packages");
56 msg = g("You have searched for %s that names contain <em>%s</em> in %s, %s, and %s.",
57 source_wording, keyword_enc, suite_wording, section_wording, arch_wording);
59 exact_wording = opts.exact ? "" : g(" (including subword matching)");
60 # @translators: I'm really sorry :/
61 msg = g("You have searched for <em>%s</em> in packages names and descriptions in %s, %s, and %s%s.",
62 keyword_enc, suite_wording, section_wording, arch_wording, exact_wording);
67 [% g('Found <strong>%u</strong> matching packages.', results) %]</p>
70 [% IF too_many_hits %]
71 [% IF opts.searchon != "names" %]
72 <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>
74 <p id="psearchtoomanyhits">[% g('Your search was too wide so we will only display exact matches. At least <em>%u</em> results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords.',
79 <p id="psearchnoresult">[% g('Sorry, your search gave no results') %]</p>
82 [% FOREACH categories %]
83 [% "<h2>$name</h2>" IF name %]
85 [% FOREACH packages %]
86 <h3>[% g('Package %s', pkg) %]</h3>
88 [% FOREACH s IN suites;
90 <li class="[% suite %]"><a class="resultlink" href="[% make_url(pkg,'','suite',suite,'arch','','section','') %]">[% suite %]
91 [%- ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite %]</a>[% ' (' _ s.subsection _ ')' IF s.subsection %]: [% IF s.trans_desc.$lang; s.trans_desc.$lang | html; ELSE; s.desc | html; END %] [%- IF s.section && s.section != main_section %] [<strong class="pmarker">[% s.section %]</strong>][% END %]
92 [% FOREACH s.versions %]
93 <br>[% version %] [%- IF archive != main_archive %] [<strong class="pmarker">[% archive %]</strong>][% END %]: [% architectures.join(' ') %]
96 <br>[% IF s.versions.size > 0; g('also provided by:'); ELSE; g('provided by:'); END %]
97 [% FOREACH provider IN s.providers.sort %]<a href="[% make_url(provider,'','suite',suite) %]">[% provider %]</a>[% ', ' UNLESS loop.last %][% END %]
104 [% FOREACH src_packages %]
105 <h3>[% g('Source Package %s', pkg) %]</h3>
107 [% FOREACH origins %]
108 [% origin = (archive == main_archive) ? suite : "$suite/$archive";
109 js_id = string2id("$pkg$suite$archive") %]
110 <li><a class="resultlink" href="[% make_url(pkg,'','source','source','suite',origin,'section','','arch','') %]">[% origin %]</a> ([% subsection %]): [% version %]
111 [%- IF section %] [<strong class="pmarker">[% section %]</strong>][% END %]
112 [%- IF real_archive %] [<strong class="pmarker">[% real_archive %]</strong>][% END %]
113 <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>
114 [% IF binaries.size > 10 %]
115 <script type="text/javascript">init_toggle_elem("[% js_id %]","[% g('show %u binary packages', binaries.size) %]","[% g('hide %u binary packages', binaries.size) %]")</script>
125 <p>[% g('<a href="%s">%u</a> results have not been displayed because you requested only exact matches.',
126 make_search_url('',"keywords=$keyword_esc",'exact', 0), skipped) %]
131 [%- PROCESS 'html/foot.tmpl' -%]