aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
Commit message (Collapse)AuthorAgeLines
* Determine location before possible redirect.Matthew Somerville2016-10-04-1/+1
| | | | | | If you changed the around filters on a URL with latitude/longitude, the co-ordinates were not passed through as determine_location needed to be called first.
* Don't show deleted bodies on /reports.Matthew Somerville2016-10-04-1/+3
|
* Merge branch 'issues/forcouncils/36-mobile-inspector-improvements'Matthew Somerville2016-10-04-25/+42
|\
| * Handle extra field updates on report inspect pageDave Arter2016-10-04-23/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to make sure the extra metadata stored on a problem is kept in sync with the requirements of the category the report is in. Thus, if a report is moved to a category that collects extra metadata then the appropriate input fields should be shown so the inspector can enter the data. This commit shows the category extra HTML elements for every selectable category on the inspector page hiding those that don't apply to the selected category. JS is used to show/hide the extra fields when the category dropdown is changed. A consequence of the implementation is that any extra metadata from the original category is lost when the category is changed. Some thought was given to storing the old values elsewhere in the problem's extra field but I decided against this for the time being. For mysociety/fixmystreetforcouncils#45
| * Remove separate “Public update” form sectionZarino Zappia2016-10-04-1/+1
| | | | | | | | | | | | Inspectors can now tick the optional “Save with a public update” checkbox, to reveal the “Public update” textarea. This means there is no longer a need for two separate submit buttons.
| * Restructure Inspect form into logical sectionsZarino Zappia2016-10-04-1/+1
| | | | | | | | | | | | | | | | IDs and locations at the top, then location-related actions (including a new “navigate to this problem” button), then status and category inputs (since these can have an effect on how we display the rest of the form), then any status/category-related inputs, and finally inputs for internal details like priority and traffic management.
* | Include CORS cross-origin header in RSS output.Matthew Somerville2016-09-27-0/+1
| |
* | Update user reputation when inspecting reportDave Arter2016-09-23-0/+7
| |
* | Add UI for managing category reputation thresholdDave Arter2016-09-23-0/+3
|/
* Some minor admin fixesDave Arter2016-09-23-1/+1
| | | | | - Superusers couldn't view response priorities due to invalid $c->forward call - Navigation to other areas of admin was broken on response priority admin pages
* Merge branch 'issues/forcouncils/7-custom-open311-attributes'Matthew Somerville2016-09-20-34/+49
|\
| * Only include relevant bodies upon category choice.Matthew Somerville2016-09-20-34/+38
| |
| * New section headings in report form.Zarino Zappia2016-09-20-1/+12
| | | | | | | | | | The report form is now split into "Public" and "Private" sections, with a third, matching heading, for the category_extras, if shown.
* | Add ‘trusted’ flag allowing users to make reports directlyDave Arter2016-09-20-2/+31
| | | | | | | | | | When a trusted user makes a report in a category that requires inspection, it'll be sent immediately (i.e. without being inspected first).
* | Remove from_body requirement from User::has_permission_toDave Arter2016-09-20-10/+10
| |
* | Don't reject email when editing Open311 contactsDave Arter2016-09-20-2/+6
| | | | | | | | Fixes (the first part of) #1138.
* | Fix admin user search for non-superusersDave Arter2016-09-16-9/+11
| |
* | [Zurich] Restore admin user edit functionalityDave Arter2016-09-16-2/+2
| | | | | | | | | | | | - Zurich users don't need permission to access user_edit page - from_body can be set to any body by Zurich admin users, not just their own - Don't show the area field on user_edit form
* | Allow contact form recipient override.Matthew Somerville2016-09-15-0/+4
|/
* Allow contact form to include extra fields.Matthew Somerville2016-09-13-0/+7
|
* Require inspector to provide update when instructing reportDave Arter2016-09-12-3/+26
| | | | | | | This adds an update field to the bottom of the inspect form, requiring the inspector to provide an update to be added to the report as it's sent. See mysociety/fixmystreetforcouncils#64
* Add new category_edit restriction for viewing body admin.Matthew Somerville2016-09-09-3/+9
|
* Admin flagged page for superusers only.Matthew Somerville2016-09-09-8/+7
| | | | Adapt code so that it could be opened up more in future.
* Better generic 403/404 pages.Matthew Somerville2016-09-09-11/+11
| | | | Stop IDs being shown on 404 pages, provide a nicer message on 403 pages.
* Merge branch 'issues/forcouncils/72-show-extra-data'Matthew Somerville2016-09-09-8/+1
|\
| * Improve display of category extra data in admin.Matthew Somerville2016-09-09-8/+1
| | | | | | | | Allow get_extra_metadata to return all the data with no argument.
* | Add manage screen for editing priority/category.Matthew Somerville2016-09-09-38/+47
|/ | | | | | | This is a cut-down version of the full inspect screen. We truncate the co-ordinates just in case (they should be anyway but e.g. the test report isn't).
* Refactor problem response priority into its own modelDave Arter2016-09-09-12/+110
| | | | | | | This moves the response priority values from a cobrand-specific method to a full DB model, and includes management screens in the admin for administering them. For mysociety/fixmystreetforcouncils#66
* Add ‘Inspection required’ field to categoriesDave Arter2016-09-09-2/+12
| | | | | | | | | | | Categories can now require reports to be marked as 'inspected' via the frontend before they're sent by send-reports. A side-effect here is that send-reports will perform an extra n queries for each report, where n is the number of bodies that report is being sent to, but hopefully in practice this won't matter as it's an offline cronjob. See mysociety/fixmystreetforcouncils#50
* Simplify some permissions logic with extra helper methodDave Arter2016-09-08-6/+5
|
* Extend response templates to work across all cobrandsDave Arter2016-09-08-36/+66
| | | | | | | | | | | This builds on the response templates in the Zürich cobrand: - Allow response templates to be assigned to categories - Also adds a auto_response flag, which will be used to automatically create updates when reports are made. - Include response templates select box on update form For mysociety/fixmystreetforcouncils#31
* Add inspector report detail viewDave Arter2016-09-06-9/+162
| | | | | | | | | | | | | Users with the `report_inspect` permission can click a new 'inspect' button on a report page to input more detailed problem information into a new form that appears in a column alongside the report detail. - Inspector data is stored in problem's 'extra' field - Report category/state can be edited - Location can be changed by dragging the pin or HTML5 geolocation (Factored out Zurich admin pin drag into own function) For mysociety/fixmystreetforcouncils#22
* Automatically spot Open311 co-ord/ID attributes.Matthew Somerville2016-08-24-2/+2
|
* Allow user to have an area assigned in adminDave Arter2016-08-22-1/+38
|
* Allow searching for reports with ref: prefix in postcode fieldDave Arter2016-08-22-0/+23
| | | | | | | | | Searches the `id` and `external_id` fields. This takes you directly to the report if only a single report matches, otherwise a disambiguation page is shown. For mysociety/fixmystreetforcouncils#16
* Add user planned reports.Matthew Somerville2016-08-22-6/+66
| | | | | | A user with the appropriate permission can add/remove reports from their list of planned reports using a button on a report page. The list can be viewed at /my/planned.
* Get contribution state from server with map click.Matthew Somerville2016-08-19-0/+10
| | | | This makes sure the correct dropdown is shown.
* Restrict admin config/stats pagesDave Arter2016-08-17-21/+9
| | | | | The config page is only accessible by superusers. The stats page only shows figures for the user’s from_body unless superuser.
* Allow user permissions to be granted/revoked in adminDave Arter2016-08-17-3/+26
|
* Restrict from_body editing to superusersDave Arter2016-08-17-1/+9
| | | | | | | Superusers can set a user's from_body to any value, but a normal staff user can only set another user's from_body to the same as their own or undefined. This is presented in the UI as a 'staff' tickbox.
* Restrict user editing in adminDave Arter2016-08-17-3/+9
| | | | | | | | The 'user_edit' permission is required to edit users. The admin pages on UK council cobrands only allow editing of users whose from_body is the same as the logged-in user, or who have sent reports or updates to the council.
* Require 'report_edit' permission for editing reports in adminDave Arter2016-08-17-0/+7
|
* Remove unused category_extras_json code.Matthew Somerville2016-08-16-1/+0
|
* Remove some unused code/ database handle.Matthew Somerville2016-08-12-26/+1
|
* Direct report moderated emails correctly.Matthew Somerville2016-08-10-7/+3
|
* Merge branch 'issues/forcouncils/10-report-as-dropdown'Matthew Somerville2016-08-10-11/+74
|\
| * Feature to create report as body/other user.Zarino Zappia2016-08-10-11/+74
| | | | | | | | | | | | | | | | | | | | | | | | This allows users who have the correct permissions to add reports on behalf of the body or another user. We enable editing of the email box by default, so that if JavaScript isn't available, someone can still change the email for the 'another user' option. For mysociety/fixmystreetforcouncils#10 and mysociety/fixmystreetforcouncils#11
* | Add config for Open311 request limit, default 1000.Matthew Somerville2016-08-10-3/+4
|/ | | | Fixes #1313.
* Fix other "keys on reference" warning.Matthew Somerville2016-08-08-1/+1
| | | | This is a continuation of b45b29c8.
* Add HTML email templates.Matthew Somerville2016-08-01-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | Design is all Zarino. This adds the ability to send HTML emails, including attached inline images. When included, this is done as a multipart/related email containing a multipart/alternative (of plain and HTML) and any attached images, so that the images are available even if HTML mail is not. The alert emails list data has been improved so it can be constructed in the templates rather than the code. Various templates have been tidied. Various workarounds for email clients have been made, including: * <th> is used so that the Android 4.x mail client can give them `block` styling in the small screen media query. * Font settings defined on every table cell (<th>) so that sans-serif fonts are used in Outlook, rather than Times New Roman. * A three-column wrapper table to create a 620px centred content area that also shrinks down on narrow screens. (Outlook doesn’t like max-width, so this is the simplest alternative.) * Enforcing a sensible (500px) min-width for the main content area, on clients that don’t support media queries (eg: native Gmail app). * Giant borders on buttons so Outlook displays them * Image alignment with align rather than float.