ResourceInfoColumn
Displays basic resource information. Defaults to showing an image + name + event count (all configurable).
If a resource has no image, you can either provide an icon using iconCls in the data (you then need to specify image === false in your data) or the resource initials will be shown. If you don't want to show any avatar at all, you can set showAvatar to false for the Resource record.
Be sure to specify resourceImagePath to instruct the column where to look for the images.
If an image fails to load or if a resource lacks an image, the resource name initials will be rendered. If the resource has an eventColor specified, it will be used as the background color of the initials.
Useful configs and functions
| Member | Description |
|---|---|
| showImage | Show resource image or avatar |
| showEventCount | Show event count below the name |
| showRole | Show resource role below the name |
| showMeta | Template for extra resource info |
| autoScaleThreshold | Threshold for auto-scaling content |
See also
- ResourceModel - Resource data model
- Column - Base column class
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Specify 0 to prevent the column from adapting its content according to the used row height, or specify a threshold (row height) at which scaling should start.
Has a corresponding runtime autoScaleThreshold property.
-
Show number of events assigned to the resource below the name.
Has a corresponding runtime showEventCount property.
-
Show image. Looks for image name in fields on the resource in the following order: 'imageUrl', 'image', 'name'. Set
showImageto a field name to use a custom field. SetScheduler.resourceImagePathto specify where to load images from. If no extension found, defaults to resourceImageExtension.Has a corresponding runtime showImage property.
-
Show resource role below the name. Specify
trueto display data from therolefield, or specify a field name to read this value from.Has a corresponding runtime showRole property.
-
Use the resource name as the image name when no
imageis specified on the resource.Has a corresponding runtime useNameAsImageName property.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of ResourceInfoColumn class, or subclass thereof.
-
Specify 0 to prevent the column from adapting its content according to the used row height, or specify a threshold (row height) at which scaling should start.
Has a corresponding autoScaleThreshold config.
-
Show number of events assigned to the resource below the name.
Has a corresponding showEventCount config.
-
Show image. Looks for image name in fields on the resource in the following order: 'imageUrl', 'image', 'name'. Set
showImageto a field name to use a custom field. SetScheduler.resourceImagePathto specify where to load images from. If no extension found, defaults to resourceImageExtension.Has a corresponding showImage config.
-
A template string to render any extra information about the resource below the name
Has a corresponding showMeta config.
-
Show resource role below the name. Specify
trueto display data from therolefield, or specify a field name to read this value from.Has a corresponding showRole config.
-
Use the resource name as the image name when no
imageis specified on the resource.Has a corresponding useNameAsImageName config.
-
Identifies an object as an instance of ResourceInfoColumn class, or subclass thereof.
CSS variables
CSS variables that can be set to adjust appearance| Name | Description |
|---|---|
| --b-resource-info-column-avatar-background-color | Avatar background color |
| --b-resource-info-column-name-font-weight | Resource name font weight |
| --b-resource-info-column-role-color | Resource role color |
| --b-resource-info-column-role-font-size | Resource role font size |
| --b-resource-info-column-role-row-hover-color | Resource role color on a hovered row |