Beispiel #1
0
 def table(self):
     """ Properties of table are defined here"""
     columnList = list(self.columns)
     containerIsOrderd = IOrderedContainer.providedBy(self.context)
     if containerIsOrderd:
         getterC = GetterColumn(title=_('Pos'), getter=getPosition)
         #directlyProvides(getterC, ISortableColumn)
         columnList.insert(self.pos_column_index, getterC)
         #directlyProvides(columnList[3], ISortableColumn)
         formatter = StandaloneFullFormatter(self.context,
                                             self.request,
                                             self.objs(),
                                             columns=columnList,
                                             sort_on=((_('Pos'), False), ))
     else:
         for i in self.sort_columns:
             directlyProvides(columnList[i], ISortableColumn)
         #formatter = StandaloneFullFormatter(
         #self.context, self.request, self.objs(),
         #columns=columnList, sort_on=((_('Title'), False),))
         formatter = StandaloneFullFormatter(self.context,
                                             self.request,
                                             self.objs(),
                                             columns=columnList)
     formatter.cssClasses['table'] = 'listing'
     return formatter()
Beispiel #2
0
 def table(self):
     """ Properties of table are defined here"""
     formatter = StandaloneFullFormatter(
         self.context, self.request, self.objs(),
         columns=self.columns)
     formatter.cssClasses['table'] = 'listing'
     return formatter()
Beispiel #3
0
 def table(self):
     """ Properties of table are defined here"""
     directlyProvides(self.columns[1], ISortableColumn)
     formatter = StandaloneFullFormatter(
         self.context, self.request, self.objs(),
         columns=self.columns, sort_on=((_('Title'), False),))
     formatter.cssClasses['table'] = 'listing'
     return formatter()