Add include to render a complete artist.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 31 Jul 2012 05:20:20 +0000 (07:20 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 31 Jul 2012 05:20:20 +0000 (07:20 +0200)
src/main/resources/templates/artist
src/main/resources/templates/artists
src/main/resources/templates/include/artist [new file with mode: 0644]
src/main/resources/templates/track

index 9429468..a6efaac 100644 (file)
@@ -4,7 +4,7 @@
 <%else>
 <%include include/header title=artist.name>
 
-<h1><% artist.name|html></h1>
+<h1><%include include/artist></h1>
 
 <h2>Tracks by <% artist.name|html></h2>
 
index 6746152..a5e2147 100644 (file)
@@ -4,7 +4,7 @@
 
 <%foreach artists artist|sort>
        <%first><ul><%/first>
-       <li><a href="artist?id=<% artist.id|html>"><% artist.name|html></a></li>
+       <li><%include include/artist></li>
        <%last></ul><%/last>
 <%foreachelse>
        <p>There are no artists.</p>
diff --git a/src/main/resources/templates/include/artist b/src/main/resources/templates/include/artist
new file mode 100644 (file)
index 0000000..ecf2290
--- /dev/null
@@ -0,0 +1 @@
+<a href="artist?id=<%artist.id|html>"><% artist.name|html></a><%foreach artist.groups group|sort><%first> / <%/first><%notfirst> ^ <%/notfirst><a href="group?id=<%group.id|html>"><%group.name|html></a><%/foreach>
\ No newline at end of file
index 4b1519f..aecf4b5 100644 (file)
@@ -9,10 +9,10 @@
        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>