diff -r 66ff0b2f7d03 -r 99f5852f8604 web/views/bookmark.py --- a/web/views/bookmark.py Mon Feb 16 16:24:24 2009 +0100 +++ b/web/views/bookmark.py Mon Feb 16 18:26:13 2009 +0100 @@ -9,13 +9,26 @@ from logilab.mtconverter import html_escape from cubicweb import Unauthorized +from cubicweb.common.selectors import implements from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem +from cubicweb.web.action import Action from cubicweb.web.box import UserRQLBoxTemplate from cubicweb.web.views.baseviews import PrimaryView +class FollowAction(Action): + id = 'follow' + __selectors__ = (implements('Bookmark'),) + + 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): - accepts = ('Bookmark',) + __selectors__ = (implements('Bookmark'),) def cell_call(self, row, col): """the primary view for bookmark entity"""