Commit 1128fb4
committed
feature #6720 Allow customize entity row attributes on index page (zorn-v)
This PR was merged into the 4.x branch.
Discussion
----------
Allow customize entity row attributes on index page
In my project I need to highlight entity rows with different colors based on entity status.
Currently I need to copy all `table_body` just for add css class to row like `class="status-row status-row-{{ entity.instance.status.name|lower }}"`
With this patch I just need to add this in overrided template
```twig
{% block entity_row_attributes %}
class="status-row status-row-{{ entity.instance.status.name|lower }}"
{% endblock %}
```
PS. After updating from 4.13, currently I need to update all my custom templates with this logic as `table_body` was changed.
Commits
-------
ad6fd11 Allow customize entity row attributes on index page1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
0 commit comments