709 view identifier using the `vid` argument. |
709 view identifier using the `vid` argument. |
710 |
710 |
711 If header not specified, it would be built using entity types in the main |
711 If header not specified, it would be built using entity types in the main |
712 column. |
712 column. |
713 """ |
713 """ |
714 def __init__(self, vid='incontext', **kwargs): |
714 def __init__(self, vid='incontext', addcount=True, **kwargs): |
715 kwargs.setdefault('renderfunc', lambda w, x: x.view(vid, w=w)) |
715 kwargs.setdefault('renderfunc', lambda w, x: x.view(vid, w=w)) |
716 kwargs.setdefault('sortfunc', lambda x: x.sortvalue()) |
716 kwargs.setdefault('sortfunc', lambda x: x.sortvalue()) |
717 super(MainEntityColRenderer, self).__init__(**kwargs) |
717 super(MainEntityColRenderer, self).__init__(addcount=addcount, **kwargs) |
718 |
718 |
719 def default_header(self): |
719 def default_header(self): |
720 view = self.view |
720 view = self.view |
721 return u', '.join(self._cw.__(et+'_plural') |
721 return u', '.join(self._cw.__(et+'_plural') |
722 for et in view.cw_rset.column_types(view.cw_col or 0)) |
722 for et in view.cw_rset.column_types(view.cw_col or 0)) |