aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Reports.pm
Commit message (Collapse)AuthorAgeLines
* On /reports maps, only include reports in view.Matthew Somerville2017-04-13-0/+6
| | | | | | | | | Update the reports with a bounding box, similar to on around pages. This is made slightly trickier because we don't want to do anything on page load (we already have the pins), we need to reload when the zoom changes, and we don't want the strategy to get confused by its first redraw, e.g. on pin hover, We also need to turn off the zoom- to-bounds if we've got a bounding box in the URL.
* Fix issue with categories with regex characters.Matthew Somerville2017-04-13-1/+1
| | | | | | 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 filterspezholio2017-02-07-5/+34
|
* Add shortlist buttons to report lists.Matthew Somerville2017-01-12-2/+8
| | | | | | | 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.
* Return 400/500 for some client/server errors.Matthew Somerville2016-12-16-4/+3
|
* Add sort order options to list pages.Matthew Somerville2016-11-04-2/+25
| | | | | | | | 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).
* Update pagination when status/categories changed.Matthew Somerville2016-10-18-1/+9
|
* Add ajax pin fetching to reports/my pages.Matthew Somerville2016-10-14-2/+25
| | | | | 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-16/+30
| | | | | | 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.
* Don't show deleted bodies on /reports.Matthew Somerville2016-10-04-1/+3
|
* Refactor map pin/feature functions.Matthew Somerville2016-07-21-8/+1
|
* Add missing 'pin.problem' attributeDave Arter2016-07-11-0/+1
| | | | | Missed this from 8a8b34, and it was causing a crash on certain /reports/ pages when trying to display the list of problems.
* Remove some unused cobrands.Matthew Somerville2016-04-20-9/+3
|
* Use better link to reports on admin body page.Matthew Somerville2016-04-20-18/+0
| | | | Remove unused body/area ID URL code.
* Switch to JSON::MaybeXS, remove JSON::XS.Matthew Somerville2016-01-22-1/+2
| | | | | | 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-0/+3
| | | | | | | 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.
* [Zurich] Fix map on /reportsDave Arter2015-10-06-0/+1
|
* Exclude deleted categories from the all reports page filtersSteven Day2015-10-01-1/+1
|
* Simplify/consolidate body restriction db code.Matthew Somerville2015-08-19-22/+6
| | | | | | | Make dashboard work properly in two-tier councils, showing reports sent to both. Create an index on the array of the bodies_str column to speed up performance, and use that throughout the code replacing all LIKE scans. This also enables a simplifying tidy of the restriction code.
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-6/+6
| | | | | This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
* Factor out all uses of param()/params.Matthew Somerville2015-07-07-5/+5
| | | | | | | 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-23/+23
|
* Rename map filtering GET param, remove unnecessary querySteven Day2015-06-29-2/+2
|
* Simplify default status filter for map pinsSteven Day2015-06-29-5/+5
|
* Populate categories filter dropdown on /reports pageDave Arter2015-06-29-0/+9
|
* Preserve the 'status' value on /reportsDave Arter2015-06-29-0/+10
|
* Make load_and_group_problems respect status/category query paramsDave Arter2015-06-29-2/+15
| | | | | | | 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.
* Allow cobrands to specify ordering on all reports pageDave Arter2015-06-29-1/+1
| | | | | Refactor the default ordering into a method on the Default cobrand which can be overridden by subclasses.
* Remove need for cron-wrapper with existing scriptsMatthew Somerville2015-01-19-1/+1
| | | | | Call the necessary boilerplate in each script so you can call them directly. Remove boilerplate from files that don't need it.
* By default, use area-based alerts.Matthew Somerville2014-12-12-1/+1
| | | | | | | | | The body-based alert only works if the body ID matches the MapIt ID. This fixes #959. Further work needs to be done to enable proper body-based alerts that work properly in all circumstances. Consequently, factor out fixed body IDs from many tests. Also fix a couple of tests not overriding geocoder correctly.
* Only show text on /reports if appropriate.Matthew Somerville2014-11-14-3/+9
| | | | | Only show "select..." if more than one body, and only mention greyed out lines if there are any. Fixes #869.
* Allow filtering by category on All Reports page.Matthew Somerville2014-10-24-0/+6
| | | | If you know to change the URL, anyway, for now.
* Link through from all reports page to sub categoriesStruan Donald2014-07-01-1/+22
| | | | | | | | Add a type parameter to the /reports/body page to restrict list by problem category. Only link to report categories that have entries. Fixes #798
* Redirect away from incorrect council pages on council sites.Matthew Somerville2013-05-21-0/+5
|
* Check for no body_areas entries (e.g. deleted councils).Matthew Somerville2013-04-10-1/+3
|
* Remove all special body handling in order to move FMB to use bodies properly.Matthew Somerville2013-02-04-15/+1
|
* Fix infinite memory-eating loop.Matthew Somerville2013-02-04-1/+2
| | | | | | Reading from $problem->areas is a new string each time, so the global regex gets reset and the loop never ends. Look up the value once, first, to prevent this.
* Add some more error handling of odd RSS.Matthew Somerville2013-02-04-0/+6
|
* Check we have an area ID to look up first.Matthew Somerville2013-02-04-1/+1
|
* Set body needed for redirect function (this whole area/body confusion here ↵Matthew Somerville2013-02-04-0/+2
| | | | needs looking at).
* Merge remote branch 'origin/zurich'Matthew Somerville2013-02-04-167/+193
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/open311-populate-service-list bin/send-comments bin/update-all-reports conf/crontab.ugly db/schema.sql perllib/FixMyStreet/App/Controller/Admin.pm perllib/FixMyStreet/App/Controller/Report/New.pm perllib/FixMyStreet/App/Controller/Reports.pm perllib/FixMyStreet/Cobrand/Default.pm perllib/FixMyStreet/Cobrand/LichfieldDC.pm perllib/FixMyStreet/DB/Result/Open311conf.pm perllib/FixMyStreet/DB/Result/Problem.pm perllib/FixMyStreet/DB/ResultSet/Problem.pm perllib/FixMyStreet/SendReport.pm perllib/FixMyStreet/SendReport/Email.pm perllib/FixMyStreet/SendReport/Open311.pm perllib/Open311/GetServiceRequestUpdates.pm perllib/Open311/PopulateServiceList.pm t/app/controller/report_new.t t/app/controller/rss.t templates/web/bromley/report/display.html templates/web/default/admin/council_contacts.html templates/web/default/common_header_tags.html templates/web/default/dashboard/index.html templates/web/default/front/stats.html templates/web/default/report/_main.html templates/web/default/report/update-form.html templates/web/emptyhomes/index.html templates/web/emptyhomes/report/display.html templates/web/emptyhomes/report/new/councils_text_all.html templates/web/emptyhomes/reports/body.html templates/web/emptyhomes/reports/index.html templates/web/fixmystreet/report/new/fill_in_details_form.html templates/web/fixmystreet/report/update-form.html web/cobrands/fixmystreet/fixmystreet.js web/js/fixmystreet.js
| * List all reports immediately on /reports for Zurich.Matthew Somerville2013-01-28-2/+18
| |
| * Have different pin colours on Zurich dependent on state.Matthew Somerville2013-01-25-5/+5
| |
| * Stop changing DateTimes to epochs and back.Matthew Somerville2013-01-25-35/+14
| | | | | | | | | | | | | | Also revert cursor handling of Reports.pm; the DateTime inflation appears to be a slowdown, and we were doing that anyway, and this way makes things simpler in general. Will have a watch out for any performance issue, but hopefully it should be fine.
| * Reports does speedy inflate-bypassing query, so manually inflate if needed.Matthew Somerville2013-01-17-0/+5
| |
| * Some tweaks to get Zurich Reports page working a bit better.Matthew Somerville2013-01-16-3/+8
| |
| * Update database fetching to fetch needed data for previous commit.Matthew Somerville2013-01-08-2/+2
| |
| * Allow bodies to span multiple area IDs, and areas can be covered by more ↵Matthew Somerville2012-12-19-3/+3
| | | | | | | | than one body.
| * Migrate Reports.pm to use bodies, not areas.Matthew Somerville2012-12-15-136/+156
| |
| * Rename council column to bodies_str, and all the related code.Matthew Somerville2012-12-15-12/+13
| |