Use include to display artist.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 31 Jul 2012 05:28:32 +0000 (07:28 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 31 Jul 2012 05:29:19 +0000 (07:29 +0200)
src/main/resources/templates/admin.edit-group
src/main/resources/templates/admin.edit-track
src/main/resources/templates/admin.list-artists
src/main/resources/templates/include/admin.artist [new file with mode: 0644]

index af2d604..545526d 100644 (file)
@@ -34,7 +34,7 @@
        <%first>
                <ul>
        <%/first>
-       <li><%artist.name|html> <a href="admin.edit-artist?id=<%artist.id|html>">edit</a></li>
+       <li><%include include/admin.artist></li>
        <%last>
                </ul>
        <%/last>
index bfc3355..f9ee353 100644 (file)
@@ -41,7 +41,7 @@
 
 <%foreach track.artists artist>
 
-       <div>Artist: <a href="admin.edit-artist?id=<%artist.id|html>"><%artist.name|html></a></div>
+       <div>Artist: <%include include/admin.artist></div>
 
        <form action="admin.edit-track" method="post" accept-charset="utf-8">
                <input type="hidden" name="id" value="<%track.id|html>"/>
index a418166..6602e94 100644 (file)
@@ -4,7 +4,7 @@
 
 <%foreach artists artist>
        <%first><ul><%/first>
-       <li><% artist.name|html><%foreach artist.groups group><%first> / <%/first><%notfirst> ^ <%/notfirst><a href="group?id=<%group.id|html>"><%group.name|html></a><%/foreach> <a href="admin.edit-artist?id=<% artist.id|html>">edit</a></li>
+       <li><%include include/admin.artist></li>
        <%last></ul><%/last>
 <%/foreach>
 
diff --git a/src/main/resources/templates/include/admin.artist b/src/main/resources/templates/include/admin.artist
new file mode 100644 (file)
index 0000000..65ed1eb
--- /dev/null
@@ -0,0 +1 @@
+<a href="admin.edit-artist?id=<%artist.id|html>"><% artist.name|html></a><%foreach artist.groups group|sort><%first> / <%/first><%notfirst> ^ <%/notfirst><a href="admin.edit-group?id=<%group.id|html>"><%group.name|html></a><%/foreach>
\ No newline at end of file