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

Is there a way to add a column with custom HTML to a table? #54

Open
GregShiner opened this issue Jul 17, 2024 · 0 comments
Open

Is there a way to add a column with custom HTML to a table? #54

GregShiner opened this issue Jul 17, 2024 · 0 comments

Comments

@GregShiner
Copy link

GregShiner commented Jul 17, 2024

I've been digging for a while and I can't find anything that would do this. I would love to extend the functionality a bit by adding a few things like additional buttons on each row. Or by making certain elements clickable to have different actions. If this doesn't exist already, I think this would make a pretty great feature. There's already great ways of overriding the different role actions, but I am still limited to only those roles. Maybe a way to add additional roles? It would be a big ask, but maybe reworking neapolitan.views.Role from an enum.Enum to an interface or abstract class would allow users to create additional roles. Maybe the row could be a partial template that can be overridden with the manage.py mktemplate command. I think that would be my preferred solution.

E: I suppose I could override the whole Role class and set the CRUDView.role property to it. Also having Role be an abstract class would make the process quite a bit easier so I dont have to copy all of the match statements. Still though, it would be really cool if we could override the row partial template as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant