Merged add_tags and lib.search into lib.tags.
[zzz-floof.git] / floof / templates / users / view.mako
index f9a9329..eb24b2d 100644 (file)
@@ -3,7 +3,26 @@
 
 <p>This is the userpage for ${c.this_user.name}.</p>
 
+<%! from floof.model.users import UserRelationshipTypes %>
+% if c.this_user == c.user:
+## Nothing
+<% pass %>\
+% else:
+${h.form(url(controller='user_settings', action='rel_toggle', name=c.user.name.lower()), method='POST')}
+<p>
+    <input type="hidden" name="target_user" value="${c.this_user.id}">
+    <input type="hidden" name="type" value="${UserRelationshipTypes.IS_WATCHING}">
+    % if UserRelationshipTypes.IS_WATCHING in c.relationships:
+    <input type="hidden" name="add_remove" value="remove">
+    <input type="submit" value="Unwatch">
+    % else:
+    <input type="hidden" name="add_remove" value="add">
+    <input type="submit" value="Watch">
+    % endif
+% endif
+
+<%! from floof.lib.search import parse %>
 % for gallery in c.this_user.primary_page.galleries:
 <h2>${gallery.string}</h2>
-${macros.thumbs(gallery.search.results)}
-% endfor
\ No newline at end of file
+${macros.thumbs(parse(gallery.tags.string))}
+% endfor