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