]> git.deb.at Git - deb/packages.git/blob - templates/html/show.tmpl
show.tmpl: Add a 'Source' entry in the navigation bar for source packages
[deb/packages.git] / templates / html / show.tmpl
1 [% PROCESS 'config/archive_layout.tmpl' %]
2 [%- nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite }, ];
3     nav_arr.push( { title => 'Source packages', url=>make_url('/'), name=>'Source' } ) IF is_source;
4     nav_arr.push( { prefix=>'Section:', title=>'All packages in this section', url=>make_url("$subsection/"), name=>subsection } );
5     nav_arr.push( { prefix=>'Package:', name=>pkg } ); -%]
6 [%- PROCESS 'html/head.tmpl'
7    title_tag = ( is_source ? "Details of source package $pkg in $suite"
8                            : "Details of package $pkg in $suite" )
9    description = desc
10    keywords = "$suite, $archive, $section, $subsection, $version"
11    print_search_field = 'packages'
12    search_field_values = { 
13                           searchon => is_source ? 'sourcenames' : 'names',
14                          }
15   navigation = nav_arr
16 -%]
17 <!-- show.tmpl -->
18 [% PROCESS 'html/menu.inc' %]
19 [% FOREACH s IN suites %]
20    [% '<div id="pothers">' IF loop.first %]
21    [%- IF s == suite -%]
22      [% PROCESS menuitem name=s url='' %]
23    [%- ELSE -%]
24      [% PROCESS menuitem name=s url=make_url(pkg,'','suite',s) %]
25    [%- END -%]
26    [%- '</div>' IF loop.last -%]
27 [% END %]
28
29 [% IF src %]
30 <div id="psource">
31 [% PROCESS menuitem prefix='Source:' title='Source package building this package' url=make_url(src.pkg,'','source','source') name=src.pkg %]
32 </div>
33 [% END %]
34
35 [%- PROCESS 'html/messages.tmpl' -%]
36
37 [% IF is_virtual %]
38 <h1>Virtual Package: [% pkg %]
39 [% ELSIF is_source %]
40 <h1>Source Package: [% pkg %] ([% version %])
41 [% ELSE %]
42 <h1>Package: [% pkg %] ([% versions.short %])
43 [% END %]
44 [%- PROCESS marker text=archive IF archive && archive != main_archive %]
45 [%- PROCESS marker text=subsection IF subsection == 'non-US' and archive != 'non-US' %]
46 [%- PROCESS marker text=section IF section && section != main_section %]
47 [%- PROCESS marker text='essential' IF page.get_newest('essential') == 'yes' %]</h1>
48
49 [% UNLESS is_virtual %]
50 <div id="pmoreinfo">
51 <h2>Links for [% pkg %]</h2>
52 <h3>Debian Resources:</h3>
53 <ul>
54 <li><a href="[% (is_source ? src_bugs_url : bugs_url) _ pkg | uri %]">Bug Reports</a></li>
55
56 [% IF src -%]
57 <li><a href="[% pts_url _ src.pkg | uri %]">Developer Information (PTS)</a></li>
58 [% ELSIF is_source %]
59 <li><a href="[% pts_url _ pkg | uri %]">Developer Information (PTS)</a></li>
60 [%- END %]
61
62 [% IF files %]
63 <li><a href="[% changelogs_url _ files.changelog.path %]">Debian Changelog</a></li>
64 <li><a href="[% changelogs_url _ files.copyright.path %]">Copyright File</a></li>
65 [% END %]
66 </ul>
67
68 [% vcs_link = page.get_newest("vcs-browser") %]
69 [% #FIXME: should this only be used for the PTS?
70    known_vcs = [ [ 'cvs', 'CVS', 'cvs' ],
71                 [ 'svn', 'Subversion', 'subversion' ],
72                 [ 'bzr', 'bzr', 'bzr' ],
73                 [ 'darcs', 'Darcs', 'darcs' ],
74                 [ 'arch', 'arch', 'tla' ],
75                 [ 'git', 'Git', 'git-core' ],
76                 [ 'hg', 'Hg', 'mercurial' ], ];
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 <p>Debian Package Repository (<acronym title="Version Control System">VCS</acronym>:
83 <a href="[% make_url(vcs_pkg,'','source','') %]">[% vcs_name %]</a>):<br> <a href="[% vcs_info %]" class="pvcslink">[% vcs_info %]</a></p>
84 [% IF vcs_link %]
85 <p>Debian Package Repository (Browsable):<br> <a href="[% vcs_link %]" class="pvcslink">[% vcs_link %]</a></p>
86 [% END; END; END %]
87
88 [% IF src %]
89   <p>Download Source Package <a href="[% src.url %]">[% src.pkg %]</a>:
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   Not found
97   [% END %]
98 [% END %]
99
100 [% IF maintainers.size == 1 -%]
101   <h3>Maintainer:</h3>
102   [%- FOREACH maintainers -%]
103         <a href="mailto:[% mail %]">[% name | html %]</a>
104         (<a href="[% ddpo_url _ mail %]" title="An overview over the maintainter's packages and uploads">QA Page</a>)
105   [%- END -%]
106 [%- ELSE -%]
107   <h3>Maintainers:</h3>
108   [%- FOREACH maintainers -%]
109     [%- '<ul>' IF loop.first -%]
110         <li><a href="mailto:[% mail %]">[% name | html %]</a>
111         (<a href="[% ddpo_url _ mail %]" title="An overview over the maintainter's packages and uploads">QA Page</a>)
112         </li>
113     [%- '</ul>' IF loop.last -%]
114   [%- END -%]
115 [%- END %]
116
117 [% url = page.get_newest('url');
118    IF url %]
119 <h3>External Resources:</h3>
120 <p>Homepage: <a href="[% url | uri %]">[% url | html %]</a></p>
121 [% END %]
122
123 </div> <!-- end pmoreinfo -->
124 [% END %]
125
126 [% IF suite == "experimental" || subsection == "debian-installer" %]
127 <div class="pconstantnag">
128 [% IF suite == "experimental" %]
129 [% changelog_link = 'changelog';
130    changelog_link = "<a href='$changelogs_url$files.changelog.path'>changelog</a>" %] 
131 <h2>Experimental package</h2>
132 <p>Warning: This package is from the <strong>experimental</strong> distribution.
133 That means it is likely unstable or buggy, and it may even cause data loss.
134 Please be sure to consult the [% changelog_link %] and other possible documentation before
135 using it.</p>
136 [% END %]
137 [% IF subsection == "debian-installer" %]
138 <h2>debian-installer udeb package</h2>
139 <p>Warning: This package is intended for the use in building
140 <a href="http://www.debian.org/devel/debian-installer">debian-installer</a> images only.
141 Do not install it on a normal Debian system.</p>
142 [% END %]
143 </div>
144 [% END %]
145
146 <div id="pdesc">
147 [% UNLESS is_virtual %]
148         [% IF desc.short %]
149         <h2>[% desc.short %]</h2>
150         <p>[% desc.long %]
151         [% END %]
152 [% ELSE %]
153         <p>This is a <em>virtual package</em>. See the <a href="[% policy_url %]">Debian policy</a> for a <a href="[% policy_url %]ch-binary.html#s-virtual_pkg">definition of virtual packages</a>.</p>
154 [% END %]
155 </div> <!-- end pdesc -->
156
157 [% FOREACH tag IN tags %]
158   [% IF loop.first -%]
159     <div id="ptags"><p>
160     <a href="[% tags_url %]edit.html?pkg=[% pkg | uri %]">Tags</a>:
161   [%- END %]
162   [% facet = tag.0;
163      facet_name = debtags_voc.$facet;
164      tag_id = "$tag.0::$tag.1";
165      tag_name = debtags_voc.$tag_id;
166    %]
167   [% facet_name _ ': ' UNLESS old_facet && facet == old_facet %]
168   [% IF tag_name %]
169    <a href="/about/debtags#[% string2id(tag_id) %]">[% tag_name %]</a>[% ', ' UNLESS loop.last %]
170   [% ELSE %]
171   [% tag_id %][% ', ' UNLESS loop.last %]
172   [% END %]
173   [% old_facet = facet %]
174   [% IF loop.last -%]
175     </p>
176     </div> <!-- end ptags -->
177   [%- END %]
178 [% END %]
179
180 [% FOREACH providers %]
181   [% IF loop.first %]<div id="pdeps"><h2>Packages providing [% pkg %]</h2><dl>[% END %]
182     <dt>[% IF available %]<a href="[% make_url(name,'','source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]</dt>
183     <dd>[% desc %]</dd>
184   [% '</dl></div>' IF loop.last %]
185 [% END %]
186
187 [% FOREACH binaries %]
188   [% IF loop.first %]<div class="pdesc">The following binary packages are built from this source package:<dl>[% END %]
189     <dt>[% IF available %]<a href="[% make_url(name,'','source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]</dt>
190     <dd>[% desc %]</dd>    
191   [% '</dl></div>' IF loop.last %]
192 [% END %]
193
194 [% FOREACH relations %]
195   [% IF loop.first -%]
196     <div id="pdeps">
197     <h2>Other Packages Related to [% pkg %]</h2>
198
199     <table id="pdeplegend" summary="legend"><tr>
200     [% IF is_source %]
201     <td><img src="/Pics/adep.gif" alt="[adep]" width="16" height="16">= build-depends</td>
202     <td><img src="/Pics/idep.gif" alt="[idep]" width="16" height="16">= build-depends-indep</td>
203     [% ELSE %]
204     <td><img src="/Pics/dep.gif" alt="[dep]" width="16" height="16">= depends</td>
205     <td><img src="/Pics/rec.gif" alt="[rec]" width="16" height="16">= recommends</td>
206     <td><img src="/Pics/sug.gif" alt="[sug]" width="16" height="16">= suggests</td>
207     [% END %]
208     </tr></table>
209   [%- END %]
210
211   <ul class="ul[% id %]">
212   [% FOREACH terms %]
213     [% '<li>' UNLESS is_old_pkgs %]
214     [% FOREACH alternatives %]
215       [% '<dl>' IF loop.first %]
216       <dt>[% IF loop.first %]<img class="hidecss" src="/Pics/[% id %].gif" alt="[[% id %]]">[% ELSE %]or [% END %]
217         [% IF suite %]<a href="[% make_url(name,'','suite',suite,'source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]
218         [% ' (' _ version _ ')' IF version %]
219         [% ' [' _ arch_str _ ']' IF arch_str %]</dt>
220       [%- IF !is_old_pkgs -%]
221         <dd>[% desc -%]
222         [%- IF providers.pkgs.size > 0 -%]
223           [% '<br>also a ' IF providers.also %]virtual package provided by
224           [% js_id = name %]
225             <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>
226         [% IF providers.pkgs.size > 10 %]
227         <script type="text/javascript">init_toggle_elem("[% js_id %]","[% providers.pkgs.size %] providing packages")</script>
228         [% END %]
229         [% END %]
230         </dd>
231       [% END %]
232       [% '</dl>' IF loop.last %]
233     [% END %]
234   [% END %]
235   </ul>
236
237   [% IF loop.last -%]
238     </div> <!-- end pdeps -->
239   [%- END %]
240 [% END %]
241
242 [% FOREACH downloads %]
243   [% IF loop.first -%]
244     <div id="pdownload">
245     <h2>Download [% pkg %]</h2>
246     
247     <table summary="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.">
248     <caption class="hidecss">Download for all available architectures</caption>
249     <tr><th>Architecture</th>[% '<th>Version</th>' IF versions.multiple %]<th>Package Size</th><th>Installed Size</th><th>Files</th></tr>
250   [%- END %]
251
252 <tr>
253 [% download_url = pkg _ '/' _ arch _ '/download'
254    filelist_url = pkg _ '/' _ arch _ '/filelist' %]
255 <th><a href="[% make_url(download_url) | uri %]">[% arch %]</a></th>
256 [% '<td>' _ version _ '</td>' IF versions.multiple %]
257 <td class="size">[% pkgsize %]&nbsp;kB</td><td class="size">[% instsize %]&nbsp;kB</td>
258 <td>
259 [% IF contents_avail %]
260   [<a href="[% make_url(filelist_url) | uri %]">list of files</a>]
261 [% ELSE %]
262   no current information
263 [% END %]
264 </td>
265 </tr>
266
267   [% IF loop.last -%]
268     </table>
269
270     </div> <!-- end pdownload -->
271   [%- END %]
272 [% END %]
273
274 [% FOREACH srcfiles %]
275   [% IF loop.first -%]
276     <div id="pdownload">
277     <h2>Download [% pkg %]</h2>
278     
279     <table summary="Download information for the files of this source package">
280     <tr><th>File</th><th>Size (in kB)</th><th>md5sum</th></tr>
281   [%- END %]
282
283 <tr>
284 <td><a href="[% server _ path %]">[% filename %]</a></td>
285 <td>[% size %]</td>
286 <td class="md5sum">[% md5sum %]</td>
287 </tr>
288
289   [% IF loop.last -%]
290     </table>
291
292     </div> <!-- end pdownload -->
293   [%- END %]
294 [% END %]
295