aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
Commit message (Collapse)AuthorAgeLines
* translate defect category names in the controllerStruan Donald2017-08-16-1/+1
| | | | | | | As we're only passing category names through we need to do the translation in the controller and not the template Fixes mysociety/fixmystreetforcouncils#218
* enable body users to add problem updates anonymouslyStruan Donald2017-08-16-1/+5
|
* enable body users to report problems anonymouslyStruan Donald2017-08-16-2/+7
| | | | | | uses the body user but flags the report as anonymous Fixes #fixmystreetforcouncils/207
* The Nearby model works in kilometres, not metres.Matthew Somerville2017-08-15-1/+1
| | | | | I think we probably don't care about reports in John o'Groats when we're in Oxford.
* Add fn to fetch bodies plus the translated names.Matthew Somerville2017-08-15-1/+1
|
* Remove a couple of debug lines.Matthew Somerville2017-08-15-3/+0
|
* translate report template category names in controllerStruan Donald2017-08-14-1/+1
| | | | | | | We can't translate them in the template as we're just passing in the category name and not the object. Fixes mysociety/fixmystreetforcouncils#216
* [Zurich] Fix map on /reportsDave Arter2017-08-14-0/+5
| | | | | | | | | | | | | | | | | | A seemingly unrelated change in ef6ffbdb was causing JS errors on the /reports page which meant the map loading spinner was permanently present. This commit fixes that, and also fixes another bug which was uncovered where the ?ajax=1 param was being ignored by the Zürich /reports page, leading to HTML being returned and another JS error. The call to `new OpenLayers.Bounds` in OpenLayers.Strategy.FixMyStreet.getMapBounds was causing three of the 4 bounds params to be lost when run on OpenLayers 2.11, as this version doesn’t accept an array to the Bounds constructor. This in turn was using an invalid `bbox` parameter (only the west value was present) in the AJAX call to /reports which returned a 500 error. This then crashed the JS and caused the loading spinner to get stuck.
* Prevent unnecessary string translation.Matthew Somerville2017-08-11-2/+0
| | | | | | Calling the function 'translate' causes gettext-extract to add the string to the .po file. Also, we no longer need an admin 'updated' message as the main form has its own success message.
* Merge branch '1244-corps-translatable-body-names'Matthew Somerville2017-08-10-47/+180
|\
| * Body/category translation admin interface.Struan Donald2017-08-10-32/+151
| |
| * Set up translatable category columns.Matthew Somerville2017-08-10-10/+11
| | | | | | | | | | | | 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/+17
| |
| * Ensure user has from_body for contribute as body.Matthew Somerville2017-08-09-1/+1
| |
* | Don't redirect if logged in & auth form submitted.Matthew Somerville2017-08-08-1/+1
|/ | | | | | If you submit the auth form (as opposed to clicking a link to something that redirects to the auth form), we should assume you want to treat that as a login.
* Don't put filter_category in URL if no categories.Matthew Somerville2017-08-05-1/+1
|
* Cache template paths in About.pm with lang_codeDave Arter2017-08-02-6/+8
| | | | Fixes #1765
* Option to redirect to custom URL from Contact formZarino Zappia2017-07-28-2/+20
| | | | | | | | If a `success_url` parameter is provided along with the contact form fields, the user will be redirected to that URL upon successful form submission. We use it for the first time on the (UK) FixMyStreet Pro marketing page.
* do not replace deleted text with [...] when moderatingStruan Donald2017-07-27-26/+3
| | | | | | | | Replacing deleted text with [...] when moderating reports and comments leads to very odd looking reports when correcting minor typos so just leave the text as deleted. Fixes #1774
* Redirect to /around after inspecting a reportDave Arter2017-07-26-2/+12
| | | | | | | After a report has been inspected, the user is redirected to /around at the newly-inspected report’s location. Fixes mysociety/fixmystreetforcouncils#204
* Resend report if changing to category with different send_methodDave Arter2017-07-26-0/+17
| | | | | | | If a report’s category is changed to one with a different send_method to the original category, the report needs to be resent. Fixes mysociety/fixmystreetforcouncils#209
* [Oxfordshire] RDI file should show all inspections as happening on the same dateDave Arter2017-07-24-0/+1
| | | | Fixes mysociety/fixmystreetforcouncils#203
* Spot email sending success, use on contact page.Matthew Somerville2017-07-18-4/+1
|
* Merge branch 'issues/forcouncils/192-unused-categories'Matthew Somerville2017-07-14-13/+12
|\
| * Only use active categories for making new reports.Matthew Somerville2017-07-14-2/+2
| | | | | | | | | | Inactive ones can still be used for e.g. list filtering, but not when making a new report.
| * Add inactive state to categories.Matthew Somerville2017-07-14-11/+10
| | | | | | | | | | A new 'state' column replaces confirmed and deleted, allowing categories to be unconfirmed, confirmed, deleted or inactive.
* | Merge branch 'new-reports-in-core'Matthew Somerville2017-07-14-21/+0
|\ \
| * | New version of /reports main page.Matthew Somerville2017-07-14-21/+0
| |/ | | | | | | | | | | | | | | | | | | | | This is a much broader summary page, plus a body name autocomplete. This was originally implemented for fixmystreet.com in 8a6a4ccb7. It also adds '(no longer exists)' in the autocomplete next to bodies not covering any areas. You can supply the `--table` argument to `update-all-reports` to generate the old-style data.
* / Allow static home page template override.Matthew Somerville2017-07-14-8/+10
|/ | | | | | If an /about/homepage.html template exists in your cobrand, it will be used as the front page, and the normal front page will be available at /report.
* Merge branch 'issues/forcouncils/195-overloaded-action-scheduled'Matthew Somerville2017-07-07-9/+10
|\
| * [Oxfordshire] Separate defect creation from state.Matthew Somerville2017-07-07-9/+10
| | | | | | | | | | | | | | Revert the behaviour from 36baff2d, so that everyone can use the 'action scheduled' state, and instead if someone with report_instruct permission has the state set to 'action scheduled', add an extra mandatory question asking whether they want to raise a defect or not.
* | [fixmystreet.com] New version of /reports page.Zarino Zappia2017-07-06-7/+22
|/ | | | | | | | | | | This is a much broader summary page, plus a body name autocomplete. This uses a cut down version of chart.js. [1] [1] The full version was 149Kb (41Kb gzipped) plus you needed moment (50Kb/17Kb), for a total of 199Kb/58Kb. By stripping out unused graphs and code and config options, and switching to category axis rather than time, it is now a total of 39Kb/13Kb.
* Stop using mySociety::Web and mySociety::Sundries.Matthew Somerville2017-07-06-12/+12
| | | | | Both uses can be covered by existing modules. This means we can drop FCGI also.
* 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
|