]> git.deb.at Git - deb/packages.git/blob - templates/html/show.tmpl
[UBUNTU] html/show.tmpl: Fix some of the links
[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 = lang IF desc.$lang.long %]
20 [%- PROCESS 'html/head.tmpl'
21    title_tag = is_source ? g('Details of source package %s in %s', pkg, suite)
22                          : g('Details of package %s in %s', pkg, suite)
23    description = desc.$desclang.short
24    keywords = "$suite, $archive, $section, $subsection, $version"
25    print_search_field = 'packages'
26    search_field_values = { 
27                           searchon => is_source ? 'sourcenames' : 'names',
28                          }
29   navigation = nav_arr
30 -%]
31 <!-- show.tmpl -->
32 [% PROCESS 'html/menu.inc' %]
33 [% FOREACH s IN suites %]
34    [% '<div id="pothers">' IF loop.first %]
35    [%- IF s == suite -%]
36      [% PROCESS menuitem name=s url='' %]
37    [%- ELSE -%]
38      [% PROCESS menuitem name=s url=make_url(pkg,'','suite',s) %]
39    [%- END -%]
40    [%- '</div>' IF loop.last -%]
41 [% END %]
42
43 [% IF src %]
44 <div id="psource">
45 [% PROCESS menuitem prefix=g('Source:') title=g('Source package building this package') url=make_url(src.pkg,'','source','source') name=src.pkg %]
46 </div>
47 [% END %]
48
49 [%- PROCESS 'html/messages.tmpl' -%]
50
51 [% IF is_virtual %]
52 <h1>[% g('Virtual Package: %s', pkg) %]
53 [% ELSIF is_source %]
54 <h1>[% g('Source Package: %s (%s)', pkg, version) %]
55 [% ELSE %]
56 <h1>[% g('Package: %s (%s)', pkg, versions.short) %]
57 [% END %]
58 [%- PROCESS marker text=archive IF archive && archive != main_archive %]
59 [%- PROCESS marker text=section IF section && section != main_section %]
60 [%- PROCESS marker text=g('essential') IF page.get_newest('essential') == 'yes' %]</h1>
61
62 [% UNLESS is_virtual %]
63 <div id="pmoreinfo">
64 <h2>[% g('Links for %s', pkg) %]</h2>
65 <h3>[% g('Debian Resources:') %]</h3>
66 <ul>
67 <li><a href="[% launchpad_url _ (is_source ? pkg : src.pkg) _ '/+bugs' | uri %]">[% g('Bug Reports') %]</a></li>
68
69 [% IF files && (!archive or archive == main_archive or archive == 'security') %]
70 <li><a href="[% changelogs_url _ files.changelog.path %]">[% g('%s Changelog', organisation) %]</a></li>
71 <li><a href="[% changelogs_url _ files.copyright.path %]">[% g('Copyright File') %]</a></li>
72 [% END %]
73
74 [% IF vcs_link %]
75 <li><a href="[% vcs_link %]" class="pvcslink">[% g('Debian Source Repository') %]</a>
76 [%- FOREACH vcs IN known_vcs;
77         vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2;
78         vcs_info = page.get_newest("vcs-$vcs_id");
79         SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info;
80    IF vcs_info %]
81  (<a href="[% vcs_info %]" class="pvcslink">[% vcs_name %]</a>)
82 [% END %]
83 </li>
84 [% END; END %]
85
86 </ul>
87
88 [% IF src %]
89   <p>[% g('Download Source Package <a href="%s">%s</a>:', src.url, src.pkg) %]
90   [% FOREACH src.downloads %]
91     [% '<ul>' IF loop.first %]
92     <li><a href="[% server _ path %]">[[% name %]]</a></li>
93     [% '</ul>' IF loop.last %]
94   [% END %]
95   [% IF src.downloads.size == 0 %]
96   [% g('Not found') %]
97   [% END %]
98 [% END %]
99
100 [% IF maintainers.size == 1 -%]
101   <h3>[% g('Maintainer:') %]</h3>
102 [%- ELSE -%]
103   <h3>[% g('Maintainers:') %]</h3>
104 [%- END %]
105 [%- FOREACH maintainers -%]
106   [%- '<ul>' IF loop.first -%]
107         <li><a href="mailto:[% mail %]">[% name | html %]</a></li>
108   [%- '</ul>' IF loop.last -%]
109 [%- END -%]
110
111 [% url = page.get_newest('url');
112    SET url = page.get_newest('homepage') IF page.get_newest('homepage');
113    IF url %]
114 <h3>[% g('External Resources:') %]</h3>
115 <ul>
116 <li><a href="[% url | uri %]">[% g('Homepage') %]</a> [[% extract_host(url) %]]</li>
117 </ul>
118 [% END %]
119
120 [% FOREACH sim IN similar %]
121         [% IF loop.first %]
122         <h3>[% g('Similar packages:') %]</h3>
123         <ul>
124         [% END %]
125         <li><a href="/[% sim %]">[% sim %]</a></li>
126         [% '</ul>' IF loop.last %]
127 [% END %]
128
129 </div> <!-- end pmoreinfo -->
130 [% END %]
131
132 [% IF suite == "experimental" || subsection == "debian-installer" %]
133 <div class="pconstantnag">
134 [% IF suite == "experimental" %]
135 [% changelog_link = 'changelog';
136    changelog_link = "$changelogs_url$files.changelog.path" %] 
137 <h2>[% g('Experimental package') %]</h2>
138 <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.',
139         changelog_link) %]</p>
140 [% END %]
141 [% IF subsection == "debian-installer" %]
142 <h2>[% g('debian-installer udeb package') %]</h2>
143 <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.',
144         organisation ) %]</p>
145 [% END %]
146 </div>
147 [% END %]
148
149 <div id="ptablist">
150 </div>
151
152 [% IF desc %]
153 <div id="pdesctab">
154 <div id="pdesc">
155 [% UNLESS is_virtual %]
156         [% IF desc.$desclang.short %]
157         <h2>[% desc.$desclang.short %]</h2>
158         <p>[% desc.$desclang.long %]
159         [% END %]
160 [% ELSE %]
161         <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>.',
162                 policy_url, policy_url) %]</p>
163 [% END %]
164 </div> <!-- end pdesc -->
165
166 [% FOREACH tag IN tags %]
167   [% IF loop.first -%]
168     <div id="ptags"><p>
169     <a href="[% tags_url %]edit.html?pkg=[% pkg | uri %]">[% g('Tags') %]</a>:
170   [%- END %]
171   [% facet = tag.0;
172      facet_name = debtags_voc.$facet;
173      tag_id = "$tag.0::$tag.1";
174      tag_name = debtags_voc.$tag_id;
175    %]
176   [% facet_name _ ': ' UNLESS old_facet && facet == old_facet %]
177   [% IF tag_name %]
178    <a href="/about/debtags#[% string2id(tag_id) %]">[% tag_name %]</a>[% ', ' UNLESS loop.last %]
179   [% ELSE %]
180   [% tag_id %][% ', ' UNLESS loop.last %]
181   [% END %]
182   [% old_facet = facet %]
183   [% IF loop.last -%]
184     </p>
185     </div> <!-- end ptags -->
186   [%- END %]
187 [% END %]
188
189 [% FOREACH providers %]
190   [% IF loop.first %]<div id="pdeps"><h2>[% g('Packages providing %s', pkg) %]</h2><dl>[% END %]
191     <dt>[% IF available %]<a href="[% make_url(name,'','source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]</dt>
192     <dd>[% desc %]</dd>
193   [% '</dl></div>' IF loop.last %]
194 [% END %]
195 </div> <!-- pdesctab -->
196 [% END %]
197
198 [% FOREACH binaries %]
199   [% IF loop.first %]<div id="pbinaries">[% g('The following binary packages are built from this source package:') %]<dl>[% END %]
200     <dt>[% IF available %]<a href="[% make_url(name,'','source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]</dt>
201     <dd>[% desc %]</dd>    
202   [% '</dl></div>' IF loop.last %]
203 [% END %]
204
205 [% FOREACH relations %]
206   [% IF loop.first -%]
207     <div id="pdeps">
208     <h2>[% g('Other Packages Related to %s', pkg) %]</h2>
209
210     <table id="pdeplegend" class="visual" summary="[% g('legend') %]"><tr>
211     [% IF is_source %]
212     <td><ul class="uladep"><li>[% g('build-depends') %]</li></ul></td>
213     <td><ul class="ulidep"><li>[% g('build-depends-indep') %]</li></ul></td>
214     [% ELSE %]
215     <td><ul class="uldep"><li>[% g('depends') %]</li></ul></td>
216     <td><ul class="ulrec"><li>[% g('recommends') %]</li></ul></td>
217     <td><ul class="ulsug"><li>[% g('suggests') %]</li></ul></td>
218     [% END %]
219     </tr></table>
220   [%- END %]
221
222   <ul class="ul[% id %]">
223   [% FOREACH terms %]
224     [% '<li>' UNLESS is_old_pkgs %]
225     [% FOREACH alternatives %]
226       [% '<dl>' IF loop.first %]
227       <dt>[% IF loop.first %]<span class="nonvisual">[% id %]:</span>[% ELSE %]or [% END %]
228         [% IF suite %]<a href="[% make_url(name,'','suite',suite,'source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]
229         [% ' (' _ version _ ')' IF version %]
230         [% ' [' _ arch_str _ ']' IF arch_str %]</dt>
231       [%- IF !is_old_pkgs -%]
232         <dd>[% desc -%]
233         [%- IF providers.pkgs.size > 0 -%]
234           [% IF providers.also;
235                 '<br>' _ g('also a virtual package provided by');
236              ELSE;
237                 g('virtual package provided by');
238              END; %]
239           [% js_id = name %]
240             <span id="js_[% js_id %]" class="p_js_elem"></span> <span id="html_[% js_id %]">[% FOREACH provider IN providers.pkgs %]<a href="[% make_url(provider,'','suite',suite,'source','') %]">[% provider %]</a>[% ', ' UNLESS loop.last %][% END %]</span>
241         [% IF providers.pkgs.size > 10 %]
242         <script type="text/javascript">init_toggle_elem("[% js_id %]",[% g('%u providing packages', providers.pkgs.size) %]</script>
243         [% END %]
244         [% END %]
245         </dd>
246       [% END %]
247       [% '</dl>' IF loop.last %]
248     [% END %]
249   [% END %]
250   </ul>
251
252   [% IF loop.last -%]
253     </div> <!-- end pdeps -->
254   [%- END %]
255 [% END %]
256
257 [% FOREACH d IN downloads %]
258   [% IF loop.first -%]
259     <div id="pdownload">
260     <h2>[% g('Download %s', pkg) %]</h2>
261     
262     <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.') %]">
263     <caption class="hidecss">[% g('Download for all available architectures') %]</caption>
264     <tr><th>[% g('Architecture') %]</th>
265         [% '<th>'_ g('Version') _'</th>' IF versions.multiple %]
266         <th>[% g('Package Size') %]</th>
267         <th>[% g('Installed Size') %]</th>
268         <th>[% g('Files') %]</th>
269     </tr>
270   [%- END %]
271
272 <tr>
273 [% download_url = pkg _ '/' _ d.arch _ '/download'
274    filelist_url = pkg _ '/' _ d.arch _ '/filelist' %]
275 <th><a href="[% make_url(download_url) | uri %]">[% d.arch %]</a>
276 [%- SET a = d.archive; IF mirrors.$a.unofficial_port  %] <strong>[% g('(unofficial port)') %]</strong>[% END %]</th>
277 [% vnorm = d.version.replace( '\+b\d+$', '' ); vlatest = version.replace( '\+b\d+$', '' );
278    vup = vnorm.replace( '-[^-]+$', '' ); vuplatest = vlatest.replace( '-[^-]+$', '' );
279    IF vnorm == vlatest;
280         version_class = 'vcurrent';
281    ELSIF vup == vuplatest;
282         version_class = 'volder';
283    ELSE;
284         version_class = 'vold';
285    END %]
286 [% "<td class='$version_class'>$d.version</td>" IF versions.multiple %]
287 <td class="size">[% g('%.1f&nbsp;kB', d.pkgsize) %]</td><td class="size">[% g('%u&nbsp;kB', d.instsize) %]</td>
288 <td>
289 [% IF d.contents_avail %]
290   [<a href="[% make_url(filelist_url) | uri %]">[% g('list of files') %]</a>]
291 [% ELSE %]
292   [% g('no current information') %]
293 [% END %]
294 </td>
295 </tr>
296
297   [% IF loop.last -%]
298     </table>
299
300     </div> <!-- end pdownload -->
301   [%- END %]
302 [% END %]
303
304 [% FOREACH srcfiles %]
305   [% IF loop.first -%]
306     <div id="pdownload">
307     <h2>Download [% pkg %]</h2>
308     
309     <table summary="[% g('Download information for the files of this source package') %]">
310     <tr><th>[% g('File') %]</th><th>[% g('Size (in kB)') %]</th><th>[% g('MD5 checksum') %]</th></tr>
311   [%- END %]
312
313 <tr>
314 <td><a href="[% server _ path %]">[% filename %]</a></td>
315 <td>[% g('%.1f&nbsp;kB', size) %]</td>
316 <td class="md5sum">[% md5sum %]</td>
317 </tr>
318
319   [% IF loop.last -%]
320     </table>
321
322 [% FOREACH vcs IN known_vcs;
323         vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2;
324         vcs_info = page.get_newest("vcs-$vcs_id");
325         SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info;
326         IF vcs_info; %]
327 <dl>
328 <dt>[% g('Debian Package Source Repository (<acronym title="Version Control System">VCS</acronym>: <a href="%s">%s</a>)',
329         make_url(vcs_pkg,'','source',''), vcs_name ) %]</dt>
330 <dd><a href="[% vcs_info %]" class="pvcslink">[% vcs_info %]</a></dd>
331 [% IF vcs_link %]
332 <dt>[% g('Debian Package Source Repository (Browsable)') %]</dt><dd><a href="[% vcs_link %]" class="pvcslink">[% vcs_link %]</a></dd>
333 [% END %]
334 </dl>
335 [% END; END %]
336
337     </div> <!-- end pdownload -->
338   [%- END %]
339 [% END %]
340
341 [%# <script type="text/javascript">init_tab_list("ptablist")</script> %]
342
343 [%- PROCESS 'html/foot.tmpl' -%]