src/pyams_content/shared/site/zmi/container.py
changeset 1393 9479901b53a5
parent 1384 cdf63a1c7dc9
child 1429 9b93fdd5ba30
equal deleted inserted replaced
1392:1d8fd5a53ced 1393:9479901b53a5
   452                     state=self.table.rows_state or ('minus' if item in lineage(self.context) else 'plus'))
   452                     state=self.table.rows_state or ('minus' if item in lineage(self.context) else 'plus'))
   453                         if ISiteContainer.providedBy(item) else '',
   453                         if ISiteContainer.providedBy(item) else '',
   454                 title=name or super(SiteContainerTreeNameColumn, self).renderCell(item))
   454                 title=name or super(SiteContainerTreeNameColumn, self).renderCell(item))
   455 
   455 
   456 
   456 
   457 @adapter_config(name='content-type', context=(IBaseSiteItem, IPyAMSLayer, ISiteTreeTable), provides=IColumn)
   457 @adapter_config(name='content-type', context=(IBaseSiteItem, IPyAMSLayer, ISiteTreeTable),
       
   458                 provides=IColumn)
   458 class SiteContainerContentTypeColumn(I18nColumn, GetAttrColumn):
   459 class SiteContainerContentTypeColumn(I18nColumn, GetAttrColumn):
   459     """Site container content type column"""
   460     """Site container content type column"""
   460 
   461 
   461     _header = _("Content")
   462     _header = _("Content")
   462 
   463 
   464 
   465 
   465     def getValue(self, obj):
   466     def getValue(self, obj):
   466         return self.request.localizer.translate(obj.content_name)
   467         return self.request.localizer.translate(obj.content_name)
   467 
   468 
   468 
   469 
   469 @adapter_config(name='sequence', context=(IBaseSiteItem, IPyAMSLayer, ISiteTreeTable), provides=IColumn)
   470 @adapter_config(name='sequence', context=(IBaseSiteItem, IPyAMSLayer, ISiteTreeTable),
       
   471                 provides=IColumn)
   470 class SiteContainerTreeSequenceColumn(SharedToolDashboardSequenceColumn):
   472 class SiteContainerTreeSequenceColumn(SharedToolDashboardSequenceColumn):
   471     """Site container tree OID column"""
   473     """Site container tree OID column"""
   472 
   474 
   473     def getValue(self, obj):
   475     def getValue(self, obj):
   474         target = obj.get_target() if IContentLink.providedBy(obj) else obj
   476         target = obj.get_target() if IContentLink.providedBy(obj) else obj