Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customize entity row attributes on index page #6720

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

zorn-v
Copy link
Contributor

@zorn-v zorn-v commented Jan 15, 2025

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

{% 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.

@javiereguiluz javiereguiluz added this to the 4.x milestone Jan 15, 2025
@javiereguiluz
Copy link
Collaborator

Thanks @zorn-v.

@javiereguiluz javiereguiluz merged commit 1128fb4 into EasyCorp:4.x Jan 18, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants