aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
Commit message (Collapse)AuthorAgeLines
* Update templates when category/state changed.Matthew Somerville2017-06-30-0/+2
| | | | | | When the category or state changes, the list of available templates updates (previously it was frozen at what the category was on page load, and didn't care about the state).
* Don't resend if category change subsets body.Matthew Somerville2017-06-20-3/+3
| | | | | | Instead of checking if the list of bodies has changed at all, mark the report for resending if there is a body in the new list not present in the old.
* Return Response Priorities as JSON.pezholio2017-06-20-20/+3
| | | | | This now lets the response priority and defect type handling share the same code.
* Populate defect types dropdown on category changepezholio2017-06-20-0/+6
|
* Run each test file in a transaction.Matthew Somerville2017-06-20-1/+1
| | | | This means that the tests can be run in parallel.
* [UK] Remove requirement for fixed body IDs.Matthew Somerville2017-06-20-9/+10
| | | | | | | | | | | | Historically in UK cobrands, bodies have had IDs the same as the MapIt area ID they cover. This can be confusing (if you are setting up a dev environment, say) and should not be necessary. This commit removes the requirement entirely, by switching any ID checks to either the name of the body, or the actual area it covers. One note: the body name in the test has to match so that we do not get two bodies both covering 2237 created. This will not be necessary when the tests are compartmentalized in the next commit.
* [Oxfordshire] Show problem state in marker tooltipZarino Zappia2017-06-10-1/+2
| | | | Add hook so that cobrands can change pin hover title.
* Allow users to hide their name on reports/updates.Zarino Zappia2017-05-31-2/+36
|
* Add update URL model method.Matthew Somerville2017-05-31-2/+1
|
* [Bromley] Restore staff update functionDave Arter2017-05-30-1/+2
| | | | | | The Bromley update form needed to be updated to use the new <select> template. This also fixes a situation where staff users (on all cobrands) wouldn't be able to leave updates on problems with state 'fixed - user'.
* Use same state input in update form as elsewhere.Matthew Somerville2017-05-26-8/+2
| | | | This lets it look the same as admin/inspect uses, with optgroups.
* [Oxfordshire] Send RDI reports by email.Matthew Somerville2017-05-16-177/+21
|
* Add method to shortlist multiple reportspezholio2017-05-05-0/+14
|
* Subscribe inspectors to updates when state changespezholio2017-05-05-1/+10
|
* Move alert signup logic out of controllerpezholio2017-05-05-15/+8
|
* Redirect to report for inspectorspezholio2017-05-05-6/+12
|
* [Oxfordshire] Include nearest info in RDI output.Matthew Somerville2017-05-02-1/+9
|
* Tidy up find_closest* functions.Matthew Somerville2017-05-02-3/+4
| | | | | Allow find_closest to be called multiple times with only one lookup, and to return just its data, not a compiled string.
* 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-8/+9
| | | | | | 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.
* Allow comma-separated contact emails in the adminDave Arter2017-04-10-3/+4
| | | | | | | The report-sending code has allowed multiple emails for a long time, but the admin wouldn't allow you to enter multiple emails for each contact. Fixes mysociety/FixMyStreet-Commercial#835
* [SeeSomething] Remove cobrand.Matthew Somerville2017-03-31-1/+1
|
* Merge branch 'offline-tests'Matthew Somerville2017-03-28-2/+2
|\
| * Make sure all MapIt tests can run offline.Matthew Somerville2017-03-23-1/+1
| |
| * Fix warning, use correct user object in delete logMatthew Somerville2017-03-17-1/+1
| |
* | Add customisable defect types.Dave Arter2017-03-23-4/+133
|/ | | | | | | | | Problems can have an associated defect type, that can be assigned during an inspection. Include an admin interface for managing these types, that can also be assigned on a per-category basis, currently available to the Oxfordshire cobrand. (Also include 'TM' in traffic management Exor RDI output.)
* Remove superfluous lists from Open311 JSON output.Matthew Somerville2017-03-17-35/+26
| | | | | | | The Open311 JSON output was wrapping each request parameter in a list. This was presumably to prevent the XML output including the parameters as attributes rather than children. A better way to fix this is to use the NoAttr parameter to XMLout which forces them to be children.
* Use name at time of moderation, include superusersMatthew Somerville2017-03-14-2/+7
| | | | This works better if e.g. a user stops being associated with a body.
* Store user object when deleting report.Matthew Somerville2017-03-14-1/+2
|
* Allow superuser to leave update when inspecting.Matthew Somerville2017-03-10-1/+2
|
* Check cobrand users list when admin merging users.Matthew Somerville2017-03-09-1/+8
|
* Make sure emails are lowercased in admin.Matthew Somerville2017-03-09-17/+14
|
* Only output appcache/manifest for shortlist users.Matthew Somerville2017-02-28-2/+8
| | | | The interception of 404s etc is too much of an inconvenience.
* Reports need external_id to be included in RDI downloadDave Arter2017-02-20-0/+1
| | | | | | | | | | | Reports in the generated Exor RDI file need to have an external_id so they can be linked to existing enquiries (PEMs) when the RDI is imported into Exor. There is a small window of opportunity for a report to be created, inspected and downloaded in an RDI before it's been sent to Exor via Open311 and had an external_id assigned. This commit closes that window by excluding reports from the RDI that don't have an external_id. Fixes mysociety/fixmystreetforcouncils#168
* Send open reports regardless of current stateDave Arter2017-02-20-1/+1
|
* [Oxfordshire] Add Exor RDI file download featureDave Arter2017-02-15-1/+220
| | | | | | | | | | The RDI file format encapsulates information about inspections that have taken place, and can be uploaded into Exor to create defects in bulk. This commit adds a page to the Oxfordshire cobrand's admin allowing RDI files to be generated and downloaded from FMS. For mysociety/fixmystreetforcouncils#127
* [Oxfordshire] Add initials field to admin user edit formDave Arter2017-02-15-0/+13
|
* Allow cobrands to control which states affect reputationDave Arter2017-02-15-1/+3
| | | | | | | | | | | | Rather than assigning +1 to a user's reputation every time a report is inspected, this allows cobrands to specify which states should increment or decrement the reputation value when a report is inspected. The default behaviour is for reputation to never be changed, but the Oxfordshire cobrand will increment the reputation when a report is marked as 'action scheduled'. For mysociety/fixmystreetforcouncils#119
* Clarify ‘inspected’ behaviourDave Arter2017-02-15-5/+10
| | | | | | A report is now considered 'inspected' if its state was changed by an inspector. Additionally, an AdminLog entry is created so the time of inspection and inspector can be recorded.
* Add external_id field to ResponsePriority for use with ExorDave Arter2017-02-15-0/+1
|
* Add cobrand call_hook fn, calls a fn if defined.Matthew Somerville2017-02-15-6/+3
|
* Use Token params for redirect on loginpezholio2017-02-15-3/+7
| | | | | Tokens can include a 'p' field in their data to set query params for the post-login redirect URL.
* Redirect to category-filtered /reports on loginDave Arter2017-02-14-1/+20
| | | | If the user has a from_body and at least one category set.
* Follow redirect to /admin after login if allowedDave Arter2017-02-14-1/+1
|
* Add shortlist filterspezholio2017-02-07-5/+34
|
* Return JSON if `ajax` in paramspezholio2017-01-31-0/+4
|
* Merge branch 'inspect-save-to-shortlist'Matthew Somerville2017-01-31-0/+6
|\
| * Redirect to shortlist if user has shortlist perms.Matthew Somerville2017-01-24-0/+6
| | | | | | | | | | Assume that if they inspect and save a report, they want to go back to their shortlist.
* | Lowercase email when signing in.Matthew Somerville2017-01-26-0/+1
|/
* Redirect after user creation/editDave Arter2017-01-19-7/+9
| | | | | Solves a minor bug where it was difficult to create a new user and immediately assign permissions, as the page didn't show the appropriate permissions UI.