web/views/bookmark.py
changeset 3720 5376aaadd16b
parent 3451 6b46d73823f5
parent 3718 ae49707df724
child 4045 f4a52abb6f4f
equal deleted inserted replaced
3678:29f74716fd70 3720:5376aaadd16b
     8 __docformat__ = "restructuredtext en"
     8 __docformat__ = "restructuredtext en"
     9 
     9 
    10 from logilab.mtconverter import xml_escape
    10 from logilab.mtconverter import xml_escape
    11 
    11 
    12 from cubicweb import Unauthorized
    12 from cubicweb import Unauthorized
    13 from cubicweb.selectors import implements
    13 from cubicweb.selectors import implements, one_line_rset
    14 from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem
    14 from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem
    15 from cubicweb.web import action, box, uicfg
    15 from cubicweb.web import action, box, uicfg
    16 from cubicweb.web.views import primary
    16 from cubicweb.web.views import primary
    17 
    17 
    18 _abaa = uicfg.actionbox_appearsin_addmenu
    18 _abaa = uicfg.actionbox_appearsin_addmenu
    19 _abaa.tag_subject_of(('*', 'bookmarked_by', '*'), False)
    19 _abaa.tag_subject_of(('*', 'bookmarked_by', '*'), False)
    20 _abaa.tag_object_of(('*', 'bookmarked_by', '*'), False)
    20 _abaa.tag_object_of(('*', 'bookmarked_by', '*'), False)
    21 
    21 
    22 class FollowAction(action.Action):
    22 class FollowAction(action.Action):
    23     __regid__ = 'follow'
    23     __regid__ = 'follow'
    24     __select__ = implements('Bookmark')
    24     __select__ = one_line_rset() & implements('Bookmark')
    25 
    25 
    26     title = _('follow')
    26     title = _('follow')
    27     category = 'mainactions'
    27     category = 'mainactions'
    28 
    28 
    29     def url(self):
    29     def url(self):