openplans / openblock

OpenBlock is a web application and RESTful service that allows users to browse and search their local area for "hyper-local news
61 stars 26 forks source link

schema_filter view: allow multiple values for each parameter #260

Closed slinkp closed 12 years ago

slinkp commented 12 years ago

It would be really nice if you could select more than one value for each param on the schema_filter view. For example, in the boston demo, for restaurant inspections, you can currently only search for one kind of violation at a time. Why not more than one?

(Note the Columbia Tribune has specifically asked for this; currently working on it for them)

Looking at Chosen javascript library for UI for this, which would be a lot easier to do if #266 was fixed. Want to do that anyway.

slinkp commented 12 years ago

(In [7303fdb4037265cfad71e363e3812d694ad85c13]) More work on lookups UI, refs #267:

slinkp commented 12 years ago

(In [6bb6c984f0e2640c33f65ed7a56d966de289afb9]) schema_filter: All inputs now use forms rather than links. Using Chosen js widget for selecting Lookups. Refs #267. Still to do: Merge the display of existing values with the forms. Details:

slinkp commented 12 years ago

(In [680c60629e0e94bf7abcf5dfb2eec65e38bde5fc]) Progress toward using select widgets for filtering by schemafield; refs #267

slinkp commented 12 years ago

(In [1d084e244bc00621fd99a26f091e867e8c591a59]) Template tag for generating hidden form inputs to submit to the schema_filter view. Refs #267 Also refactored the filter_url template tag code to share code w/ the new tag.

slinkp commented 12 years ago

Doesn't seem to be working for me --

slinkp commented 12 years ago

(In [55d367d9ede768e74aa49c32fbe80809cbe6e2d2]) Fix error in NewsItem.objects.by_attribute() with m2m lookups; looking for [3,47] was finding any number starting with 3 or ending with 47. Joy of regexes. Refs #267

slinkp commented 12 years ago

Ticket imported from Trac: http://developer.openblockproject.org/ticket/267 Reported by: slinkp