web/views/bookmark.py
branchtls-sprint
changeset 1498 2c6eec0b46b9
parent 1321 c5655237f08a
child 1533 bcd4bfff658b
--- a/web/views/bookmark.py	Tue Apr 28 10:11:08 2009 +0200
+++ b/web/views/bookmark.py	Tue Apr 28 11:22:31 2009 +0200
@@ -11,13 +11,11 @@
 from cubicweb import Unauthorized
 from cubicweb.selectors import implements
 from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem
-from cubicweb.web import action, formwidgets
-from cubicweb.web.box import UserRQLBoxTemplate
+from cubicweb.web import uicfg, action, box, formwidgets
 from cubicweb.web.views.baseviews import PrimaryView
-from cubicweb.web.views.editforms import AutomaticEntityForm
 
-AutomaticEntityForm.rcategories.set_rtag('primary', 'path', 'subject', 'Bookmark')
-AutomaticEntityForm.rwidgets.set_rtag(formwidgets.TextInput, 'path', 'subject', 'Bookmark')
+uicfg.rcategories.set_rtag('primary', 'path', 'subject', 'Bookmark')
+uicfg.rwidgets.set_rtag(formwidgets.TextInput, 'path', 'subject', 'Bookmark')
 
 
 class FollowAction(action.Action):
@@ -26,14 +24,14 @@
 
     title = _('follow')
     category = 'mainactions'
-    
+
     def url(self):
         return self.rset.get_entity(self.row or 0, self.col or 0).actual_url()
 
 
 class BookmarkPrimaryView(PrimaryView):
     __select__ = implements('Bookmark')
-        
+
     def cell_call(self, row, col):
         """the primary view for bookmark entity"""
         entity = self.complete_entity(row, col)
@@ -49,7 +47,7 @@
         self.w(u'</div>')
 
 
-class BookmarksBox(UserRQLBoxTemplate):
+class BookmarksBox(box.UserRQLBoxTemplate):
     """display a box containing all user's bookmarks"""
     id = 'bookmarks_box'
     order = 40
@@ -59,8 +57,8 @@
            'U eid %(x)s')
     etype = 'Bookmark'
     rtype = 'bookmarked_by'
-    
-    
+
+
     def call(self, **kwargs):
         req = self.req
         ueid = req.user.eid