# HG changeset patch # User Sylvain Thénault # Date 1264067280 -3600 # Node ID 01e5efc0d823ffe50d7c2fa4b03efc47430a4812 # Parent 3d731478d9a8810c4a57ddcedae963762d985518 move bookmark related uicfg stuff into bookmark specific module, use the EditableURLWidget widget for Bookmark.path diff -r 3d731478d9a8 -r 01e5efc0d823 web/views/autoform.py --- 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}) diff -r 3d731478d9a8 -r 01e5efc0d823 web/views/bookmark.py --- 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')