Add method to get a track by a derivative ID.
[demoscenemusic.git] / src / main / resources / templates / track
1 <%ifnull track>
2 <%include include/header title=="Unknown Track">
3 <p>Unknown track ID.</p>
4 <%else>
5 <%include include/header title=track.name>
6
7 <h1>
8         <% track.name|html>
9         by
10         <%foreach track.artists artist>
11                 <%notfirst>&amp;<%/notfirst>
12                 <a href="artist?id=<% artist.id|html>"><% artist.name|html></a>
13         <%/foreach>
14         <%ifnull !track.remix>
15         (<% track.remix|html> by <%foreach track.remixArtists artist><%notfirst> &amp; <%/notfirst><a href="artist?id=<% artist.id|html>"><% artist.name|html></a><%/foreach>)
16         <%/if>
17 </h1>
18
19 <%ifnull !track.properties.release/name>
20         <%ifnull !track.properties.release/pouet/id>
21                 <div>Release: <a href="http://pouet.net/prod.php?which=<%track.properties.release/pouet/id|html>"><%track.properties.release/name|html></a></div>
22         <%else>
23                 <div>Release: <%track.properties.release/name|html></div>
24         <%/if>
25 <%/if>
26
27 <%foreach track.derivatives derivative>
28
29         <h2><%ifnull !derivative.properties.file/original-name><%derivative.properties.file/original-name|html><%else>Unnamed File<%/if></h2>
30
31         <div class="size"><%derivative.size|concise|html>B</div>
32
33         <%ifnull !derivative.properties.audio/codec>
34                 <div class="audio-codec"><%derivative.properties.audio/codec.name|html></div>
35         <%/if>
36
37         <%ifnull !derivative.properties.media/bitrate>
38                 <div class="bitrate"><%derivative.properties.media/bitrate|html> kbps</div>
39         <%/if>
40
41         <%ifnull !derivative.properties.media/length>
42                 <div class="length"><%derivative.properties.media/length|time></div>
43         <%/if>
44
45 <%foreachelse>
46         <p>This track does not have any files.</p>
47 <%/foreach>
48
49 <dl>
50
51 <dt>Styles</dt>
52 <dd>
53 <ul>
54 <%foreach track.styles style|sort>
55 <li><a href="style?id=<% style.id|html>"><% style.name|html></a></li>
56 <%/foreach>
57 </ul>
58 </dd>
59
60 </dl>
61
62
63 <%/if>
64
65 <%include include/footer>