aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
Commit message (Collapse)AuthorAgeLines
* Add Extra role to ease use of {extra} field.Hakim Cassimally2015-03-20-8/+8
| | | | | | | | | Historically, the extra field has been used in two different ways by different cobrands, both as a list (e.g. Open311 category fields) and a hash (e.g. the Zurich cobrand). This commit consolidates usage, adding an API to make use of the field easier and always returning a hash for the code to use. Fixes #1018.
* [Harrogate] show warning banner for NYCC categoriesHakim Cassimally2015-03-20-0/+3
| | | | | | | | | | | | | | | | | | | | Harrogate asked for NYCC managed issues to be linked to that council's website. We don't prevent the issue from being logged, but do show a warning banner. As this is at Harrogate's request, we only do this for the Harrogate cobrand, not the whole site, using a new cobrand hook `munge_category_list` Unfortunately, categories are currently passed to the template as plain text, e.g. not structured data. As a simple implementation, we append "( NYCC)" to the appropriate category names. JS could then strip the names back in future, if required (though we're not doing this.) Instead we add a jQuery hook to show the most appropriate link provided. See https://github.com/mysociety/FixMyStreet-Commercial/issues/703
* [fixmystreet.com] Remove special Report-It code.Matthew Somerville2015-03-13-25/+0
|
* Add URLs for easy looking at confirmation pages.Matthew Somerville2015-02-19-2/+39
|
* Always show confirmation page for reports/updates.Matthew Somerville2015-02-19-27/+8
| | | | | Rather than redirecting to the report if they're already logged in. Fixes #1003.
* Merge in installation changes.Matthew Somerville2015-02-16-1/+6
|\ | | | | | | Fall back better if a couple of things aren't installed.
| * Have code fallback to Image::Size if no jhead.Matthew Somerville2015-02-05-1/+6
| | | | | | | | Don't bother installing it on Travis.
* | Merge branch 'issues/fms-mobile/190'Matthew Somerville2015-02-13-41/+23
|\ \ | | | | | | | | | | | | Conflicts: perllib/FixMyStreet/Geocode/Google.pm
| * | Make sure all co-ordinates are stringified.Matthew Somerville2015-02-13-41/+23
| |/ | | | | | | | | | | | | 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.
* / Create timezone objects only once at startup.Matthew Somerville2015-02-13-1/+1
|/ | | | | | Cache a DateTime::TimeZone::Local object, so that in an environment where /etc/localtime is a copy of a timezone file, we don't repeatedly walk all the timezone files to find the matching one.
* Rename 'body_edit' admin endpoint to 'body'.Matthew Somerville2015-01-20-5/+4
|
* Add admin navigation link to Configuration page.Matthew Somerville2015-01-20-2/+2
|
* Merge branch 'remove-need-for-site-title'Matthew Somerville2015-01-19-1/+2
|\
| * Move site_title function to site-name web templateMatthew Somerville2015-01-19-1/+2
| | | | | | | | | | | | | | This matches the email template behaviour, and makes it much easier to override without requiring a cobrand package file. Fixes #979.
* | 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.
* Use same handling for cron and non-cron email.Matthew Somerville2015-01-13-0/+2
| | | | | This means that e.g. SMTP authentication is used when set up by all emails, not just non-cron ones. Fixes #988.
* Version 1.5.2.v1.5.2Matthew Somerville2014-12-17-24/+19
| | | | | | | Includes: * [UK] Don't show topic form field when reporting abuse. * Use token in moderation response URL to prevent hidden report leak. * Make sure successful submission page is full width.
* 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.
* Show logged in message as success, not error.Matthew Somerville2014-11-18-3/+4
| | | | | | Fixes #357. Also consolidate almost-identical fill_in_details.html template (for #344).
* Only show text on /reports if appropriate.Matthew Somerville2014-11-14-5/+9
| | | | | Only show "select..." if more than one body, and only mention greyed out lines if there are any. Fixes #869.
* Remove unused variable.Matthew Somerville2014-11-07-1/+0
| | | | | Also, s///r isn't present in 5.10, and FixMyStreet should still install on squeeze.
* Category should be escaped in RSS feeds.Matthew Somerville2014-10-24-1/+1
| | | | In case it contains an ampersand or somesuch.
* Allow filtering by category on All Reports page.Matthew Somerville2014-10-24-0/+6
| | | | If you know to change the URL, anyway, for now.
* [fixmystreet.com] Experiment, no pins by default.Matthew Somerville2014-10-17-10/+6
| | | | | | | | This changes the default flow to show no pins and a message about reporting, with the second tab displaying existing problems (and showing map pins). Those existing problems are the ones that would currently be on "problems on the map" followed by those currently on "problems nearby".
* [fixmystreet.com] Remove login content experiment.Matthew Somerville2014-10-17-5/+1
| | | | This gave no conclusive results, which was interesting.
* Paginate admin search results.Matthew Somerville2014-10-13-22/+22
|
* [FixMyStreet.com] Add information for councils.Matthew Somerville2014-10-09-2/+2
| | | | Fixes #765.
* Validate category name/email/note in admin.Matthew Somerville2014-10-08-1/+10
| | | | This prevents the creation of a category with a blank name. Fixes #556.
* Move bromley from report hiding to moderationHakim Cassimally2014-08-14-0/+13
| | | | | | | | | The feature to hide reports is still enabled, as it is used by other `users_can_hide` bodies. As we want to roll out moderation to Bromley, in this commit we hide the functionality *only* for Bromley. Of course if we migrate those other users to this moderation method, then we will need to make equivalent change to general template, and remove the functionality from Report.pm.
* Tests for moderationHakim Cassimally2014-08-14-1/+1
|
* Report moderationHakim Cassimally2014-08-13-1/+384
| | | | | | | | | | | - redaction marked with [...] - of report and comments - stores original data - uses a single form, on the report/_main view - requires additional permissions (user_body_permissions) - Hide report functionality - Moderation notification/contact form - Moderation writes to admin_log
* Add fixmystreet.com reporting form A/B tests.Matthew Somerville2014-07-10-1/+5
| | | | | | Testing two things: * Putting the email box above the Yes/No, or repeating it inside. * Showing the contents of the Yes/No sections at first, or not.
* Merge branch '571-show-local-deploys-banner'Matthew Somerville2014-07-04-0/+16
|\ | | | | | | | | Conflicts: web/cobrands/fixmystreet/base.scss
| * Display a banner to non UK FixMyStreet visitorsStruan Donald2014-07-03-0/+16
| | | | | | | | | | | | only on FMS and only if from outside the uk Fixes #571
* | 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
* Better spotting of signing in on /auth form.Matthew Somerville2014-06-20-2/+4
| | | | | | | | | If your browser autocompleted form fields, you could fill in the signing in part of the form but still be sent a confirmation email. This commit will now default to trying to sign in if the sign in button is clicked or there is data in the signing in password field. Fixes #816.
* Add MAPIT_GENERATION variable, to pin whitelist.Matthew Somerville2014-05-16-2/+9
| | | | | | Otherwise, when MapIt Global is updated, the 'point' lookup, as it only returns the current generation by default, might no longer return the areas present in the whitelist.
* Allow '\n' and other binary chars in dashboard CSVDave Arter2014-04-29-2/+2
| | | | | | | | | | | | By default, Text::CSV doesn't allow binary characters such as newline, carriage return etc., in cells. This causes issues when exporting data that contains these characters, such as problem reports with more than one line. This commit also explicitly tells Text::CSV to append a newline to each row instead of joining the rows together with this char at the end. Fixes #494.
* Remove Barnet-specific category lookup & checksDave Arter2014-04-25-14/+7
|
* Also remove cached file when photo removed.Matthew Somerville2014-04-17-5/+6
|
* Merge branch 'improve-contact-form'Struan Donald2014-04-17-0/+5
|\
| * Add a who are you trying to contact option to contact formStruan Donald2014-04-15-0/+5
| | | | | | | | | | | | | | | | | | | | | | In order to try and cut down on people mistakingly using this form to try and contact their council all some 'who are you trying to contact' options to the form that display appropriate messaged unless the 'FMS team option is selected. Add the validation code for this in the cobrand module. Fixes #41
* | alter pave url sent to analytics on report completionStruan Donald2014-04-16-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to allow us to do funnel analysis in google analytics we need to send a differnt page url when a user completes a report. To do this we add a report_created=1 to the query string on either the report page or the report confirmation page for logged in and confirm by email users respectively. There's a bit of complication as we don't want to set a session cookie everywhere as that will break caching so we set a stash variable, although if the user is logged in this is controlled by a variable in the flash as there is already a session cookie at this point. also, removes the code that sends an event upon report completion as this was no use for funnel analysis.
* | Merge branch 'zerotb'Struan Donald2014-04-11-1/+13
|\ \
| * | Use flags to indicate type of location errorStruan Donald2014-04-08-0/+4
| | | | | | | | | | | | | | | | | | | | | This makes it a bit easier to override the message in templates which makes it a bit easier for cobrands. Leaves the default error message in location_error stash key which should prevent any existing logic breaking.
| * | Allow comments to be confirmed with no confirmationStruan Donald2014-04-08-1/+9
| |/ | | | | | | | | | | | | | | Add never_confirm_updates setting to cobrand that, when set to 0 means that comments are confirmed with no confirmation step. Essentially behaves as it would if the user was logged in. Also add a flag to the flash that indicates the comment was accepted to you can display a message on the report page if required
* / Fire a google analytics event on report completionStruan Donald2014-04-09-0/+2
|/ | | | | | | | At the moment it's hard to use google analytics to track when someone has completed a report due to the various redirects which can occur too quickly for the analytics javascript to fire. So now we fire an event if we've set a flash value. This also allows us to track how they created the report.
* Use local DateTimes in dashboard and its tests.Matthew Somerville2014-04-07-8/+9
| | | | | Otherwise oddities arise due to summer time differences putting a BST now-6d23h time behind a UTC now+1s-1w.
* Allow cobrands to set their own path to pin filesHakim Cassimally2014-03-25-1/+1
| | | | | | | | | New cobrand function of pin_path that sets the path to where the image files for pins are located. Defaults to /i This still means they need to use the same file names but they can at least put those in a cobrand directory rather than having to overwrite the files in /i or fudge it with pin_colour
* Set report->send_questionnaire on report creationAndy Lulham2014-03-12-0/+1
| | | | | Include a one-off script that sets send_questionnaire to 0 for all available cobrands that have send_questionnaires set to 0.