merged with mine
[zzz-floof.git] / floof / templates / art / show.mako
index 88e3ec9..2ac5305 100644 (file)
@@ -1,5 +1,7 @@
 <%inherit file="/base.mako" />
 
+<%! from floof.model.art import Rating %>
+
 <h1>View Art</h1>
 
 ${h.form (h.url_for (controller='art', action='tag', id=c.art.id), multipart=True)}
@@ -8,9 +10,18 @@ ${h.submit('submit', 'Tag!')}
 ${h.end_form()}
 
 % for tag in c.art.tags:
-${tag}
+<a href="${url(controller='tag', action='delete', id=tag.id)}">x</a>
+<a href="${url(controller='search', action='index', query=tag)}">${tag}</a>
 % endfor
 
+What do you think?
+% for score,text in sorted(Rating.options.items()):
+<a href="${h.url_for(controller='art', action='rate', id=c.art.id)}?score=${score}" \
+% if c.your_score == score:
+class="selected" \
+% endif
+>${text}</a> 
+% endfor
 
 <img class="full" src="${c.art.get_path()}">