Spruced up UI a little bit.
[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 import Rating %>
5
6 <h1>Viewing Art</h1>
7
8 <div>
9     <img class="full" src="${h.storage_url('art/medium', c.art.hash)}">
10 </div>
11
12 <h2>Tags</h2>
13 <ul>
14 ## Relations
15 % for label, relations in (('Artist', c.art.artists), \
16                            ('Recipient', c.art.recipients), \
17                            ('Participant', c.art.participants)):
18     % for user in relations:
19     <li>${label}: <a href="${h.url('user_page', name=user.name)}">${user.name}</a>
20     % endfor
21 % endfor
22
23 ## Regular tags
24 % for tag in c.art.tags:
25 ${h.form(h.url("art_tag", art_id=c.art.id, id=tag.id), method="delete")}
26 ${h.HTML.input(type='image', src='/icons/overlay/tag--minus.png', alt='[Remove]')}
27 <a href="${url(controller='search', action='index', query=tag)}">${tag}</a>
28 ${h.end_form()}
29 % endfor
30
31 % if c.user:
32 ${h.form(h.url("art_tags", art_id=c.art.id))}
33 <p>
34     ${h.image('/icons/overlay/tag--plus.png', '')}
35     ${h.text('tags')} ${h.submit(None, 'Add tags!')}
36 </p>
37 ${h.end_form()}
38 % endif
39 </ul>
40
41
42 % if c.user:
43 <h2>What do you think?</h2>
44 ${h.form (h.url("rate_art", id=c.art.id), method="put")}
45 % for score,text in sorted(Rating.options.items()):
46
47 % if c.your_score == score:
48 ${h.submit('score', text, class_="selected")}
49 % else:
50 ${h.submit('score', text)}
51 % endif
52
53 % endfor
54 ${h.end_form()}
55 % endif
56
57 ${comments.comment_block(c.art.discussion.comments)}