If there’s no codec, use the extension.
[demoscenemusic.git] / src / main / resources / templates / track
index 6d96585..d0e8bc1 100644 (file)
@@ -9,26 +9,42 @@
        by
        <%foreach track.artists artist>
                <%notfirst>&amp;<%/notfirst>
-               <a href="artist?id=<% artist.id|html>"><% artist.name|html></a>
+               <%include include/artist>
        <%/foreach>
        <%ifnull !track.remix>
-       (<% track.remix|html> by <%foreach track.remixArtists artist><%notfirst> &amp; <%/notfirst><a href="artist?id=<% artist.id|html>"><% artist.name|html></a><%/foreach>)
+       (<% track.remix|html><%foreach track.remixArtists artist><%first> by <%/first><%notfirst> &amp; <%/notfirst><%include include/artist><%/foreach>)
        <%/if>
 </h1>
 
-<dl>
-
-<dt>Styles</dt>
-<dd>
-<ul>
-<%foreach track.styles style|sort>
-<li><a href="style?id=<% style.id|html>"><% style.name|html></a></li>
+<%foreach track.parties party>
+       <div>Released at <a href="party?id=<%party.id|html>"><%party.name|html></a>.</div>
 <%/foreach>
-</ul>
-</dd>
 
-</dl>
+<%ifnull !track.properties.release/name>
+       <%ifnull !track.properties.release/pouet/id>
+               <div>Release: <a href="http://pouet.net/prod.php?which=<%track.properties.release/pouet/id|html>"><%track.properties.release/name|html></a></div>
+       <%else>
+               <div>Release: <%track.properties.release/name|html></div>
+       <%/if>
+<%/if>
+
+<%foreach track.derivatives derivative>
+
+       <h2><a href="download?id=<%derivative.id|html>"><%ifnull derivative.properties.audio/codec><%derivative.properties.file/extension.toUpperCase><%else><%derivative.properties.audio/codec.shortName|html><%/if></a></h2>
+
+       <div class="size"><%derivative.size|concise|html>B</div>
 
+       <%ifnull !derivative.properties.media/bitrate>
+               <div class="bitrate"><%derivative.properties.media/bitrate|html> kbps</div>
+       <%/if>
+
+       <%ifnull !derivative.properties.media/length>
+               <div class="length"><%derivative.properties.media/length|time></div>
+       <%/if>
+
+<%foreachelse>
+       <p>This track does not have any files.</p>
+<%/foreach>
 
 <%/if>