diff --git a/tailbone/newgrids/alchemy.py b/tailbone/newgrids/alchemy.py index a3d2a9f0..99d0aec6 100644 --- a/tailbone/newgrids/alchemy.py +++ b/tailbone/newgrids/alchemy.py @@ -184,7 +184,11 @@ class AlchemyGrid(Grid): Returns an iterator for all currently-visible columns. """ for field in self._fa_grid.render_fields.itervalues(): - column = GridColumn(field.key, label=field.label(), + if getattr(field, 'label_literal', False): + label = field.label_text + else: + label = field.label() + column = GridColumn(field.key, label=label, title=getattr(field, '_column_header_title', None)) column.field = field yield column diff --git a/tailbone/newgrids/core.py b/tailbone/newgrids/core.py index 88382f50..58ed588b 100644 --- a/tailbone/newgrids/core.py +++ b/tailbone/newgrids/core.py @@ -588,6 +588,7 @@ class Grid(object): kwargs['c'] = tags.link_to(column.label, '#', title=column.title) elif column.title: kwargs['c'] = HTML.tag('span', title=column.title, c=column.label) + kwargs['class_'] = '{} {}'.format(kwargs.get('class_', ''), column.key) return HTML.tag('th', **kwargs) @property