]> git.deb.at Git - deb/packages.git/blob - templates/html/show.tmpl
Separate handling of po translations and DDTP translations
[deb/packages.git] / templates / html / show.tmpl
1 [% PROCESS 'config/archive_layout.tmpl' %]
2 [% PROCESS 'config/mirrors.tmpl' %]
3 [%- known_vcs = [ [ 'cvs', 'CVS', 'cvs' ],
4                 [ 'svn', 'Subversion', 'subversion' ],
5                 [ 'bzr', 'bzr', 'bzr' ],
6                 [ 'darcs', 'Darcs', 'darcs' ],
7                 [ 'arch', 'arch', 'tla' ],
8                 [ 'git', 'Git', 'git-core' ],
9                 [ 'hg', 'Hg', 'mercurial' ], ];
10    vcs_link = page.get_newest("vcs-browser");
11 -%]
12 [%- suite_name = suite;
13     SET suite_name = suite_name _ ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite;
14     nav_arr = [ { prefix=>g('Distribution:'), title=>g('Overview over this suite'), url=>make_url('/','','source',''), name=>suite_name }, ];
15     nav_arr.push( { title =>g('Source packages'), url=>make_url('/'), name=>g('Source') } ) IF is_source;
16     nav_arr.push( { prefix=>g('Section:'), title=>g('All packages in this section'), url=>make_url("$subsection/"), name=>subsection } );
17     nav_arr.push( { prefix=>g('Package:'), name=>pkg } ); -%]
18 [% desclang = 'en';
19    SET desclang = po_lang IF desc.$po_lang.long;
20    SET desclang = ddtp_lang IF desc.$ddtp_lang.long %]
21 [%- PROCESS 'html/head.tmpl'
22    title_tag = is_source ? g('Details of source package %s in %s', pkg, suite)
23                          : g('Details of package %s in %s', pkg, suite)
24    description = desc.$desclang.short
25    keywords = "$suite, $archive, $section, $subsection, $version"
26    print_search_field = 'packages'
27    search_field_values = { 
28                           searchon => is_source ? 'sourcenames' : 'names',
29                          }
30   navigation = nav_arr
31 -%]
32 <!-- show.tmpl -->
33 [% PROCESS 'html/util.inc' %]
34 [% FOREACH s IN suites %]
35    [% '<div id="pothers">' IF loop.first %]
36    [%- IF s == suite -%]
37      [% PROCESS menuitem name=s url='' %]
38    [%- ELSE -%]
39      [% PROCESS menuitem name=s url=make_url(pkg,'','suite',s) %]
40    [%- END -%]
41    [%- '</div>' IF loop.last -%]
42 [% END %]
43
44 [% IF src %]
45 <div id="psource">
46 [% PROCESS menuitem prefix=g('Source:') title=g('Source package building this package') url=make_url(src.pkg,'','source','source') name=src.pkg %]
47 </div>
48 [% END %]
49
50 [%- PROCESS 'html/messages.tmpl' -%]
51
52 [% IF is_virtual %]
53 <h1>[% g('Virtual Package: %s', pkg) %]
54 [% ELSIF is_source %]
55 <h1>[% g('Source Package: %s (%s)', pkg, version) %]
56 [% ELSE %]
57 <h1>[% g('Package: %s (%s)', pkg, versions.short) %]
58 [% END %]
59 [%- PROCESS marker text=archive IF archive && archive != main_archive %]
60 [%- PROCESS marker text=section IF section && section != main_section %]
61 [%- PROCESS marker text=g('essential') IF page.get_newest('essential') == 'yes' %]</h1>
62
63 [% UNLESS is_virtual %]
64 <div id="pmoreinfo">
65 <h2>[% g('Links for %s', pkg) %]</h2>
66 <h3>[% g('Debian Resources:') %]</h3>
67 <ul>
68 <li><a href="[% (is_source ? src_bugs_url : bugs_url) _ pkg %]">[% g('Bug Reports') %]</a></li>
69
70 [% IF src.pkg -%]
71 <li><a href="[% pts_url _ src.pkg %]">[% g('Developer Information (PTS)') %]</a></li>
72 [% ELSIF is_source %]
73 <li><a href="[% pts_url _ pkg %]">[% g('Developer Information (PTS)') %]</a></li>
74 [%- END %]
75
76 [% IF files && (!archive or archive == main_archive or archive == 'security') %]
77 <li><a href="[% changelogs_url _ files.changelog.path %]">[% g('%s Changelog', organisation) %]</a></li>
78 <li><a href="[% changelogs_url _ files.copyright.path %]">[% g('Copyright File') %]</a></li>
79 [% END %]
80
81 [% IF vcs_link %]
82 <li><a href="[% vcs_link %]" class="pvcslink">[% g('Debian Source Repository') %]</a>
83 [%- FOREACH vcs IN known_vcs;
84         vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2;
85         vcs_info = page.get_newest("vcs-$vcs_id");
86         SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info;
87    IF vcs_info %]
88  (<a href="[% vcs_info %]" class="pvcslink">[% vcs_name %]</a>)
89 [% END %]
90 </li>
91 [% END; END %]
92
93 </ul>
94
95 [% IF src %]
96   <p>[% g('Download Source Package <a href="%s">%s</a>:', src.url, src.pkg) %]
97   [% FOREACH src.downloads %]
98     [% '<ul>' IF loop.first %]
99     <li><a href="[% server _ path %]">[[% name %]]</a></li>
100     [% '</ul>' IF loop.last %]
101   [% END %]
102   [% IF src.downloads.size == 0 %]
103   [% g('Not found') %]
104   [% END %]
105 [% END %]
106
107 [% IF maintainers.size == 1 -%]
108   <h3>[% g('Maintainer:') %]</h3>
109 [%- ELSE -%]
110   <h3>[% g('Maintainers:') %]</h3>
111 [%- END %]
112 [%- FOREACH maintainers;
113   mailarchiveurl = '';
114   IF (matches = mail.match('^(.*)@lists\.debian\.org$'));
115         mailarchiveurl = 'http://lists.debian.org/' _ matches.0 _ '/';
116   ELSIF (matches = mail.match('^(.*)@lists\.alioth\.debian\.org$'));
117         mailarchiveurl = 'http://lists.alioth.debian.org/pipermail/' _ matches.0 _ '/';
118   END -%]
119   [%- '<ul>' IF loop.first -%]
120         <li><a href="mailto:[% mail %]">[% name | html %]</a>
121         (<a href="[% ddpo_url _ mail %]" title="[% g("An overview over the maintainer's packages and uploads") %]">[% g('QA Page') %]</a>
122         [%- IF mailarchiveurl %], <a href="[% mailarchiveurl %]" title="[% g('Archive of the Maintainer Mailinglist') %]">[% g('Mail Archive') %]</a>[% END %])
123         </li>
124   [%- '</ul>' IF loop.last -%]
125 [%- END -%]
126
127 [% url = page.get_newest('url');
128    SET url = page.get_newest('homepage') IF page.get_newest('homepage');
129    IF url %]
130 <h3>[% g('External Resources:') %]</h3>
131 <ul>
132 <li><a href="[% url | uri %]">[% g('Homepage') %]</a> [[% extract_host(url) | html %]]</li>
133 </ul>
134 [% END %]
135
136 [% FOREACH sim IN similar %]
137         [% IF loop.first %]
138         <h3>[% g('Similar packages:') %]</h3>
139         <ul>
140         [% END %]
141         <li><a href="/[% sim %]">[% sim %]</a></li>
142         [% '</ul>' IF loop.last %]
143 [% END %]
144
145 </div> <!-- end pmoreinfo -->
146 [% END %]
147
148 [% IF suite == "experimental" || subsection == "debian-installer" %]
149 <div class="pconstantnag">
150 [% IF suite == "experimental" %]
151 [% changelog_link = 'changelog';
152    changelog_link = "$changelogs_url$files.changelog.path" %] 
153 <h2>[% g('Experimental package') %]</h2>
154 <p>[% g('Warning: This package is from the <strong>experimental</strong> distribution. That means it is likely unstable or buggy, and it may even cause data loss. Please be sure to consult the <a href="%s">changelog</a> and other possible documentation before using it.',
155         changelog_link) %]</p>
156 [% END %]
157 [% IF subsection == "debian-installer" %]
158 <h2>[% g('debian-installer udeb package') %]</h2>
159 <p>[% g('Warning: This package is intended for the use in building <a href="http://www.debian.org/devel/debian-installer">debian-installer</a> images only. Do not install it on a normal %s system.',
160         organisation ) %]</p>
161 [% END %]
162 </div>
163 [% END %]
164
165 <div id="ptablist">
166 </div>
167
168 [% IF desc %]
169 <div id="pdesctab">
170 [% UNLESS is_virtual %]
171 <div id="pdesc" [% "lang=\"$desclang\"" IF desclang != po_lang %]>
172         [% IF desc.$desclang.short %]
173         <h2>[% desc.$desclang.short %]</h2>
174         <p>[% desc.$desclang.long %]
175         [% END %]
176 [% ELSE %]
177 <div id="pdesc">
178         <p>[% g('This is a <em>virtual package</em>. See the <a href="%s">Debian policy</a> for a <a href="%sch-binary.html#s-virtual_pkg">definition of virtual packages</a>.',
179                 policy_url, policy_url) %]</p>
180 [% END %]
181 </div> <!-- end pdesc -->
182
183 [% FOREACH tag IN tags %]
184   [% IF loop.first -%]
185     <div id="ptags"><p>
186     <a href="[% tags_url %]edit.html?pkg=[% pkg | uri %]">[% g('Tags') %]</a>:
187   [%- END %]
188   [% facet = tag.0; lfacet = "$facet-$po_lang"; 
189      facet_name = debtags_voc.$lfacet;
190      SET facet_name = debtags_voc.$facet UNLESS facet_name;
191      tag_id = "$tag.0::$tag.1"; ltag = "$tag_id-$po_lang";
192      tag_name = debtags_voc.$ltag;
193      SET tag_name = debtags_voc.$tag_id UNLESS tag_name;
194    %]
195   [% facet_name _ ': ' UNLESS old_facet && facet == old_facet %]
196   [% IF tag_name %]
197    <a href="/about/debtags#[% string2id(tag_id) %]">[% tag_name | html %]</a>[% ', ' UNLESS loop.last %]
198   [% ELSE %]
199   [% tag_id %][% ', ' UNLESS loop.last %]
200   [% END %]
201   [% old_facet = facet %]
202   [% IF loop.last -%]
203     </p>
204     </div> <!-- end ptags -->
205   [%- END %]
206 [% END %]
207
208 [% FOREACH p IN providers %]
209   [% IF loop.first %]<div id="pdeps"><h2>[% g('Packages providing %s', pkg) %]</h2><dl>[% END %]
210     <dt>[% IF p.available %]<a href="[% make_url(p.name,'','source','') %]">[% p.name %]</a>[% ELSE; p.name; END %]</dt>
211     [% PROCESS desc_i18n_dd trans_desc=p.trans_desc desc=p.desc %]
212   [% '</dl></div>' IF loop.last %]
213 [% END %]
214 </div> <!-- pdesctab -->
215 [% END %]
216
217 [% FOREACH b IN binaries %]
218   [% IF loop.first %]<div id="pbinaries">[% g('The following binary packages are built from this source package:') %]<dl>[% END %]
219     <dt>[% IF b.available %]<a href="[% make_url(b.name,'','source','') %]">[% b.name %]</a>[% ELSE; b.name; END %]</dt>
220     [% PROCESS desc_i18n_dd trans_desc=b.trans_desc desc=b.desc %]
221   [% '</dl></div>' IF loop.last %]
222 [% END %]
223
224 [% FOREACH relations %]
225   [% IF loop.first -%]
226     <div id="pdeps">
227     <h2>[% g('Other Packages Related to %s', pkg) %]</h2>
228
229     <table id="pdeplegend" class="visual" summary="[% g('legend') %]"><tr>
230     [% IF is_source %]
231     <td><ul class="uladep"><li>[% g('build-depends') %]</li></ul></td>
232     <td><ul class="ulidep"><li>[% g('build-depends-indep') %]</li></ul></td>
233     [% ELSE %]
234     <td><ul class="uldep"><li>[% g('depends') %]</li></ul></td>
235     <td><ul class="ulrec"><li>[% g('recommends') %]</li></ul></td>
236     <td><ul class="ulsug"><li>[% g('suggests') %]</li></ul></td>
237     [% END %]
238     </tr></table>
239   [%- END %]
240
241   <ul class="ul[% id %]">
242   [% FOREACH terms %]
243     [% '<li>' UNLESS is_old_pkgs %]
244     [% FOREACH alternatives %]
245       [% '<dl>' IF loop.first %]
246       <dt>[% IF loop.first %]<span class="nonvisual">[% id %]:</span>[% ELSE %][% g('or ') %][% END %]
247         [% IF suite %]<a href="[% make_url(name,'','suite',suite,'source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]
248         [% ' (' _ version _ ')' IF version %]
249         [% ' [' _ arch_str _ ']' IF arch_str %]</dt>
250       [%- IF !is_old_pkgs -%]
251         [% PROCESS desc_i18n_dd no_end_tag=1 trans_desc=trans_desc desc=desc -%]
252         [%- IF providers.pkgs.size > 0 -%]
253           [% IF providers.also;
254                 '<br>' _ g('also a virtual package provided by');
255              ELSE;
256                 g('virtual package provided by');
257              END; %]
258           [% js_id = name %]
259             <span id="js_[% js_id %]" class="p_js_elem"></span> <span id="html_[% js_id %]">[% FOREACH provider IN providers.pkgs.sort %]<a href="[% make_url(provider,'','suite',suite,'source','') %]">[% provider %]</a>[% ', ' UNLESS loop.last %][% END %]</span>
260         [% IF providers.pkgs.size > 10 %]
261         <script type="text/javascript">init_toggle_elem("[% js_id %]","[% g('show %u providing packages', providers.pkgs.size) %]", "[% g('hide %u providing packages', providers.pkgs.size) %]")</script>
262         [% END %]
263         [% END %]
264         </dd>
265       [% END %]
266       [% '</dl>' IF loop.last %]
267     [% END %]
268   [% END %]
269   </ul>
270
271   [% IF loop.last -%]
272     </div> <!-- end pdeps -->
273   [%- END %]
274 [% END %]
275
276 [% FOREACH d IN downloads %]
277   [% IF loop.first -%]
278     <div id="pdownload">
279     <h2>[% g('Download %s', pkg) %]</h2>
280     
281     <table summary="[% g('The download table links to the download of the package and a file overview. In addition it gives information about the package size and the installed size.') %]">
282     <caption class="hidecss">[% g('Download for all available architectures') %]</caption>
283     <tr><th>[% g('Architecture') %]</th>
284         [% '<th>'_ g('Version') _'</th>' IF versions.multiple %]
285         <th>[% g('Package Size') %]</th>
286         <th>[% g('Installed Size') %]</th>
287         <th>[% g('Files') %]</th>
288     </tr>
289   [%- END %]
290
291 <tr>
292 [% download_url = pkg _ '/download'
293    filelist_url = pkg _ '/filelist' %]
294 <th><a href="[% make_url(download_url,'','arch',d.arch) %]">[% d.arch %]</a>
295 [%- SET a = d.archive; IF mirrors.$a.unofficial_port  %] <strong>[% g('(unofficial port)') %]</strong>[% END %]</th>
296 [% vnorm = d.version.replace( '\+b\d+$', '' ); vlatest = version.replace( '\+b\d+$', '' );
297    vup = vnorm.replace( '-[^-]+$', '' ); vuplatest = vlatest.replace( '-[^-]+$', '' );
298    IF vnorm == vlatest;
299         version_class = 'vcurrent';
300    ELSIF vup == vuplatest;
301         version_class = 'volder';
302    ELSE;
303         version_class = 'vold';
304    END %]
305 [% "<td class='$version_class'>$d.version</td>" IF versions.multiple %]
306 <td class="size">[% g('%s&nbsp;kB', num.format_number(d.pkgsize,1)) %]</td><td class="size">[% g('%s&nbsp;kB', d.instsize) %]</td>
307 <td>
308 [% IF d.contents_avail %]
309   [<a href="[% make_url(filelist_url,'','arch',d.arch) %]">[% g('list of files') %]</a>]
310 [% ELSE %]
311   [% g('no current information') %]
312 [% END %]
313 </td>
314 </tr>
315
316   [% IF loop.last -%]
317     </table>
318
319     </div> <!-- end pdownload -->
320   [%- END %]
321 [% END %]
322
323 [% FOREACH srcfiles %]
324   [% IF loop.first -%]
325     <div id="pdownload">
326     <h2>Download [% pkg %]</h2>
327     
328     <table summary="[% g('Download information for the files of this source package') %]">
329     <tr><th>[% g('File') %]</th><th>[% g('Size (in kB)') %]</th><th>[% g('MD5 checksum') %]</th></tr>
330   [%- END %]
331
332 <tr>
333 <td><a href="[% server _ path %]">[% filename %]</a></td>
334 <td>[% g('%s&nbsp;kB', num.format_number(size,1)) %]</td>
335 <td class="md5sum">[% md5sum %]</td>
336 </tr>
337
338   [% IF loop.last -%]
339     </table>
340
341 [% FOREACH vcs IN known_vcs;
342         vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2;
343         vcs_info = page.get_newest("vcs-$vcs_id");
344         SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info;
345         IF vcs_info; %]
346 <dl>
347 <dt>[% g('Debian Package Source Repository (<acronym title="Version Control System">VCS</acronym>: <a href="%s">%s</a>)',
348         make_url(vcs_pkg,'','source',''), vcs_name ) %]</dt>
349 <dd><a href="[% vcs_info %]" class="pvcslink">[% vcs_info %]</a></dd>
350 [% IF vcs_link %]
351 <dt>[% g('Debian Package Source Repository (Browsable)') %]</dt><dd><a href="[% vcs_link %]" class="pvcslink">[% vcs_link %]</a></dd>
352 [% END %]
353 </dl>
354 [% END; END %]
355
356     </div> <!-- end pdownload -->
357   [%- END %]
358 [% END %]
359
360 [%# <script type="text/javascript">init_tab_list("ptablist")</script> %]
361
362 [%- PROCESS 'html/foot.tmpl' -%]