I am trying to make this module work in Views with "group by".

I have found some preparation for it in the code but I am missing the experience with Views 3 to be able to get by. Could I get some hints on where to look probably? For better orientation it would be a lot better if there was a chance to group elements by using the "optgroup" html element within "select".

Comments

kunago’s picture

Project: Multiselect » References
Version: 7.x-1.8 » 7.x-2.0-beta3

Wrong module, sorry.

kunago’s picture

Assigned: Unassigned » kunago
Status: Active » Needs review
StatusFileSize
new486 bytes
new794 bytes
new794 bytes
new436 bytes

Applying the patches attached does the trick. This works for the select widget and I only tested with the Node reference since I have no use in the mean time for User reference. Both submodules however use the same function with the same content. That is why I dared to patch User reference as well because I assume it would work the same.

Let me know if you find something not working as I have not tested it deeply enough.

Status: Needs review » Needs work

The last submitted patch, references_plugin_style.inc_.patch, failed testing.

alaa’s picture

this would be very useful

kunago’s picture

As I wrote in #2, it is working (at least it does for me) but someone who can generate proper patch files should create them. I seem to be missing something because my patches never pass; the code works however.

michaelfavia’s picture

Status: Needs work » Needs review
StatusFileSize
new2.59 KB

Consolidated patches and tested locally. In use on a production site now. Thank you @kunago.

michaelfavia’s picture

Status: Needs review » Reviewed & tested by the community

And with that pass id like to suggest for rtbc with two or three confirmations that it works in this issue and a passing grade from testbot.

yched’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new4.1 KB

Adjusted a little :
- stripped tags from the group text, they look bad in selects
- keep aflat list when providing options for "Views filter on a noderef field" (the config form uses checkboxes, which don't support optgroups)

Committed the attached patch.
Thanks !

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.