| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Return a list of associated bodies on around/new pages and in category ajax
calls, and use that when deciding whether to show/hide layers. If the layer
has no body information, then we show it as before, maybe based on category
selected; if it does, it is only shown if the layer body matches the bodies
for the point.
As part of this create a new VectorAsset class to handle all the visibility
changes for asset layers as it makes it a bit tidier.
|
| |
|
|
|
|
|
|
|
| |
Add a checkbox to show older reports, plus if we get to the end of the new
reports then instead of a Next button show a "show older" button that will
reload the current page but with older reports also loaded. Wire it all up
into the pushState code as well.
|
|
|
|
|
|
|
|
| |
/ajax/closest will return ajax with details of the closest address to
the lat/lon passed in from the Bing geocoder.
Tidy up find_closest() to use overloaded string rather than passing
in whether you want a string or not.
|
|
|
|
| |
This is shown when reporting and in map list filters.
|
|
|
|
|
| |
Both filter categories and new report category lists went through mappings
to different data structures, which doesn't seem to be needed.
|
|
|
|
|
|
|
| |
So that you can build functionality to add extra limitations on
to the map pins displayed. Useful for Collideoscope initially
to filter out (or in) reports from the Department of Transport's
Stats19 Data.
|
| |
|
|
|
|
| |
The list of existing categories wasn't being checked correctly.
|
|
|
|
| |
And use the existing ones more.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
/around will now show all reports all the time, but we are about to
introduce pagination to stop that.
|
|
|
|
|
| |
Both /reports and /my work by using the same URL with ajax=1. We should
use the same on /around for consistency.
|
|\ |
|
| |
| |
| |
| | |
Don't think the return data ever needs decoding.
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Both /reports and /my share an ID and a /reports/ajax function, use
these also on /around (and share ajax/non-ajax code).
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Add hook so that cobrands can change pin hover title.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
This matches the behaviour on /around, and prevents a refresh when
changing the state or category filters.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.".
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|