]> git.deb.at Git - deb/packages.git/blob - templates/html/search.tmpl
Some fixes for Polish translation.
[deb/packages.git] / templates / html / search.tmpl
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);
6
7    section_str = params.values.section.no_replace.join(', ');
8    section_esc = uri_escape(section_str);
9    section_enc = html_encode(section_str);
10
11    suite_str = params.values.suite.no_replace.join(', ');
12    suite_esc = uri_escape(suite_str);
13    suite_enc = html_encode(suite_str);
14
15    architectures_str = params.values.arch.no_replace.join(', ');
16    architectures_esc = uri_escape(architectures_str);
17    architectures_enc = html_encode(architectures_str);
18 -%]
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(','),
28     }
29    navigation = [ { name => g('Package Search Results') } ]
30 -%]
31 [%- PROCESS 'html/util.inc' -%]
32
33 <div id="psearchsug">
34 [% UNLESS results %]
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>
38         [% END %]
39 [% END %]
40
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>]
45         [% ELSE %]
46         [[% s %]]
47         [% END %]
48 [% END %]
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')) %]
52 [% END %]
53
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>]
58    [% ELSE %]
59    [[% a %]]
60    [% END %]
61 [% 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')) %]
65 [% END %]
66
67 </div>
68
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>
72 [% END %]
73 </div>
74
75 [%- PROCESS 'html/messages.tmpl' -%]
76
77 <div id="psearchres">
78
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);
86     ELSE;
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);
91     END %]
92 <p>[% msg %]
93
94 [% IF results %]
95 [% g('Found <strong>%u</strong> matching packages.', results) %]</p>
96 [% END %]
97
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>
101 [% ELSE %]
102 <p id="psearchtoomanyhits">
103 [%- IF results %]
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.") %]
105 [%- ELSE -%]
106 [% g("Your keyword was too generic.<br>Please consider using a longer keyword or more keywords.") %]
107 [% END -%]
108 </p>
109 [% END; END %]
110
111 [% UNLESS results || too_many_hits %]
112 <p id="psearchnoresult">[% g('Sorry, your search gave no results') %]</p>
113 [% END %]
114
115 [% FOREACH categories %]
116   [% "<h2>$name</h2>" IF name %]
117
118 [% FOREACH packages %]
119   <h3>[% g('Package %s', pkg) %]</h3>
120   <ul>
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 url=section_urls.$section IF section && section != main_section %]
127     [% FOREACH s.versions %]
128       <br>[% version %] [%- IF archive != main_archive %] [[% IF mirrors.$archive.url %]<a href="[% mirrors.$archive.url %]">[% END %]<strong class="pmarker" title="[% mirrors.$archive.title %]">[% archive %]</strong>[% IF mirrors.$archive.url %]</a>[% END %]][% END %]: [% architectures.join(' ') %]
129     [% END %]
130     [% IF s.providers %]
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 %]
133     [% END %]
134     </li>
135   [% END %]
136   </ul>
137 [% END %]
138
139 [% FOREACH src_packages %]
140   <h3>[% g('Source Package %s', pkg) %]</h3>
141   <ul>
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 url=section_urls.$section IF section %] [%- PROCESS marker text=real_archive title=mirrors.$real_archive.title url=mirrors.$real_archive.url 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>
150         [% END %]
151     </li>
152   [% END %]
153   </ul>
154 [% END %]
155
156 [% END %]
157
158 [% IF skipped %]
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) %]
161 [% END %]
162
163 </div>
164
165 [%- PROCESS 'html/foot.tmpl' -%]