web/views/bookmark.py
branchtls-sprint
changeset 1639 375c857aa0f5
parent 1533 bcd4bfff658b
child 1721 694f6a50e138
equal deleted inserted replaced
1638:6f9003a32ecc 1639:375c857aa0f5
    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 import uicfg, action, box, formwidgets
    14 from cubicweb.web import uicfg, action, box, formwidgets
    15 from cubicweb.web.views.baseviews import PrimaryView
    15 from cubicweb.web.views import primary
    16 
    16 
    17 uicfg.rcategories.tag_relation('primary', ('Bookmark', 'path', '*'), 'subject')
    17 uicfg.rcategories.tag_relation('primary', ('Bookmark', 'path', '*'), 'subject')
    18 uicfg.rwidgets.tag_relation(formwidgets.TextInput, ('Bookmark', 'path', '*'), 'subject')
    18 uicfg.rwidgets.tag_relation(formwidgets.TextInput, ('Bookmark', 'path', '*'), 'subject')
    19 
    19 
    20 
    20 
    27 
    27 
    28     def url(self):
    28     def url(self):
    29         return self.rset.get_entity(self.row or 0, self.col or 0).actual_url()
    29         return self.rset.get_entity(self.row or 0, self.col or 0).actual_url()
    30 
    30 
    31 
    31 
    32 class BookmarkPrimaryView(PrimaryView):
    32 class BookmarkPrimaryView(primary.PrimaryView):
    33     __select__ = implements('Bookmark')
    33     __select__ = implements('Bookmark')
    34 
    34 
    35     def cell_call(self, row, col):
    35     def cell_call(self, row, col):
    36         """the primary view for bookmark entity"""
    36         """the primary view for bookmark entity"""
    37         entity = self.complete_entity(row, col)
    37         entity = self.complete_entity(row, col)