aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Around.pm
Commit message (Collapse)AuthorAgeLines
* Reinstate old pin loading URL for mobile app use.Matthew Somerville2018-01-25-2/+2
|
* Fix bug specifying category in URL on /around.Matthew Somerville2018-01-04-1/+1
| | | | The list of existing categories wasn't being checked correctly.
* Add some new Body model helper methods.Matthew Somerville2018-01-03-4/+1
| | | | And use the existing ones more.
* Bypass /around from postcode form if required.Dave Arter2017-12-13-12/+16
| | | | | | | | | | Cobrands can provide a `skip_around_page` method which means the user will be taken from the front page form directly to /report/new with a pin in the map at the location entered. This also preserves the category parameter, if specified on the front page form. Fixes #1730.
* Add pagination to around page.Matthew Somerville2017-11-06-5/+10
|
* Remove Show all pins link and on_map_list_limit.Matthew Somerville2017-11-06-9/+4
| | | | | /around will now show all reports all the time, but we are about to introduce pagination to stop that.
* Have /around ajax use same format as others.Matthew Somerville2017-11-02-7/+11
| | | | | Both /reports and /my work by using the same URL with ajax=1. We should use the same on /around for consistency.
* Merge branch 'bit-of-yaml-tidying'Matthew Somerville2017-10-11-4/+2
|\
| * Simplify geocode cache read/writing.Matthew Somerville2017-10-10-4/+2
| | | | | | | | Don't think the return data ever needs decoding.
* | Return page with "No results" if no ref found.Matthew Somerville2017-10-05-5/+3
| | | | | | | | | | | | This lookup is often performed by inspectors with appcache switched on, which means they were getting the intercepted Glitch page rather than a 404; give them a no results page instead.
* | Fix crash if large number given in postcode field.Dave Arter2017-10-05-2/+9
|/ | | | | | It was possible to trigger an SQL error by entering a value larger than that permitted by the `integer` SQL type. This commit instead returns a 404 in that case.
* Do not fetch pins server side if JS enabled.Matthew Somerville2017-08-17-0/+2
| | | | | | The page currently fetches the pins again client-side (as we don't know the extent of the map at the server point). I realise this isn't ideal, but should speed up the normal case quite a bit.
* Refactor /around list code to share with others.Matthew Somerville2017-08-17-82/+44
| | | | | Both /reports and /my share an ID and a /reports/ajax function, use these also on /around (and share ajax/non-ajax code).
* Set up translatable category columns.Matthew Somerville2017-08-10-1/+1
| | | | | | As category is used both for display and as a link between Problem and Contact tables, add `category_display` for use whenever a category is displayed.
* Set up translatable body name.Matthew Somerville2017-08-09-4/+4
|
* [Oxfordshire] Show problem state in marker tooltipZarino Zappia2017-06-10-1/+2
| | | | Add hook so that cobrands can change pin hover title.
* Fix issue with categories with regex characters.Matthew Somerville2017-04-13-3/+3
| | | | | | As the templates were using `grep`, they failed to match on a category such as "Footpaths (right of way)". Changing the stash variables to be hashes instead of lists makes checking for a key simpler. Fixes #1688.
* Add shortlist buttons to report lists.Matthew Somerville2017-01-12-0/+2
| | | | | | | This includes adding/removing reports from a user's shortlist, and manual reordering of a shortlist with up/down buttons. The backend code can cope with an item moving to any point in the list.
* Add sort order options to list pages.Matthew Somerville2016-11-04-2/+8
| | | | | | | | Includes newest, oldest, least/most recently updated, and most comments. The default remains the same, which is last updated on /reports, and newest on /my and /around (the latter plus not-in-view sorted-by-distance ones).
* Add ajax pin fetching to reports/my pages.Matthew Somerville2016-10-14-3/+0
| | | | | This matches the behaviour on /around, and prevents a refresh when changing the state or category filters.
* Allow multiple selections in report list filter.Zarino Zappia2016-10-13-8/+6
| | | | | | This lets people filter by multiple categories or states. It uses our jQuery multi-select plugin to turn the <select multiple>s into little overlay lists of checkboxes. HTML5 history is also supported.
* Add manage screen for editing priority/category.Matthew Somerville2016-09-09-1/+1
| | | | | | | This is a cut-down version of the full inspect screen. We truncate the co-ordinates just in case (they should be anyway but e.g. the test report isn't).
* Allow searching for reports with ref: prefix in postcode fieldDave Arter2016-08-22-0/+23
| | | | | | | | | Searches the `id` and `external_id` fields. This takes you directly to the report if only a single report matches, otherwise a disambiguation page is shown. For mysociety/fixmystreetforcouncils#16
* Refactor map pin/feature functions.Matthew Somerville2016-07-21-19/+30
|
* [UK Councils] Show all reports on cobrand /around mapDave Arter2016-07-08-0/+1
| | | | | | | | | | | | | | There is a concern that excluding district council reports from a two-tier council's cobrand's /around page might lead to duplicate reports or reports never being seen. This commit adds them to the map and the sidebar and displays the destination council in the report list item. Clicking the pin or the report link leads to the report on FMS.com. Reports sent to the a council other than the the active cobrand are shown as grey pins on the map, and the receiving council's name is shown in the sidebar list.
* Improve CSRF tokens and add to more forms.Matthew Somerville2016-06-20-0/+2
|
* Remove some unused cobrands.Matthew Somerville2016-04-20-2/+2
|
* Don't double-decode geocoded addresses.Matthew Somerville2016-03-15-2/+4
| | | | | | | | | Perl 5.20 introduced a version of Encode that errors on decoding already decoded content (rather than returning the same string). Whilst this can be taken as a bug in our code (although the decoding exists because some versions of FastCGI silently UTF-8 encode the content), in the changelog for Perl the only reference to this change is the line: "Encode has been upgraded from version 2.49 to 2.60.".
* Switch to JSON::MaybeXS, remove JSON::XS.Matthew Somerville2016-01-22-4/+3
| | | | | | Travis has Cpanel::JSON::XS preinstalled, which means that the build would fail there, as JSON::MaybeXS would try and upgrade JSON::XS to version 3 which the snapshot did not contain.
* Add state/category filters to base cobrand.Matthew Somerville2015-10-07-5/+0
| | | | | | | This removes the on map/nearby tabs, replacing them with one combined list. The styling is moved to the base, so that it is used on mobile too. A closed option is added to the existing dropdown, and the base/fixmystreet my templates are also combined. Fixes #1141.
* Combine some base/fixmystreet templates.Matthew Somerville2015-10-07-1/+1
| | | | | | | | The aim is to combine base and fixmystreet as much as possible, providing enough template/styling hooks for any cobrand. This commit removes the need for separate base/fixmystreet templates for the front page, almost all of the /around templates, the open graph headers, and the low level item list templates.
* Factor out all uses of param()/params.Matthew Somerville2015-07-07-17/+16
| | | | | | | Use a central get_param and get_param_list functions dependent on whether we're after a scalar or a list (almost always a scalar). This prevents any possibility of confusion where param() could return a list, or params->{} an arrayref.
* Refactor duplicated filter_status code into a single functionSteven Day2015-06-29-14/+2
|
* Rename map filtering GET param, remove unnecessary querySteven Day2015-06-29-12/+5
|
* Simplify default status filter for map pinsSteven Day2015-06-29-3/+3
|
* Populate category filter with all available categoriesSteven Day2015-06-29-9/+23
|
* Make load_and_group_problems respect status/category query paramsDave Arter2015-06-29-1/+1
| | | | | | | This allows the /reports page to be filtered using the status/category dropdowns. This is implemented in a manner that means the t/c params will override status/category.
* Use a consistent method of filtering by category on /around and /ajaxDave Arter2015-06-29-0/+13
|
* Allow cobrands to override the default 'state' filter for map pinsDave Arter2015-06-29-1/+2
|
* Ignore invalid categories in /around query stringDave Arter2015-06-29-4/+35
|
* Stash category from query params for templates to useSteven Day2015-06-29-0/+1
|
* Filter initial pins by category on /aroundDave Arter2015-06-29-1/+4
|
* Make sure all co-ordinates are stringified.Matthew Somerville2015-02-13-12/+8
| | | | | | | This includes MapIt postcode lookups, geocoding, query parameters, tile clicks. Stringifying truncates them to six decimal places, which means we no longer need any "short" versions anywhere, and the JSON response will always uses a decimal point regardless of locale.
* Only show text on /reports if appropriate.Matthew Somerville2014-11-14-2/+0
| | | | | Only show "select..." if more than one body, and only mention greyed out lines if there are any. Fixes #869.
* [fixmystreet.com] Experiment, no pins by default.Matthew Somerville2014-10-17-10/+6
| | | | | | | | This changes the default flow to show no pins and a message about reporting, with the second tab displaying existing problems (and showing map pins). Those existing problems are the ones that would currently be on "problems on the map" followed by those currently on "problems nearby".
* return locations with coordinates as well as bare locationsStruan Donald2013-03-21-2/+3
|
* Fix tests.Matthew Somerville2013-02-20-1/+1
|
* Redirect to front page if nothing provided.Matthew Somerville2013-02-20-3/+4
|
* Make sure title not shown on pins on unconfirmed Zurich reports.Matthew Somerville2013-01-24-1/+1
|
* remove redundant code accidentally left in :(Struan Donald2013-01-17-14/+0
|