Major
Detail
Bugfix
Major
Detail
It should be possible to create table columns for resources (e.g. images).
For this purpose there should be a data type that provides the corresponding column definition (filter, sorting,...).
Implementation
2 new model types tl.util:Resource and tl.util:IconResource have been added. These can be used either as a target type for computed columns or computed model attributes.
A resource can consist of an image, a label and a tooltip; if the tl.util:Resource type is used, the image and the label will be displayed, whereas with the tl.util:IconResource type only the image will be displayed (and the label as a tooltip if none is explicitly specified).
The type "Resource" can only be used in calculated values (persistent storage in an attribute is not possible). A resource can be created using the TL script function resource():
resource($userObject, $image, $label, $tooltip, $cssClass)
Test
- TestConfiguredIconResource.script.xml
- TestResourceAttribute.script.xml