mysociety/planningalerts-app — pull request #46 by lizconlan (2014-09-23 17:20:12+00:00)
Title: Add geocoded search and postcode search to the homepage

* Restores the original routing for the homepage, instead overriding the address view template for hampshire theme to ask for a postcode or an address.
* A custom version of the geolocation.js script fills in the address box and submits the form so that the geocoded result rather than the address is passed to the search controller (the original alters the location directly to the original search url with the address as the `q` param).
* Introduces a new search controller, which at the moment just has an index method which displays the `lat` and `lng` params passed in via the URL.

Apologies that this feels a little inconsistent - the overridden address view is in the theme directory whereas the new javascript, controller and search view template have been placed in their respective places inside the main app folder as I haven't found a useful way of overriding them at runtime. After a brief investigation, it looks as though the dynamic means of detecting which theme is active via the URL is a hinderance here as it prevents an Alaveteli-esque altering of the Rails config settings to enable alternative controller, model definitions and custom asset directories to be used.

Closes #1 and closes #2