As the title indicates, implement handlers to add Subqueue Id field and sort by it in views.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff-2399701-3-5.txt | 3.92 KB | jojonaloha |
| #5 | entityqueue-subqueue_id-views-handlers-2399701-5.patch | 5.41 KB | jojonaloha |
| #3 | subqueue_id-views-handlers-2399701-3.patch | 3.22 KB | spesic |
| #1 | subqueue_id_sort_and_field_handler-2399701-1.patch | 694 bytes | spesic |
Comments
Comment #1
spesic commentedComment #2
spesic commentedComment #3
spesic commentedUpdated patch to support the following:
- Create a view of subqueues filtered by master queue machine name
- Added subqueue_id field, sort, argument and filter
- Added custom handler for subqueue_id as contextual argument, allow overriding view title using subqueue title by using %[n]
Comment #4
jojonaloha commentedLooking good. I still need to test it out, but a manual review looks good. The only thing I would suggest is that we use the same group as the other fields. So
'group' => t('Entityqueue'),Comment #5
jojonaloha commentedAfter testing the patch I noticed that other fields showed up in a Subqueue group. I also found out that the Entity API module can actually do a lot of work for us in integrating with Views. I ended up taking out some of the code in
entityqueue_views_data_alter()and added theentityqueue_entity_property_info()a basic implementation. It looks like Entity API adds field, filter, sort and argument handlers for all the properties, even adding a relationship for the user. The one exception is we still need to override the default views argument handler for the Queue Name to use the one provided in patch #3Attached patch implements
hook_entity_property_info()and removes most of the entityqueue_subqueue definitions in entityqueue.view.inc.Comment #6
spesic commentedYou sir rock!
I'll check out your patch out and see to integrate views argument handler.
Comment #7
nerdacus commentedThe patch in #5 works perfectly!
Not only do I have the ability to filter by subqueue IDs but I can sort and filter by others.
Comment #9
jojonaloha commentedCommitted ac398d0