Use includes for displaying track information in non-admin mode. master
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 1 Aug 2012 05:03:16 +0000 (07:03 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 1 Aug 2012 05:03:16 +0000 (07:03 +0200)
src/main/resources/templates/artist
src/main/resources/templates/include/derivative [new file with mode: 0644]
src/main/resources/templates/include/track [new file with mode: 0644]
src/main/resources/templates/party

index e04ac03..9fc0a17 100644 (file)
@@ -10,7 +10,7 @@
 
 <%foreach artist.tracks track|sort>
 <%first><ul><%/first>
-<li><a href="track?id=<%track.id|html>"><%track.name|html></a><%foreach track.artists trackArtist|remove value=artist><%first> (together with <%/first><%notfirst>,<%last> and<%/last> <%/notfirst><%include include/artist artist=trackArtist><%last>)<%/last><%/foreach><%foreach track.derivatives derivative><%first> (<%/first><%notfirst>, <%/notfirst><%derivative.properties.audio/codec.shortName|html><%last>)<%/last><%/foreach></li>
+<li><%include include/track></li>
 <%last></ul><%/last>
 <%foreachelse>
 <p>This artist does not have any tracks.</p>
diff --git a/src/main/resources/templates/include/derivative b/src/main/resources/templates/include/derivative
new file mode 100644 (file)
index 0000000..f2ebcf3
--- /dev/null
@@ -0,0 +1 @@
+<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>
\ No newline at end of file
diff --git a/src/main/resources/templates/include/track b/src/main/resources/templates/include/track
new file mode 100644 (file)
index 0000000..edff155
--- /dev/null
@@ -0,0 +1 @@
+<a href="track?id=<%track.id|html>"><%track.name|html></a><%ifnull !track.remix> (<%track.remix|html><%foreach track.remixArtists artist><%first> by <%/first><%notfirst> &amp; <%/notfirst><%include include/artist><%/foreach>)<%/if><%foreach track.artists artist><%first> by <%/first><%notfirst> &amp; <%/notfirst><%include include/artist><%/foreach><%foreach track.derivatives derivative><%first> (<%/first><%notfirst>, <%/notfirst><%include include/derivative><%last>)<%/last><%/foreach>
\ No newline at end of file
index 196d992..35dcd43 100644 (file)
@@ -12,7 +12,7 @@
 
 <%foreach party.releases track|sort>
 <%first><ul><%/first>
-<li><a href="track?id=<%track.id|html>"><%track.name|html></a><%foreach track.artists artist><%first> by <%/first><%notfirst> &amp; <%/notfirst><%include include/artist><%/foreach><%foreach track.derivatives derivative><%first> (<%/first><%notfirst>, <%/notfirst><%derivative.properties.audio/codec.shortName|html><%last>)<%/last><%/foreach></li>
+<li><%include include/track></li>
 <%last></ul><%/last>
 <%foreachelse>
 <p>This party does not have any releases.</p>