Add functions to manage groups of an artist.
[demoscenemusic.git] / src / main / resources / templates / admin.edit-artist
1 <%include include/header title=="Edit Artist">
2
3 <h1>Edit Artist</h1>
4
5 <form method="post" accept-charset="utf-8">
6
7         <label>Name: <input type="text" name="name" value="<% artist.name|html>"></label>
8         <button type="submit">Edit Artist</button>
9
10         <%foreach artist.properties property>
11
12                 <label>
13                         Property: <%property.key|html>
14                         <input type="text" name="value.<%property.key|html>" value="<%property.value|html>">
15                         <input type="checkbox" name="delete.<%property.key|html>">Delete
16                 </label>
17
18         <%/foreach>
19
20         <label>
21                 New Property:
22                 <input type="text" name="property" value="">
23                 <input type="text" name="value" value="">
24                 <button type="submit" name="new-property" value="true">Add Property</button>
25         </label>
26
27 </form>
28
29 <h2>Groups</h2>
30
31 <%foreach artist.groups group>
32
33         <form action="admin.edit-artist" method="post" accept-charset="utf-8">
34
35                 <input type="hidden" name="id" value="<%artist.id|html>"/>
36                 <input type="hidden" name="group" value="<%group.id|html>"/>
37
38                 <div>
39                         <%group.name|html> <a href="admin.edit-group?id=<%group.id|html>">edit</a>
40                 </div>
41                 <button type="submit" name="delete-group" value="true">Delete Group</button>
42
43         </form>
44
45 <%foreachelse>
46         <p>This artists does not belong to any groups.</p>
47 <%/foreach>
48
49 <h3>Add a Group</h3>
50
51 <form action="admin.edit-artist" method="post" accept-charset="utf-8">
52
53         <input type="hidden" name="id" value="<%artist.id|html>"/>
54
55         <div>
56                 Add Group:
57                 <select name="group">
58                         <%foreach dataManager.allGroups group>
59                                 <option value="<%group.id|html>"><%group.name|html></option>
60                         <%/foreach>
61                 </select>
62         </div>
63         <button type="submit" name="add-group" value="true">Add Group</button>
64
65 </form>
66
67 <h2>Tracks</h2>
68
69 <%foreach artist.tracks track>
70         <%first>
71                 <ul>
72         <%/first>
73         <li><%track.name|html> <a href="admin.edit-track?id=<%track.id|html>">edit</a></li>
74         <%last>
75                 </ul>
76         <%/last>
77 <%foreachelse>
78         <p>This artist does not yet have any tracks.</p>
79 <%/foreach>
80
81 <h2>Add a New Track</h2>
82
83 <%include include/admin.add-track>
84
85 <%include include/footer>