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