web/views/tableview.py
changeset 8089 0bce018bc7d7
parent 8088 145c0701bac6
child 8092 bc2a7c9fe266
equal deleted inserted replaced
8088:145c0701bac6 8089:0bce018bc7d7
   780         super(MainEntityColRenderer, self).__init__(addcount=addcount, **kwargs)
   780         super(MainEntityColRenderer, self).__init__(addcount=addcount, **kwargs)
   781         self.vid = vid
   781         self.vid = vid
   782 
   782 
   783     def default_header(self):
   783     def default_header(self):
   784         view = self.view
   784         view = self.view
   785         return u', '.join(self._cw.__(et+'_plural')
   785         if len(view.cw_rset) > 1:
       
   786             suffix = '_plural'
       
   787         else:
       
   788             suffix = ''
       
   789         return u', '.join(self._cw.__(et + suffix)
   786                           for et in view.cw_rset.column_types(view.cw_col or 0))
   790                           for et in view.cw_rset.column_types(view.cw_col or 0))
   787 
   791 
   788     def render_entity(self, w, entity):
   792     def render_entity(self, w, entity):
   789         entity.view(self.vid, w=w)
   793         entity.view(self.vid, w=w)
   790 
   794