major
minor
defect
major
minor
It should be easy to create table columns for resources (e.g., images).
To this end, there should be a data type that provides the corresponding column definition (filter, sorting, etc.).
Implementation
Two new model types, `tl.util:Resource ` and `tl.util:IconResource `, have been added. These can be used either as target types for calculated columns or calculated model attributes.
A resource can consist of an image, a label, and a tooltip; if the type `tl.util:Resource ` is used, the image and the label are displayed, whereas with the type `tl.util:IconResource `, only the image is displayed (and the label as a tooltip if none is explicitly specified).
The "Resource" type 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