Posted by mradcliffe on March 16, 2009 at 3:31pm
6 followers
| Project: | Flag |
| Version: | 6.x-2.x-dev |
| Component: | Views integration |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I wanted to create a view with an exposed filter where a user can choose the state of a flag (Flag or unflag). However I wanted it to be optional so by default it would show all nodes regardless of flag state. Right now it will always default to either flagged or not flagged.
I don't have flag cvs checked out right now but in includes/flag_handler_filter_flagged.inc:
<?php
$form['value']['#options'] = array(1 => t('Flagged'), 0 => t('Not flagged'), 'All' => t('All'));
?>Adding the 'All' value to the options form corresponds with the option that has '' as the label in views.
Comments
#1
needed same thing, attaching patch
#2
The interaction when using the "All" option is a little bit strange, but Views handles all the validation for us in an acceptable way. I committed to the 2.x branch.
#3
Great, just what I needed! Thanks :-)
#4
Automatically closed -- issue fixed for 2 weeks with no activity.
#5
Followup:
#658400: Exposed filter includes "Any" option when "Optional" is unchecked (Regression bug, revert)