List derivatives on track page.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 28 Jul 2012 22:16:30 +0000 (00:16 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 28 Jul 2012 22:16:30 +0000 (00:16 +0200)
src/main/resources/templates/track

index b86bbca..7ff622b 100644 (file)
        <%/if>
 <%/if>
 
+<%foreach track.derivatives derivative>
+
+       <h2><%ifnull !derivative.properties.file/original-name><%derivative.properties.file/original-name|html><%else>Unnamed File<%/if></h2>
+
+       <%ifnull !derivative.properties.audio/codec>
+               <div class="audio-codec"><%derivative.properties.audio/codec.name|html></div>
+       <%/if>
+
+       <%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>
+
 <dl>
 
 <dt>Styles</dt>