web/views/isioc.py
changeset 3377 dd9d292b6a6d
parent 2312 af4d8f75c5db
child 3451 6b46d73823f5
equal deleted inserted replaced
3376:f5c69485381f 3377:dd9d292b6a6d
    12 from cubicweb.view import EntityView
    12 from cubicweb.view import EntityView
    13 from cubicweb.selectors import implements
    13 from cubicweb.selectors import implements
    14 from cubicweb.interfaces import ISiocItem, ISiocContainer
    14 from cubicweb.interfaces import ISiocItem, ISiocContainer
    15 
    15 
    16 class SIOCView(EntityView):
    16 class SIOCView(EntityView):
    17     id = 'sioc'
    17     __regid__ = 'sioc'
    18     __select__ = EntityView.__select__ & implements(ISiocItem, ISiocContainer)
    18     __select__ = EntityView.__select__ & implements(ISiocItem, ISiocContainer)
    19     title = _('sioc')
    19     title = _('sioc')
    20     templatable = False
    20     templatable = False
    21     content_type = 'text/xml'
    21     content_type = 'text/xml'
    22 
    22 
    36 
    36 
    37     def cell_call(self, row, col):
    37     def cell_call(self, row, col):
    38         self.wview('sioc_element', self.rset, row=row, col=col)
    38         self.wview('sioc_element', self.rset, row=row, col=col)
    39 
    39 
    40 class SIOCContainerView(EntityView):
    40 class SIOCContainerView(EntityView):
    41     id = 'sioc_element'
    41     __regid__ = 'sioc_element'
    42     __select__ = EntityView.__select__ & implements(ISiocContainer)
    42     __select__ = EntityView.__select__ & implements(ISiocContainer)
    43     templatable = False
    43     templatable = False
    44     content_type = 'text/xml'
    44     content_type = 'text/xml'
    45 
    45 
    46     def cell_call(self, row, col):
    46     def cell_call(self, row, col):
    57         self.w(u'<!-- FIXME : here be items -->')#entity.isioc_items()
    57         self.w(u'<!-- FIXME : here be items -->')#entity.isioc_items()
    58         self.w(u'</sioc:%s>\n' % sioct)
    58         self.w(u'</sioc:%s>\n' % sioct)
    59 
    59 
    60 
    60 
    61 class SIOCItemView(EntityView):
    61 class SIOCItemView(EntityView):
    62     id = 'sioc_element'
    62     __regid__ = 'sioc_element'
    63     __select__ = EntityView.__select__ & implements(ISiocItem)
    63     __select__ = EntityView.__select__ & implements(ISiocItem)
    64     templatable = False
    64     templatable = False
    65     content_type = 'text/xml'
    65     content_type = 'text/xml'
    66 
    66 
    67     def cell_call(self, row, col):
    67     def cell_call(self, row, col):