aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
Commit message (Collapse)AuthorAgeLines
...
* | Merge branch 'zurich-upgrade-openlayers'Matthew Somerville2017-08-18-0/+1
|\ \ | |/ |/|
| * [Zurich] Bring all reports in line with upstream.Matthew Somerville2017-08-18-0/+1
| | | | | | | | | | Update the map/list if the map is zoomed/panned, and make sure the updated HTML list is returned.
* | Reduce queries on /report when loading defect types/prioritiesDave Arter2017-08-18-2/+6
|/
* Make sure /around permalink/redirect have js paramMatthew Somerville2017-08-18-0/+1
| | | | | The change in 17e38922 would not deal with the URL construted by the map permalink code, or the redirect after inspection.
* Merge branch 'js-you-only-load-once'Matthew Somerville2017-08-17-83/+47
|\
| * 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-83/+45
| | | | | | | | | | Both /reports and /my share an ID and a /reports/ajax function, use these also on /around (and share ajax/non-ajax code).
* | Merge branch 'issues/forcouncils/201-show-all-report-updates'Matthew Somerville2017-08-17-21/+36
|\ \
| * | show all report updates, even if no public textStruan Donald2017-08-17-21/+36
| |/ | | | | | | | | | | | | | | Create a comment entry for all updates to reports regardless of whether there is any text part. Also adds an entry to extra if a defect was raised and includes that in the update status line. Fixes mysociety/fixmystreetforcouncils#201
* / allow body users to filter on all problem categoriesStruan Donald2017-08-17-0/+13
|/ | | | | | Not just New/Fixed/Closed but the Investigating etc Fixes #1790
* Add site-wide extra fields for reports, and admin UI to manageDave Arter2017-08-17-0/+221
| | | | | | | - Also provides an editor for the extra Open311 fields on contacts. - Adds .btn--small class for small buttons Fixes #1743.
* Merge branch 'duplicate-reverse'Matthew Somerville2017-08-17-3/+17
|\
| * Store duplicate reverse lookups upon dupe setting.Matthew Somerville2017-08-17-3/+17
| | | | | | | | | | | | This avoids the need to search the whole table to find a report's duplicates. And is easier than constructing an index or upgrading PostgreSQL.
* | 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/+8
|/ | | | | | 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.
* Ignore translation if fewer than two languages.Matthew Somerville2017-08-15-0/+4
|
* Add fn to fetch bodies plus the translated names.Matthew Somerville2017-08-15-1/+30
|
* Remember translation lookup for request remainder.Matthew Somerville2017-08-15-2/+14
|
* 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-5/+3
| | | | | | 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.
* Add switch-site script for easily switching configZarino Zappia2017-08-10-2/+2
| | | | | | | Given a set of config files of the format `conf/general-{cobrand}.yml` this script lets you easily create and recreate a symlink at `conf/general.yml` that points to the cobrand config of your choice. The test suite also then uses this naming convention.
* Merge branch '1244-corps-translatable-body-names'Matthew Somerville2017-08-10-78/+389
|\
| * Body/category translation admin interface.Struan Donald2017-08-10-32/+151
| |
| * fetch and create translation methods for translatableStruan Donald2017-08-10-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | Add a `translation_for` method and an `add_transation` method to Translatable to help hide the details when editing and listing translations. `translation_for` returns all translations if only passed a column or a single translation if passed with a column and a language. `add_translation` will add, or update, a translation if passed in the column, language and string.
| * Set up translatable category columns.Matthew Somerville2017-08-10-20/+40
| | | | | | | | | | | | 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/+71
| |
| * Move FixMyStreet::DB to FixMyStreet::DB::Schema.Matthew Somerville2017-08-09-21/+37
| | | | | | | | Store a schema object on FixMyStreet::DB instead.
| * Add translation table.Matthew Somerville2017-08-09-0/+44
| |
| * 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
* Merge remote-tracking branch 'origin/issues/forcouncils/213-rdi-tweek'Matthew Somerville2017-08-02-1/+4
|\
| * [Oxfordshire] Put I when single char activity codeMatthew Somerville2017-08-02-1/+4
| | | | | | | | | | The "M" line needs an "I" after the activity code if the activity code is only one character.
* | [Oxfordshire] Open311 update, no open state switchMatthew Somerville2017-08-02-0/+3
|/
* 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
* Allow extra params in TestMech::create_body_okDave Arter2017-07-26-3/+4
|
* [Oxfordshire] RDI file should show all inspections as happening on the same dateDave Arter2017-07-24-4/+5
| | | | Fixes mysociety/fixmystreetforcouncils#203
* Resize pin image before compositing onto static mapDave Arter2017-07-24-0/+1
| | | | | | | | A recent change doubled the size of the pin images, which meant the static maps included in report emails had the pin in the wrong place because the compositing code made assumptions about the pin size which were wrong. This commit ensures the pin image is of a known size before compositing, putting the pins back in the right place.
* Fix update-all-reports when database empty.Matthew Somerville2017-07-18-1/+6
|
* Spot email sending success, use on contact page.Matthew Somerville2017-07-18-7/+7
|
* Log error if bad SMTP_TYPE config given.Matthew Somerville2017-07-18-1/+4
| | | | Ignore case of config variable.
* Use DateTime in update-all-reports for tests.Matthew Somerville2017-07-17-6/+8
| | | | The test fixes DateTime, which wouldn't affect direct database queries.