-
-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter UI on table page #86
Comments
Now that we have foreign key support (#85) this is even more important, since foreign key support actively encourages linking to filtered table views. |
If the selected relationship is a foreign key reference, we should resolve that foreign key and display it on the page. |
OK,I've figured out how to do an initial version of this without JavaScript. I'll provide three form fields labell d "add filter":
Submit those and the site will redirect you to a correctly populated querystring for that filter. If you have filters applied, those will display as prepopulated form field triples. For foreign key reference filters, I will display the resolved value next to the text box containing the numeric ID. In the future this can get a select2 style treatment. |
I'm going to be a bit classier about this and auto generate a title for the page that describes the currently applied filters. |
"Tablename: 3,567 rows where status = 3 (published) and n > 55" |
I'll have to refactor the foreign key annotating code to be usable in other contexts - at the moment it only works for annotating displays of rows, but I need to use it to resolve selected filters as well. |
Part of implementing the filters UI (refs #86) - the following: /trees/Trees?_filter_column=SiteOrder&_filter_op=gt&_filter_value=2 Now redirects to this; /trees/Trees?SiteOrder__gt=2
if filter_op contains a __ the value is set to the right hand side. e.g. ?_filter_column=col&_filter_op=isnull__1&_filter_value=x Redirects to: ?col__isnull=1 Refs #86
I need a nicer abstraction around the concept of filters. It needs to be able to:
It should replace my current Lines 38 to 56 in a5881e1
|
This: ?_filter_column_1=name&_filter_op_1=contains&_filter_value_1=hello &_filter_column_2=age&_filter_op_2=gte&_filter_value_2=12 Now redirects to this: ?name__contains=hello&age__gte=12 This is needed for the filter editing interface, refs #86
And with ef3eacf I'm ready to call this one done. |
A UI for building up simple table queries by adding additional filter rules that get executed as query parameters in the URL.
The text was updated successfully, but these errors were encountered: