]> git.deb.at Git - deb/packages.git/blob - templates/html/show.tmpl
Format installed size like package size
[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 title=mirrors.$archive.title url=mirrors.$archive.url IF archive && archive != main_archive %]
60 [%- PROCESS marker text=section title=section_titles.$section url=section_urls.$section IF section && section != main_section %]
61 [%- PROCESS marker text=g('essential') title=g('package manager will refuse to remove this package by default') url='http://www.debian.org/doc/debian-policy/ch-binary.html#s3.8' 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 [% IF screenshots_url && screenshots_thumb_url && !is_source %]
67 <a id="screenshot" href="[% screenshots_url _ pkg %]"><img src="[% "$screenshots_thumb_url/$pkg/$version" %]" alt="Screenshot" border="0"/></a>
68 [% END %]
69 <h3>[% g('%s Resources:', organisation) %]</h3>
70 <ul>
71 <li><a href="[% (is_source ? src_bugs_url : bugs_url) _ pkg %]">[% g('Bug Reports') %]</a></li>
72
73 [% IF src.pkg -%]
74 <li><a href="[% pts_url _ src.pkg %]">[% g('Developer Information (PTS)') %]</a></li>
75 [% ELSIF is_source %]
76 <li><a href="[% pts_url _ pkg %]">[% g('Developer Information (PTS)') %]</a></li>
77 [%- END %]
78
79 [% IF files && (!archive or archive == main_archive or archive == 'security') %]
80 <li><a href="[% changelogs_url _ files.changelog.path %]">[% g('%s Changelog', organisation) %]</a></li>
81 <li><a href="[% changelogs_url _ files.copyright.path %]">[% g('Copyright File') %]</a></li>
82 [% END %]
83
84 [% IF vcs_link %]
85 <li><a href="[% vcs_link %]" class="pvcslink">[% g('Debian Source Repository') %]</a>
86 [%- FOREACH vcs IN known_vcs;
87         vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2;
88         vcs_info = page.get_newest("vcs-$vcs_id");
89         SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info;
90    IF vcs_info %]
91  (<a href="[% vcs_info %]" class="pvcslink">[% vcs_name %]</a>)
92 [% END; END -%]
93 </li>
94 [% END -%]
95
96 [% IF patch_tracking_url && src %]
97   [% FOREACH src.downloads %]
98     [% IF name.match('\.(debian\.tar|diff)\.(gz|bz2|lzma)$') %]
99     <li><a href="[% "$patch_tracking_url/$src.pkg/$src.version" %]">[% g("%s Patch Tracker", organisation) %]</a></li>
100     [% END -%]
101   [% END -%]
102 [% ELSIF patch_tracking_url && is_source %]
103   [% FOREACH srcfiles %]
104     [% IF filename.match('\.(debian\.tar|diff)\.(gz|bz2|lzma)$') %]
105     <li><a href="[% "$patch_tracking_url/$pkg/$version" %]">[% g("%s Patch Tracker", organisation) %]</a></li>
106     [% END -%]
107   [% END -%]
108 [% END -%]
109
110 </ul>
111
112 [% IF src %]
113   <p>[% g('Download Source Package <a href="%s">%s</a>:', src.url, src.pkg) %]
114   [% FOREACH src.downloads %]
115     [% '<ul>' IF loop.first %]
116     <li><a href="[% server _ path %]">[[% name %]]</a></li>
117     [% '</ul>' IF loop.last %]
118   [% END %]
119   [% IF src.downloads.size == 0 %]
120   [% g('Not found') %]
121   [% END %]
122 [% END %]
123
124 [% IF maintainers.size == 1 -%]
125   <h3>[% g('Maintainer:') %]</h3>
126 [%- ELSE -%]
127   <h3>[% g('Maintainers:') %]</h3>
128 [%- END %]
129 [%- FOREACH maintainers;
130   mailarchiveurl = '';
131   IF (matches = mail.match('^(.*)@lists\.debian\.org$'));
132         mailarchiveurl = 'http://lists.debian.org/' _ uri_escape(matches.0) _ '/';
133   ELSIF (matches = mail.match('^(.*)@lists\.alioth\.debian\.org$'));
134         mailarchiveurl = 'http://lists.alioth.debian.org/pipermail/' _ uri_escape(matches.0) _ '/';
135   ELSIF (matches = mail.match('^(.*)@lists\.ubuntu\.com$'));
136         mailarchiveurl = 'http://lists.ubuntu.com/archives/' _ uri_escape(matches.0) _ '/';
137   END -%]
138   [%- '<ul>' IF loop.first -%]
139         <li><a href="mailto:[% mail | html %]">[% name | html %]</a>
140         (<a href="[% ddpo_url %][% uri_escape(mail) %]" title="[% g("An overview over the maintainer's packages and uploads") %]">[% g('QA&nbsp;Page') %]</a>
141         [%- IF mailarchiveurl %], <a href="[% mailarchiveurl %]" title="[% g('Archive of the Maintainer Mailinglist') %]">[% g('Mail&nbsp;Archive') %]</a>[% END %])
142         </li>
143   [%- '</ul>' IF loop.last -%]
144 [%- END -%]
145
146 [% url = page.get_newest('url');
147    SET url = page.get_newest('homepage') IF page.get_newest('homepage');
148    IF url %]
149 <h3>[% g('External Resources:') %]</h3>
150 <ul>
151 <li><a href="[% url | html %]">[% g('Homepage') %]</a> [[% extract_host(url) | html %]]</li>
152 </ul>
153 [% END %]
154
155 [% FOREACH sim IN similar %]
156         [% IF loop.first %]
157         <h3>[% g('Similar packages:') %]</h3>
158         <ul>
159         [% END %]
160         <li><a href="/[% sim %]">[% sim %]</a></li>
161         [% '</ul>' IF loop.last %]
162 [% END %]
163
164 </div> <!-- end pmoreinfo -->
165 [% END %]
166
167 [% IF suite == "experimental" || subsection == "debian-installer" %]
168 <div class="pconstantnag">
169 [% IF suite == "experimental" %]
170 [% changelog_link = 'changelog';
171    changelog_link = "$changelogs_url$files.changelog.path" %] 
172 <h2>[% g('Experimental package') %]</h2>
173 <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.',
174         changelog_link) %]</p>
175 [% END %]
176 [% IF subsection == "debian-installer" %]
177 <h2>[% g('debian-installer udeb package') %]</h2>
178 <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.',
179         organisation ) %]</p>
180 [% END %]
181 </div>
182 [% END %]
183
184 <div id="ptablist">
185 </div>
186
187 [% IF desc %]
188 <div id="pdesctab">
189 [% UNLESS is_virtual %]
190 <div id="pdesc" [% "lang=\"$desclang\"" IF desclang != po_lang %]>
191         [% IF desc.$desclang.short %]
192         <h2>[% desc.$desclang.short %]</h2>
193         <p>[% desc.$desclang.long %]
194         [% END %]
195 [% ELSE %]
196 <div id="pdesc">
197         <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>.',
198                 policy_url, policy_url) %]</p>
199 [% END %]
200 </div> <!-- end pdesc -->
201
202 [% FOREACH tag IN tags %]
203   [% IF loop.first -%]
204     <div id="ptags"><p>
205     <a href="[% tags_url %]edit.html?pkg=[% uri_escape(pkg) %]">[% g('Tags') %]</a>:
206   [%- END %]
207   [% facet = tag.0; lfacet = "$facet-$po_lang"; 
208      facet_name = debtags_voc.$lfacet;
209      SET facet_name = debtags_voc.$facet UNLESS facet_name;
210      tag_id = "$tag.0::$tag.1"; ltag = "$tag_id-$po_lang";
211      tag_name = debtags_voc.$ltag;
212      SET tag_name = debtags_voc.$tag_id UNLESS tag_name;
213    %]
214   [% facet_name _ ': ' UNLESS old_facet && facet == old_facet %]
215   [% IF tag_name %]
216    <a href="/about/debtags#[% string2id(tag_id) %]">[% tag_name | html %]</a>[% ', ' UNLESS loop.last %]
217   [% ELSE %]
218   [% tag_id %][% ', ' UNLESS loop.last %]
219   [% END %]
220   [% old_facet = facet %]
221   [% IF loop.last -%]
222     </p>
223     </div> <!-- end ptags -->
224   [%- END %]
225 [% END %]
226
227 [% FOREACH p IN providers %]
228   [% IF loop.first %]<div id="pdeps"><h2>[% g('Packages providing %s', pkg) %]</h2><dl>[% END %]
229     <dt>[% IF p.available %]<a href="[% make_url(p.name,'','source','') %]">[% p.name %]</a>[% ELSE; p.name; END %]</dt>
230     [% PROCESS desc_i18n_dd trans_desc=p.trans_desc desc=p.desc %]
231   [% '</dl></div>' IF loop.last %]
232 [% END %]
233 </div> <!-- pdesctab -->
234 [% END %]
235
236 [% FOREACH b IN binaries %]
237   [% IF loop.first %]<div id="pbinaries">[% g('The following binary packages are built from this source package:') %]<dl>[% END %]
238     <dt>[% IF b.available %]<a href="[% make_url(b.name,'','source','') %]">[% b.name %]</a>[% ELSE; b.name; END %]</dt>
239     [% PROCESS desc_i18n_dd trans_desc=b.trans_desc desc=b.desc %]
240   [% '</dl></div>' IF loop.last %]
241 [% END %]
242
243 [% FOREACH relations %]
244   [% IF loop.first -%]
245     <div id="pdeps">
246     <h2>[% g('Other Packages Related to %s', pkg) %]</h2>
247
248     <table id="pdeplegend" class="visual" summary="[% g('legend') %]"><tr>
249     [% IF is_source %]
250     <td><ul class="uladep"><li>[% g('build-depends') %]</li></ul></td>
251     <td><ul class="ulidep"><li>[% g('build-depends-indep') %]</li></ul></td>
252     [% ELSE %]
253     <td><ul class="uldep"><li>[% g('depends') %]</li></ul></td>
254     <td><ul class="ulrec"><li>[% g('recommends') %]</li></ul></td>
255     <td><ul class="ulsug"><li>[% g('suggests') %]</li></ul></td>
256     [% END %]
257     </tr></table>
258   [%- END %]
259
260   <ul class="ul[% id %]">
261   [% FOREACH t IN terms %]
262     [% '<li>' UNLESS t.is_old_pkgs %]
263     [% FOREACH a IN t.alternatives %]
264       [% '<dl>' IF loop.first %]
265       <dt>[% IF loop.first %]<span class="nonvisual">[% id %]:</span>[% ELSE %][% g('or ') %][% END %]
266         [% IF a.suite %]<a href="[% make_url(a.name,'','suite',a.suite,'source','') %]">[% a.name %]</a>[% ELSE %][% a.name %][% END %]
267         [% ' (' _ a.version _ ')' IF a.version %]
268         [% ' [' _ a.arch_str _ ']' IF a.arch_str %]</dt>
269       [%- IF !t.is_old_pkgs -%]
270         [% PROCESS desc_i18n_dd no_end_tag=1 trans_desc=a.trans_desc desc=a.desc -%]
271         [%- IF a.providers.pkgs && a.providers.pkgs.size > 0 -%]
272           [% IF a.providers.also;
273                 '<br>' _ g('also a virtual package provided by');
274              ELSE;
275                 g('virtual package provided by');
276              END; %]
277           [% js_id = a.name %]
278             <span id="js_[% js_id %]" class="p_js_elem"></span> <span id="html_[% js_id %]">[% FOREACH provider IN a.providers.pkgs.sort %]<a href="[% make_url(provider,'','suite',a.suite,'source','') %]">[% provider %]</a>[% ', ' UNLESS loop.last %][% END %]</span>
279         [% IF a.providers.pkgs.size > 10 %]
280         <script type="text/javascript">init_toggle_elem("[% js_id %]","[% g('show %u providing packages', a.providers.pkgs.size) %]", "[% g('hide %u providing packages', a.providers.pkgs.size) %]")</script>
281         [% END %]
282         [% END %]
283         </dd>
284       [% END %]
285       [% '</dl>' IF loop.last %]
286     [% END %]
287   [% END %]
288   </ul>
289
290   [% IF loop.last -%]
291     </div> <!-- end pdeps -->
292   [%- END %]
293 [% END %]
294
295 [% FOREACH d IN downloads %]
296   [% IF loop.first -%]
297     <div id="pdownload">
298     <h2>[% g('Download %s', pkg) %]</h2>
299     
300     <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.') %]">
301     <caption class="hidecss">[% g('Download for all available architectures') %]</caption>
302     <tr><th>[% g('Architecture') %]</th>
303         [% '<th>'_ g('Version') _'</th>' IF versions.multiple %]
304         <th>[% g('Package Size') %]</th>
305         <th>[% g('Installed Size') %]</th>
306         <th>[% g('Files') %]</th>
307     </tr>
308   [%- END %]
309
310 <tr>
311 [% download_url = pkg _ '/download'
312    filelist_url = pkg _ '/filelist' %]
313 <th><a href="[% make_url(download_url,'','arch',d.arch) %]">[% d.arch %]</a>
314 [%- SET a = d.archive; IF mirrors.$a.unofficial_port  %] <strong>[% g('(unofficial port)') %]</strong>[% END %]</th>
315 [% vnorm = d.version.replace( '\+b\d+$', '' ); vlatest = version.replace( '\+b\d+$', '' );
316    vup = vnorm.replace( '-[^-]+$', '' ); vuplatest = vlatest.replace( '-[^-]+$', '' );
317    IF vnorm == vlatest;
318         version_class = 'vcurrent';
319    ELSIF vup == vuplatest;
320         version_class = 'volder';
321    ELSE;
322         version_class = 'vold';
323    END %]
324 [% "<td class='$version_class'>$d.version</td>" IF versions.multiple %]
325 <td class="size">[% g('%s&nbsp;kB', num.format_number(d.pkgsize,1)) %]</td><td class="size">[% g('%s&nbsp;kB', num.format_number(d.instsize,1)) %]</td>
326 <td>
327 [% IF d.contents_avail %]
328   [<a href="[% make_url(filelist_url,'','arch',d.arch) %]">[% g('list of files') %]</a>]
329 [% ELSE %]
330   [% g('no current information') %]
331 [% END %]
332 </td>
333 </tr>
334
335   [% IF loop.last -%]
336     </table>
337
338     </div> <!-- end pdownload -->
339   [%- END %]
340 [% END %]
341
342 [% FOREACH srcfiles %]
343   [% IF loop.first -%]
344     <div id="pdownload">
345     <h2>Download [% pkg %]</h2>
346     
347     <table summary="[% g('Download information for the files of this source package') %]">
348     <tr><th>[% g('File') %]</th><th>[% g('Size (in kB)') %]</th><th>[% g('MD5 checksum') %]</th></tr>
349   [%- END %]
350
351 <tr>
352 <td><a href="[% server _ path %]">[% filename %]</a></td>
353 <td>[% g('%s&nbsp;kB', num.format_number(size,1)) %]</td>
354 <td class="md5sum">[% md5sum %]</td>
355 </tr>
356
357   [% IF loop.last -%]
358     </table>
359
360 [% FOREACH vcs IN known_vcs;
361         vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2;
362         vcs_info = page.get_newest("vcs-$vcs_id");
363         SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info;
364         LAST IF vcs_info;
365    END;
366    IF vcs_info || vcs_link; %]
367 <dl>
368 [% IF vcs_info %]
369 <dt>[% g('Debian Package Source Repository (<acronym title="Version Control System">VCS</acronym>: <a href="%s">%s</a>)',
370         make_url(vcs_pkg,'','source',''), vcs_name ) %]</dt>
371 <dd><a href="[% vcs_info %]" class="pvcslink">[% vcs_info %]</a></dd>
372 [% END;
373    IF vcs_link %]
374 <dt>[% g('Debian Package Source Repository (Browsable)') %]</dt>
375 <dd><a href="[% vcs_link %]" class="pvcslink">[% vcs_link %]</a></dd>
376 [% END %]
377 </dl>
378 [% END %]
379
380     </div> <!-- end pdownload -->
381   [%- END %]
382 [% END %]
383
384 [%# <script type="text/javascript">init_tab_list("ptablist")</script> %]
385
386 [%- PROCESS 'html/foot.tmpl' page_name=pkg -%]