web/views/bookmark.py
branchtls-sprint
changeset 1321 c5655237f08a
parent 1153 6a7636b32a97
child 1498 2c6eec0b46b9
equal deleted inserted replaced
1320:c85f4d8eff8b 1321:c5655237f08a
     9 from logilab.mtconverter import html_escape
     9 from logilab.mtconverter import html_escape
    10 
    10 
    11 from cubicweb import Unauthorized
    11 from cubicweb import Unauthorized
    12 from cubicweb.selectors import implements
    12 from cubicweb.selectors import implements
    13 from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem
    13 from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem
    14 from cubicweb.web.action import Action
    14 from cubicweb.web import action, formwidgets
    15 from cubicweb.web.box import UserRQLBoxTemplate
    15 from cubicweb.web.box import UserRQLBoxTemplate
    16 from cubicweb.web.views.baseviews import PrimaryView
    16 from cubicweb.web.views.baseviews import PrimaryView
    17 from cubicweb.web.views.editforms import AutomaticEntityForm
    17 from cubicweb.web.views.editforms import AutomaticEntityForm
    18 
    18 
    19 AutomaticEntityForm.rcategories.set_rtag('primary', 'path', 'subject', 'Bookmark')
    19 AutomaticEntityForm.rcategories.set_rtag('primary', 'path', 'subject', 'Bookmark')
    20 AutomaticEntityForm.rwidgets.set_rtag('StringWidget', 'path', 'subject', 'Bookmark')
    20 AutomaticEntityForm.rwidgets.set_rtag(formwidgets.TextInput, 'path', 'subject', 'Bookmark')
    21 
    21 
    22 
    22 
    23 class FollowAction(Action):
    23 class FollowAction(action.Action):
    24     id = 'follow'
    24     id = 'follow'
    25     __select__ = implements('Bookmark')
    25     __select__ = implements('Bookmark')
    26 
    26 
    27     title = _('follow')
    27     title = _('follow')
    28     category = 'mainactions'
    28     category = 'mainactions'