trying out resource routing. Works decently. Added lots of notes.
[zzz-floof.git] / floof / templates / art / show.mako
1 <%inherit file="/base.mako" />
2
3 <%! from floof.model.art import Rating %>
4
5 <h1>Viewing Art</h1>
6
7 % if c.user:
8 ${h.form (h.url("art_tags", art_id=c.art.id))}
9 Add Some Tags: ${h.text('tags')}
10 ${h.submit('submit', 'Tag!')}
11 ${h.end_form()}
12
13 % for tag in c.art.tags:
14 ${h.form(h.url("art_tag", art_id=c.art.id, id=tag.id), method="delete")}
15 ${h.submit('delete', 'X')}
16 <a href="${url(controller='search', action='index', query=tag)}">${tag}</a>
17 ${h.end_form()}
18 % endfor
19
20 <h2>What do you think?</h2>
21 ${h.form (h.url("rate_art", id=c.art.id), method="put")}
22 % for score,text in sorted(Rating.options.items()):
23
24 % if c.your_score == score:
25 ${h.submit('score', text, class_="selected")}
26 % else:
27 ${h.submit('score', text)}
28 % endif
29
30 % endfor
31 ${h.end_form()}
32 % endif
33
34 <img class="full" src="${c.art.get_path()}">
35