aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
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.
* Remove risk of infinite loop in PhotoSet.Matthew Somerville2015-12-16-9/+13
| | | | | | Use a separate attribute for data direct from a database row when creating a PhotoSet, so that data will always contain one or more photo IDs.
* Fix cobrand restriction of My/Nearby.Matthew Somerville2015-12-15-44/+58
| | | | | | | | | | | | 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
|
* Pass in EmailSend arguments as a hashref.Matthew Somerville2015-12-02-3/+4
| | | | | A fix to bb1e797; when started via a Catalyst model, e.g. send_email in FixMyStreet::App, an empty hashref is passed in.
* Merge branch 'reduce-fixmystreet-app'Matthew Somerville2015-12-02-992/+1030
|\
| * Move main bin scripts to separate packages.Matthew Somerville2015-12-02-688/+738
| | | | | | | | Maintain old location wrappers.
| * Remove many uses of mySociety::Config.Matthew Somerville2015-12-02-18/+17
| |
| * Move from Moose to Moo in non-App code.Matthew Somerville2015-12-02-49/+33
| | | | | | | | And create default cobrand class without all of Moose.
| * Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-61/+59
| | | | | | | | Command line scripts don't need a full blown app, just database.
| * Move get_photo_params to Utils::Photo.Matthew Somerville2015-12-02-40/+4
| |
| * Move EmailSend out of Catalyst for use elsewhere.Matthew Somerville2015-12-02-182/+225
| |
* | [Zurich] Allow status page to fetch summary stats.Matthew Somerville2015-12-01-0/+3
| |
* | [Zurich] Include problem extra fields in CSV downloadDave Arter2015-11-18-1/+14
| | | | | | | | | | Some categories ask the user for extra information such as street or house number; these are output in the CSV if the report includes them.
* | [Zurich] Generate the CSV header the same way as normal rowsDave Arter2015-11-18-1/+29
| |
* | [Zurich] Add 'closure status' to admin report CSVDave Arter2015-11-18-2/+4
|/
* 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.
* Merge branch '1251-json-status-page'Matthew Somerville2015-10-23-24/+104
|\
| * Add status page.Matthew Somerville2015-10-23-0/+70
| |
| * Speed up admin front page.Matthew Somerville2015-10-23-24/+34
| | | | | | | | | | | | | | | | * 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;
* | Merge branch '1141-list-css-part-4'Matthew Somerville2015-10-09-2/+2
|\ \ | |/ |/|
| * Improve item list CSS.Matthew Somerville2015-10-09-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Generally, a rewrite of issue-list-a to item-list--reports or item-list--wards (two different uses) and issue-list to item-list--updates, with subsequent renames/changes to children. For those cobrands using a different list showing a pin icon, use item-list__item--with-pin to stop needing to override existing classes. Fix a variety of niggling issues e.e ward list display, or overloading of the .text class.
* | Prevent template errors from being logged twice.Matthew Somerville2015-10-09-1/+10
|/ | | | | | Catalyst::View::TT calls both c->log->error and c->error; the former logs immediately, while the latter stashes the error, and then calls c->log->error with it during finalize.
* 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-18/+17
| |
* | [Zurich] Set report's public response before sending email to userDave Arter2015-10-06-5/+5
| | | | | | | | | | | | | | | | The 'public response' to a problem was being omitted from the email sent to the user when the problem is closed, because the email was sent before the report's 'extra' field was updated with the response body text. This commit sets the public response on the problem before sending the email.
* | Base 64 decode uploaded images if requiredSteven Day2015-10-06-1/+20
| | | | | | | | | | | | | | | | | | | | | | The new Zurich app has to base64 encode some images into a multipart request so that it can (ab)use Phonegap's FileTransfer plugin to send more than one image in a single request to /report/new/mobile. Catalyst's Request::Upload module doesn't look at the Content-Transfer-Encoding header inside multipart requests to do this automatically, so we perform the decoding manually when we process the images in the PhotoSet model.
* | [Zurich] Don't include external messages in a report's internal notices sectionDave Arter2015-10-06-0/+2
| | | | | | | | See mysociety/FixMyStreet-Commercial#674, mysociety/FixMyStreet-Commercial#673
* | [Zurich] Display message sent to user when report is closedDave Arter2015-10-06-5/+16
| | | | | | | | | | | | On the report admin page, include the message the user received when the report was closed. See mysociety/FixMyStreet-Commercial#718
* | [Zurich] Keep DM on report edit page after closing reportDave Arter2015-10-06-2/+2
| | | | | | | | See mysociety/FixMyStreet-Commercial#690
* | [Zurich] Make sure external/competent body message is savedDave Arter2015-10-06-1/+5
| | | | | | | | | | | | | | - Only send external_message when the problem state has the correct value - But make sure the message is preserved for editing when problem state is 'planned' See mysociety/FixMyStreet-Commercial#718
* | Allow MAP_TYPE to be overridden by testsDave Arter2015-10-06-0/+10
| |
* | [Zurich] Add maps to Zurich admin report print viewZarino Zappia2015-10-06-31/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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] UI improvements for DM/SDM report edit adminZarino Zappia2015-10-06-4/+4
| | | | | | | | | | | | | | | | | | | | | | - Styling for "Updated!" message The message shown on form submission no longer pushes both columns down, and disappears after 5 seconds. - Make "time spent" labels inline to save space - Simplify display of report admin category dropdown - Change order of report admin inputs for Division Managers See mysociety/FixMyStreet-Commercial#690
* | [Zurich] Tweaks to redirectHakim Cassimally2015-10-06-20/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-54/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] Updated email templatesMatthew Somerville2015-10-06-0/+20
| | | | | | | | | | | | | | - submit-external-wish.txt includes a link with report's coordinates, template values are interpolated Conflicts: perllib/FixMyStreet/SendReport/Zurich.pm
* | [Zurich] admin workflow changes available statesHakim Cassimally2015-10-06-12/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See mysociety/FixMyStreet-Commercial#690 - external_message for Extern/Wunsch states - as per PDF mockups, the "public response" field is now editable from more states, namely: - Ruckmeldung ausstehend - Extern - Zustandigkeit unbekannt - Wunsch - Nicht kontaktierbar - Unsichtbar - test fixes NB: slight hack to reorder Zurich report_display tests As these remove 'investigating' from hidden_states, these break tests for default cobrand (the FMS::App code expects to be called once on request start, not multiple times within one test) - Not contactable button and tests for this and the similar `send_back` functionality (previously untested). NB: Unsure why we need to specify form_number=2 just for these submits, but test won't find the buttons otherwise. - Make sure SDMs' "time_spent" figure is recorded. (See mysociety/FixMyStreet-Commercial#718)
* | [Zurich] new status flagsHakim Cassimally2015-10-06-8/+31
| | | | | | | | | | | | | | 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/+19
| | | | | | | | | | | | | | | | 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-5/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-10/+170
| | | | | | | | | | | | | | This provides a ResponseTemplate model that an admin/staff user can choose from when responding to problems. For mysociety/FixMyStreet-Commercial#671.
* | [Zurich] Attach images to external bodyHakim Cassimally2015-10-06-1/+27
| | | | | | | | See mysociety/FixMyStreet-Commercial#675
* | Allow attachment of emails in email_sendHakim Cassimally2015-10-06-2/+89
| | | | | | | | Required by Zurich for mysociety/FixMyStreet-Commercial#675