Closed (fixed)
Project:
Entityqueue
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Feb 2012 at 15:24 UTC
Updated:
18 Dec 2013 at 01:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
JohnnyX commentedI'm searching for a nice UI for og admins to add/ remove users to (own) groups. For example a widget which show own organic groups to add/ remove users at users profile/ info?
The way group -> group tab -> add members is to long and doesn't looks good...
Could it be done with entityqueue module?
Comment #2
barrapontoDoes it sound like a good idea to leverage Draggable Views?
Comment #3
jojonaloha commentedAttached is an initial patch that creates a new widget called entityqueue_dragtable. It displays a draggable table with the entity labels and links to remove items, along with an entityreference field to add additional items to the queue.
There are a couple things that still need work or I don't quite like yet about this implementation:
Also, should the patch also contain an update script to update all existing fields to this new widget? I noticed even though the field is locked when you try to edit it, you can still change the widget, so that makes me wonder if we should update to the new widget, but only if the widget hasn't been changed.
Comment #4
amateescu commentedThe first item from your "don't like" list is essential :)
That's why this issue is called "port the widget to Entity reference", not to *Entityqueue*. The idea was that this widget should be a generic one that can be used by all entity reference fields. This basically means that the "remove field item" menu callback doesn't need to be tied to entityqueue and it just needs a generic path.
About the second point, yep, that's also an important part of the "experience" :)
I don't think we need to provide an upgrade path for existing subqueues, it's easy enough for everyone to switch to the new widget.
Anyway, really nice progress here!
Comment #5
amateescu commentedSetting to NW based on the comment above.
Comment #6
jojonaloha commentedI was thinking that as well. In that case, would this make more sense as a patch to Entityreference, or even a small module like entityreference_dragtable?
I'm going to continue working on it as a patch to entityqueue for now, and if we decide to break it out it should be fairly easy to port to one of those options once it is made more generic.
Comment #7
jojonaloha commentedOk, this patch makes the widget generic and adds the ajax callback to the add item button so that you stay on page until clicking save.
There are a few things that could be improved still, but I think this is very workable and IMO the remaining items would be nice improvements, but not a deal-breaker.
I think follow-up issues can be created for these things once this one is complete.
Comment #8
amateescu commentedI think the only dealbreaker is the third point, as it would be hard for users to know how they can remove that item. Do we have a 'Cancel' operation that would mitigate this problem?
Comment #9
jojonaloha commentedYeah, it is a little odd that there is no remove link for new items. I'm thinking that instead of a link that it should be a button. This would also help this scenario:
- Added a new item
- Clicked a remove link for a pre-existing item
- Click confirm remove button
- They are redirected to the edit page again, but their unsaved changes are lost
Instead every item would have a remove button, and the same scenario would be:
- The add a new item
- Click a remove button, which ajax submits form, just like add item button
- Their changes are not lost
Comment #10
amateescu commentedEvery item having a remove button++ :)
Comment #11
jojonaloha commentedThis patch removes the menu callback that was added in the last patch to remove items and replaces the remove link with remove buttons. In order for Drupal to set the correct $form_state['triggering_element'] the button names must be unique, so their names contain the field name and the delta.
Comment #12
amateescu commentedGave this patch a quick spin and it looks awesome! The double (and sometimes triple) warning can be a bit distracting, but it's not worth holding up the patch for it :)
Committed to 7.x-1.x. Nice work!