aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
Commit message (Collapse)AuthorAgeLines
* Remove unnecessary code, as ID is always a number.Matthew Somerville2016-01-06-6/+0
|
* Fix bug showing reports on Your Reports.Matthew Somerville2015-12-17-2/+2
| | | | | 92dfeac used an incorrect user column name in the new lookup, and there was no test to catch the regression.
* Add multiple photo upload support.Zarino Zappia2015-12-16-12/+35
| | | | | | | | | | Three file inputs, progressively enhanced with dropzone. This moves the photo input higher up, so that photos can upload while you're filling out the form. It standardises and improves photo error handling. [fixmystreet.com] Guidance for what photos should and shouldn’t include.
* Fix cobrand restriction of My/Nearby.Matthew Somerville2015-12-15-12/+7
| | | | | | | | | | | | 5c79337 simplified a bit too far, as after then a particular cobrand could in Nearby and My only filter reports to a particular body, not any other criteria. To fix this, introduce more generic functions in the default cobrand to allow more flexibility. Make sure a few tests delete their bodies fully so that new tests pass when run as part of the suite. Fixes #1289.
* Make sure email and name are given in admin form.Matthew Somerville2015-12-09-8/+14
|
* Merge branch 'reduce-fixmystreet-app'Matthew Somerville2015-12-02-3/+2
|\
| * Remove many uses of mySociety::Config.Matthew Somerville2015-12-02-1/+1
| |
| * Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-2/+1
| | | | | | | | Command line scripts don't need a full blown app, just database.
* | [Zurich] Allow status page to fetch summary stats.Matthew Somerville2015-12-01-0/+3
|/
* Add generic static route handler.Matthew Somerville2015-10-29-42/+76
| | | | | This puts all static pages under /about, and lets you add new static pages by placing new HTML in your about template directory.
* Add status page.Matthew Somerville2015-10-23-0/+70
|
* Speed up admin front page.Matthew Somerville2015-10-23-1/+3
| | | | | | | | * Don't show a categories summary unless asked via a link * Don't needlessly join in questionnaire/update summaries * Switch count(distinct()) to a subselect as it turns out select count(*) from (select distinct(user_id) from problem) temp; is a lot quicker than select count(distinct(user_id)) from problem;
* Add state/category filters to base cobrand.Matthew Somerville2015-10-07-9/+5
| | | | | | | This removes the on map/nearby tabs, replacing them with one combined list. The styling is moved to the base, so that it is used on mobile too. A closed option is added to the existing dropdown, and the base/fixmystreet my templates are also combined. Fixes #1141.
* Merge branch '1141-list-css'Matthew Somerville2015-10-07-1/+1
|\
| * Combine some base/fixmystreet templates.Matthew Somerville2015-10-07-1/+1
| | | | | | | | | | | | | | | | The aim is to combine base and fixmystreet as much as possible, providing enough template/styling hooks for any cobrand. This commit removes the need for separate base/fixmystreet templates for the front page, almost all of the /around templates, the open graph headers, and the low level item list templates.
* | [Zurich] Fix map on /reportsDave Arter2015-10-06-0/+1
| |
* | Fix display of comment photosDave Arter2015-10-06-4/+24
| | | | | | | | | | These still use the old method of storing photos, not PhotoSet, and so don't have a get_photoset method.
* | [Zurich] Use FMS::App->get_param() instead of req->paramDave Arter2015-10-06-8/+7
| |
* | [Zurich] Add maps to Zurich admin report print viewZarino Zappia2015-10-06-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Includes a small map at the top of the first page and a second full-width map on a separate page. - upgrades tiles to the new 512px ones already used by JS as implemented in https://github.com/mysociety/FixMyStreet-Commercial/issues/668 - Uses jQuery to clone a copy of the "noscript" map elsewhere into the DOM, because the original is too far from where we need it. - extracts maps/openlayers.html to call maps/noscript_map.html - specialises the Zurich version to allow a richer structure to be returned, including arbitrary sized map - Map::Zurich now returns nearly arbitrary sized map tiles - second larger map is prepared (only for admin/report_edit) See mysociety/FixMyStreet-Commercial#677
* | [Zurich] Tweaks to redirectHakim Cassimally2015-10-06-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See mysociety/FixMyStreet-Commercial#690 I understand redirection to summary page was introduced at ZWN's request, to make it easy to process reports and then quickly move onto the next one. However, during testing now, Tobias has mentioned this is a) slowing things down and b) confusing because it's not obvious that the report has been saved. I've tried to address (b) by adding the "Aktualisiert!" message when you are redirected. Also, for (a) I've removed the redirection from a few cases, and disabled it for superuser. If need be, I can remove redirection from more (or all) cases. Fix Official answer/Reply to user - hide label for status update on state change - correct wording on button for closure (single wording) - correct wording on label for user reply (either "Official answer" or "Reply to user" as appropriate) - Make sure the official response texts are shown for edit/static as appropriate, and test. - javascript improvements - honour public status update for Extern/Wunsch too - don't show public message for Wunsch - Ignore all other fields when rotating photos. (See mysociety/FixMyStreet-Commercial#718)
* | [Zurich] additional closure statuses workHakim Cassimally2015-10-06-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requirements: ============= 1: DM to be able to mark a problem as Wish, Extern, Not contactable, Hidden, Jurisdiction unknown 2: SDM to be able to mark a problem as Not contactable. 3: DM to be able to add information to such a problem, and trigger emails to external agencies, and to user, closing the problem at the same time. 4: Closed reports must be categorized as Wish/Extern/NC/Hidden/JU for statistical reporting 5: Non-closed reports must appear as open, to allow DM to see them in the list, similar to what is currently done for Ruckmeldung Ausstehend (Feedback outstanding). 5b: however "Hidden" problems must be immediately hidden from public view. Proposal: ========= a) Requirement 1 will be carried out in exactly the same way by DM. e.g. Category dropdown select b) Requirement 2 will be carried out in exactly the same way by SDM. e.g. "Not contactable" button c) BUT, for a), c), the category will be diverted to "Ruckmeldung Ausstehend" (Feedback outstanding), and metadata will be saved with the appropriate closure type. d) NOTE: this means the report will still be visible to public as "In bearbeitung" (Except for Hidden reports, as per 5b) e) The extra fields will be presented on the "Ruckmeldung Ausstehend" page, just as defined in the PDF, depending on the metadata. e.g. - Wish: Zustaendige Stelle + Message - Extern: External body + Message2 - Not contactable: (no extra info) - Hidden: (no extra info) - Jurisdiction unknown: (no extra info) f) When the DM publishes the answer (e.g. "Antwort Veroeffentlichen" button), the state will normally change to Fixed. BUT in the new cases, the metadata saved in step c) will be checked, and the report will change state to Wish/Extern/Not contactable/Hidden/Jurisdiction unknown, as appropriate. The report will now be visible/hidden as previously discussed depending on the new state. g) If the report is edited again (in /admin/report_edit) it will be in the relevant state, and any extra fields will be visible as per e). Those fields may be updated. Alternatively, the state may be changed, possibly triggering a) again, and clearing any metadata. - Fix javascript interactions 690 - show new statuses in summary - fix photos on SDM page - fix Planned => Planned+metadata transition - stop "assignation .select" js affecting templates - fix redirection for Extern and generally See mysociety/FixMyStreet-Commercial#672, mysociety/FixMyStreet-Commercial#690
* | [Zurich] new status flagsHakim Cassimally2015-10-06-3/+10
| | | | | | | | | | | | | | Have moved the generation of banner text from the template into problem_as_hashref See mysociety/FixMyStreet-Commercial#672
* | [Zurich] prevent invalid bodies_strHakim Cassimally2015-10-06-2/+17
| | | | | | | | | | | | | | | | See issue in mysociety/FixMyStreet-Commercial#663 with problems not appearing in the "Erfasst" filter. It looks like Zurich requires a single id in the `bodies_str` (like '4'), and may rely on the configuration of bodies/contacts in database to be perfect to avoid them becoming something like '4|47,48'.
* | Add "time spent" admin logging.Hakim Cassimally2015-10-06-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mechanism is general, but current implementation only used for Zurich. - Zurich: Record time_spent field mysociety/FixMyStreet-Commercial#676 - template changes (including jQuery spinner) - backend changes to save data are made: - in log_edit, if supplied - and time on category change (and arbitrary actions) - Add update_admin_log to all paths for DM, ensuring that it gets called, while resetting the `time_spent` parameter, to make sure that there is never a duplicate record created. - Also quell warning about using DateTime values in query. - Also add (seemingly unrelated) parens to stop misparsing of OK line in questionnaire test now that DT::Format::Pg is used in Zurich cobrand See mysociety/FixMyStreet-Commercial#676
* | [Zurich] Response templates for report admin.Hakim Cassimally2015-10-06-0/+79
| | | | | | | | | | | | | | This provides a ResponseTemplate model that an admin/staff user can choose from when responding to problems. For mysociety/FixMyStreet-Commercial#671.
* | [Zurich] 'photo required' functionalityDave Arter2015-10-06-0/+47
| | | | | | | | | | | | | | | | | | | | | | - Save 'photo_required' value in Contact->extra from admin edit form - Enforce per-category photo requirement on new reports A new step has been added to the photo upload process that ensures a photo is present if any of the categories chosen for the report require it. If the photo is missing an error is displayed to the user in the same manner as if the photo upload was invalid. - Add test of mandatory photo categories
* | Add support for multiple photos per report.Hakim Cassimally2015-10-06-139/+51
| | | | | | | | | | | | | | | | For Zurich, see mysociety/FixMyStreet-Commercial#664. This commit includes a new PhotoSet class (NB: called Model:: though not really a model), should handle binary data (e.g. old style photos in database), fileids (40-char hash), and Catalyst::Upload objects.
* | [Zurich] Vary confirmation email wording if address is confirmedHakim Cassimally2015-10-06-0/+3
|/ | | | See mysociety/FixMyStreet-Commercial#669
* Exclude deleted categories from the all reports page filtersSteven Day2015-10-01-1/+1
|
* Merge remote-tracking branch 'origin/blank-questionnaire-text'Matthew Somerville2015-09-28-0/+2
|\
| * Process update left as part of questionnaire.Matthew Somerville2015-09-28-0/+2
| | | | | | | | | | | | | | Treat an update left during a questionnaire the same as one left on a report page, ie. pass it through cleanup_text. This will also make sure updates left that are wholly whitespace are errored, or replaced with the default text.
* | Merge branch '1205-hardcoded-site-name'Matthew Somerville2015-09-28-2/+1
|\ \
| * | Remove remaining hardcoded site name from strings.Matthew Somerville2015-09-28-2/+1
| |/ | | | | | | Add a site_name template parameter available to all templates.
* / Send altered confirmation email if not being sent.Matthew Somerville2015-09-28-1/+4
|/ | | | Fixes #1210.
* If a sign-in button explicitly clicked, use it.Matthew Somerville2015-09-21-3/+5
| | | | Fixes #1091.
* Add way to see "Please check your email" pages.Matthew Somerville2015-09-17-0/+11
| | | | This makes testing easier.
* Use base URL in cobrand alert for no-body report.Matthew Somerville2015-09-03-5/+1
| | | | | | If a cobrand has a body restriction, then a report without any body won't be shown on it, so we need to make sure links to the report (in email alerts and RSS) are to the base URL, not the cobrand.
* Merge branch '1070-dmarc-workaround'Matthew Somerville2015-08-19-7/+12
|\
| * Test for DMARC when sending report email.Matthew Somerville2015-08-19-3/+12
| |
| * Add default sender to send_email_cron.Matthew Somerville2015-08-19-4/+0
| | | | | | | | | | Matches send_email, remove unneeded setting of sender in one call, and add contact name to report sent email.
* | Simplify/consolidate body restriction db code.Matthew Somerville2015-08-19-60/+29
| | | | | | | | | | | | | | Make dashboard work properly in two-tier councils, showing reports sent to both. Create an index on the array of the bodies_str column to speed up performance, and use that throughout the code replacing all LIKE scans. This also enables a simplifying tidy of the restriction code.
* | Use ResultSet/cobrand->problems where appropriate.Matthew Somerville2015-08-19-2/+2
| | | | | | | | Fixes #893.
* | Move "missing" handling to separate column.Matthew Somerville2015-08-19-4/+5
|/
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-25/+25
| | | | | This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
* Add mark as sent button to admin.Matthew Somerville2015-07-30-0/+7
|
* Allow body external URL to be edited in admin.Matthew Somerville2015-07-30-2/+2
|
* Merge branch 'issues/968-refusing-councils'Matthew Somerville2015-07-28-12/+51
|\
| * [fixmystreet.com] Unresponsive bodies page/warningMatthew Somerville2015-07-28-12/+51
| | | | | | | | | | | | | | | | | | Add a special category email address used to show an unresponsive message and page when trying to report in that category. Add a "Refused" send method for setting a whole body to be unresponsive and show the message immediately, not on category selection. Factor out category template, and put at top where needed.
* | Use get_param_list instead of get_param for body areasDave Arter2015-07-27-13/+7
|/ | | | | Because a body can cover more than one area, `area_ids` might contain multiple values when updating or creating a body.
* Alter token logging in and timeout behaviour.Matthew Somerville2015-07-10-30/+90
| | | | | | | Restrict email_sign_in token to one day, unused confirmation tokens to one month. Used tokens will redirect to the created thing but not log in; don't log in with alert links (unsubscribe link never expires, reply link will still show "reopen" tickbox).