move bookmark related uicfg stuff into bookmark specific module, use the EditableURLWidget widget for Bookmark.path
--- a/web/views/autoform.py Thu Jan 21 10:47:01 2010 +0100
+++ b/web/views/autoform.py Thu Jan 21 10:48:00 2010 +0100
@@ -327,9 +327,6 @@
_afs.tag_attribute(('CWUser', 'last_login_time'), 'main', 'metadata')
_afs.tag_subject_of(('CWUser', 'in_group', '*'), 'main', 'attributes')
_afs.tag_subject_of(('CWUser', 'in_group', '*'), 'muledit', 'attributes')
-_afs.tag_object_of(('*', 'bookmarked_by', 'CWUser'), 'main', 'metadata')
-_afs.tag_attribute(('Bookmark', 'path'), 'main', 'attributes')
-_afs.tag_attribute(('Bookmark', 'path'), 'muledit', 'attributes')
_afs.tag_subject_of(('*', 'primary_email', '*'), 'main', 'relations')
_afs.tag_subject_of(('*', 'use_email', '*'), 'main', 'inlined')
_afs.tag_subject_of(('CWRelation', 'relation_type', '*'), 'main', 'inlined')
@@ -338,8 +335,6 @@
uicfg.autoform_field_kwargs.tag_attribute(('RQLExpression', 'expression'),
{'widget': fwdgs.TextInput})
-uicfg.autoform_field_kwargs.tag_attribute(('Bookmark', 'path'),
- {'widget': fwdgs.TextInput})
uicfg.autoform_field_kwargs.tag_subject_of(('TrInfo', 'wf_info_for', '*'),
{'widget': fwdgs.HiddenInput})
--- a/web/views/bookmark.py Thu Jan 21 10:47:01 2010 +0100
+++ b/web/views/bookmark.py Thu Jan 21 10:48:00 2010 +0100
@@ -12,13 +12,22 @@
from cubicweb import Unauthorized
from cubicweb.selectors import implements, one_line_rset
from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem
-from cubicweb.web import action, box, uicfg
+from cubicweb.web import action, box, uicfg, formwidgets as fw
from cubicweb.web.views import primary
_abaa = uicfg.actionbox_appearsin_addmenu
_abaa.tag_subject_of(('*', 'bookmarked_by', '*'), False)
_abaa.tag_object_of(('*', 'bookmarked_by', '*'), False)
+_afs = uicfg.autoform_section
+_afs.tag_object_of(('*', 'bookmarked_by', 'CWUser'), 'main', 'metadata')
+_afs.tag_attribute(('Bookmark', 'path'), 'main', 'attributes')
+_afs.tag_attribute(('Bookmark', 'path'), 'muledit', 'attributes')
+
+_affk = uicfg.autoform_field_kwargs
+_affk.tag_attribute(('Bookmark', 'path'), {'widget': fw.URLUnescapedInput})
+
+
class FollowAction(action.Action):
__regid__ = 'follow'
__select__ = one_line_rset() & implements('Bookmark')