I am looking for a way to make HABTM relations on the website more beautiful. By default, these are displayed in a long list. To select several at once, one has to hold Ctrl.
I could imagine something like a drag and drop system with two tables next to each other. Everything in the right table is considered selected. https://i.stack.imgur.com/vRWYE.jpg
Unfortunately, I'm not sure how to do it well. My only approach so far would be to automatically create a table from cakephp and create a second empty table.
If the page is opened, a javascript would hide everything in the cakephp table that is not selected (that would be the right table). In the still empty table the script would then write everything that was hidden from the other.
If you now click on one of the objects in one of the table, javascript would hide it in this table and show it in the other and (de-)select it.
This implementation sounds rather difficult and error-prone to me. Do you have any good ideas what I could do here? Possibly a plugin or something in the direction? Unfortunately I could not find anything about this in my search. But I can not imagine that no one has dealt with the issue, since the HABTM representation of cakephp is not that good.