EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

Allow to display Bootstrap modals in side menu and user menu

Open fdiedler opened this issue 3 years ago • 4 comments

Feature that refers to #5078

This PR allows to display modals in the main menu and the user menu at the top-right of the page.

Hope you will appreciate this feature :)

ea_menu_1 ea_menu_2

fdiedler avatar Mar 26 '22 21:03 fdiedler

Thanks for this contribution.

Maybe I didn't look into the code in the right way, but I think there's something missing here. We have a menu item that opens a modal ... but where do you define the modal contents or the URL loaded dynamically via JS to render the modal contents?

javiereguiluz avatar Mar 29 '22 18:03 javiereguiluz

@javiereguiluz The modal contents is defined in any user twig template that overrides the layout.html.twig. In other words, it is the responsibility of the user to define the modal where he wants.

**** Update *****

I added a parameter in the linkToModal function that allows to set a twig template path that defines the modal contents

fdiedler avatar Mar 29 '22 21:03 fdiedler

@javiereguiluz Merge conflict fixed :)

fdiedler avatar Apr 10 '22 09:04 fdiedler

@javiereguiluz If you want to merge this, merge conflict fixed (due to menu translation labels)

fdiedler avatar May 21 '22 16:05 fdiedler