add artist when posting
[zzz-floof.git] / floof / templates / art / show.mako
1 <%inherit file="/base.mako" />
2 <%namespace name="comments" file="/comments/lib.mako" />
3
4 <%! from floof.model.art import Rating %>
5
6 <h1>Viewing Art</h1>
7
8 % if c.user:
9 ${h.form (h.url("art_tags", art_id=c.art.id))}
10 Add Some Tags: ${h.text('tags')}
11 ${h.submit('submit', 'Tag!')}
12 ${h.end_form()}
13
14 % for tag in c.art.tags:
15 ${h.form(h.url("art_tag", art_id=c.art.id, id=tag.id), method="delete")}
16 ${h.submit('delete', 'X')}
17 <a href="${url(controller='search', action='index', query=tag)}">${tag}</a>
18 ${h.end_form()}
19 % endfor
20
21 <h2>What do you think?</h2>
22 ${h.form (h.url("rate_art", id=c.art.id), method="put")}
23 % for score,text in sorted(Rating.options.items()):
24
25 % if c.your_score == score:
26 ${h.submit('score', text, class_="selected")}
27 % else:
28 ${h.submit('score', text)}
29 % endif
30
31 % endfor
32 ${h.end_form()}
33 % endif
34
35 <h2>Relations</h2>
36 <ul>
37 % for relation in c.art.user_relations:
38 <li>${relation.kind}: ${relation.user}
39 % endfor
40 </ul>
41
42 <h2>Add Relations</h2>
43 ${h.form (h.url("create_relation", kind="by", art_id=c.art.id))}
44 By: ${h.text('username')}
45 ${h.submit('add','Add')}
46 ${h.end_form()}
47
48
49 <img class="full" src="${c.art.get_path()}">
50
51 ${comments.comment_block(c.art.discussion.comments)}