aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin.pm
Commit message (Collapse)AuthorAgeLines
* Fix cobrand restriction of My/Nearby.Matthew Somerville2015-12-15-8/+4
| | | | | | | | | | | | 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
|
* 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;
* [Zurich] Use FMS::App->get_param() instead of req->paramDave Arter2015-10-06-7/+6
|
* [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)
* 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/+8
| | | | | | | | | | | - 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-39/+20
| | | | | | | | 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.
* Simplify/consolidate body restriction db code.Matthew Somerville2015-08-19-24/+9
| | | | | | | 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.
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-7/+7
| | | | | 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-1/+1
|\
| * [fixmystreet.com] Unresponsive bodies page/warningMatthew Somerville2015-07-28-1/+1
| | | | | | | | | | | | | | | | | | 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.
* Factor out all uses of param()/params.Matthew Somerville2015-07-07-96/+96
| | | | | | | Use a central get_param and get_param_list functions dependent on whether we're after a scalar or a list (almost always a scalar). This prevents any possibility of confusion where param() could return a list, or params->{} an arrayref.
* [fixmystreet.com] Remove special Report-It code.Matthew Somerville2015-03-13-3/+0
|
* 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
|
* Paginate admin search results.Matthew Somerville2014-10-13-22/+22
|
* 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.
* Also remove cached file when photo removed.Matthew Somerville2014-04-17-5/+6
|
* Remove cached photos if hidden in admin interface.Matthew Somerville2013-11-20-1/+9
| | | | | Use the internal hash URL of the photo so that it can still be seen in the admin interface.
* Version 1.3.v1.3Matthew Somerville2013-11-12-2/+2
|
* Include version number on admin config page.Matthew Somerville2013-11-12-0/+7
|
* Remove trailing whitespaceAndrew Black2013-11-07-1/+1
|
* Create a single date fields and parse as DD/MM/YYYYAndrew Black2013-11-07-17/+8
|
* Merge branch '389-report-search-ref' of ↵Matthew Somerville2013-11-04-0/+5
|\ | | | | | | https://github.com/andylolz/fixmystreet into andylolz-389-report-search-ref
| * Include external_id in admin reports search.Andy Lulham2013-10-17-0/+5
| | | | | | | | Fixes #389
* | Set confirmed timestamp on any admin unconfirmed state change.Matthew Somerville2013-10-25-1/+1
|/ | | | This fixes #527.
* [Zurich] Add user email address validation to the adminChris Mytton2013-10-15-0/+10
| | | | Closes mysociety/FixMyStreet-Commercial#426
* Add a view-configuration admin page.Matthew Somerville2013-09-19-0/+4
| | | | Fixes #561.
* [Zurich] Add deleted to admin body_params methodChris Mytton2013-09-10-1/+2
|
* clarify presentation on lagged users pageDave Whiteland2013-09-05-1/+13
| | | | | now shows which flagged users are in abuse table, which seems important (separate issue #523 to make managing and indeed viewing abuse table)
* show warning on body with no live contactsDave Whiteland2013-09-05-0/+1
|
* remove SHOW_ADMIN_HINTS configDave Whiteland2013-09-05-3/+2
| | | | | admin hints are displayed *like it or not* (actually, could hide for a given cobrand with CSS setting display:none)
* show "no bodies" hint on empty body dbDave Whiteland2013-09-05-0/+3
|
* [Zurich] Ensure only superusers can add/edit bodiesChris Mytton2013-09-04-0/+2
|
* [Zurich] Only super user can edit bodiesChris Mytton2013-09-03-0/+8
|
* Move to Digest::SHA, as ::SHA1 is no longer packaged in Debian.Matthew Somerville2013-05-08-1/+1
|
* Add MAPIT_ID_WHITELIST configuration option.Matthew Somerville2013-05-02-2/+4
| | | | | | | This allows someone to restrict FixMyStreet's usage to specific MapIt IDs rather than a whole MapIt type. This is currently most useful with Global MapIt as you probably don't want e.g. all the O04s in the world for your installation.
* Zurich admin table styles carried across to default admin templates, and ↵Matthew Somerville2013-02-21-3/+4
| | | | tidy display of admin a bit.
* Remove *_local tz functions, set timezone on fetching original columns from ↵Matthew Somerville2013-02-14-8/+8
| | | | database.
* Add Zurich super user stats page.Matthew Somerville2013-02-14-1/+1
|
* Don't use problem sort on update search.Matthew Somerville2013-02-08-1/+1
|
* Reference things that might have direction.Matthew Somerville2013-02-08-2/+2
|
* Allow sorting of more Zurich admin tables.Matthew Somerville2013-02-08-3/+9
|