aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
Commit message (Collapse)AuthorAgeLines
* Remove unused category_extras_json code.Matthew Somerville2016-08-16-1/+0
|
* Fix issue with add_links not interpolating.Matthew Somerville2016-08-15-1/+1
| | | | Double quoted string is needed for $1 and $2 to not be used exactly.
* Prevent error if latitude or longitude of 0 given.Matthew Somerville2016-08-15-1/+1
|
* Fix a crash on /admin/timelineDave Arter2016-08-15-2/+2
| | | | | The 'created' and 'state' column names are shared between the 'problem' and 'comment' tables, and this was causing ambiguous column references in the SQL.
* Fix invalid SQL being generated by moderation lookupDave Arter2016-08-15-2/+2
|
* Remove some unused code/ database handle.Matthew Somerville2016-08-12-29/+1
|
* Convert single newlines in text to <br>s.Matthew Somerville2016-08-12-0/+16
| | | | Fixes #306.
* Switch link adding to use double quotes.Matthew Somerville2016-08-12-3/+2
|
* Switch add_links template function to filter.Matthew Somerville2016-08-12-4/+4
|
* Direct report moderated emails correctly.Matthew Somerville2016-08-10-7/+3
|
* Merge branch '1474-absolutely-fabulous'Matthew Somerville2016-08-10-12/+12
|\
| * Make UPLOAD_DIR/GEO_CACHE relative to project rootMatthew Somerville2016-08-10-12/+12
| | | | | | | | | | If they are absolute already, do nothing. Switch a couple of uses to Path::Tiny as well.
* | Merge branch 'issues/forcouncils/10-report-as-dropdown'Matthew Somerville2016-08-10-11/+83
|\ \ | |/ |/|
| * Feature to create report as body/other user.Zarino Zappia2016-08-10-11/+83
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Don't error if static map tile fetch fails.Matthew Somerville2016-08-10-3/+14
| | | | | | | | Also don't fetch tiles if running tests.
* | Add config for Open311 request limit, default 1000.Matthew Somerville2016-08-10-3/+4
| | | | | | | | Fixes #1313.
* | Do not send alerts for hidden reports.Matthew Somerville2016-08-10-0/+2
| | | | | | | | Fixes #1461.
* | Generate unique config per test run.Matthew Somerville2016-08-09-1/+16
|/ | | | | | | | This allows multiple test suites to run simultaneously (beforehand, a second run would overwrite the same config file and lose its database connection). Clean up the created config file on exit.
* Merge branch '1469-html-email-fixes'Matthew Somerville2016-08-08-1/+2
|\
| * Log failure to send email.Matthew Somerville2016-08-08-1/+2
| |
* | Fix other "keys on reference" warning.Matthew Somerville2016-08-08-1/+1
|/ | | | This is a continuation of b45b29c8.
* [East Sussex] Remove East Sussex cobrandDave Arter2016-08-02-134/+0
|
* Add HTML email templates.Matthew Somerville2016-08-01-63/+270
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add static map output view for a report.Matthew Somerville2016-08-01-13/+113
|
* Move photoset stuff to new Role.Matthew Somerville2016-08-01-42/+39
|
* Test for Image::Magick installation better.Matthew Somerville2016-08-01-6/+10
| | | | (VERSION disappears in some recent version.)
* [Zurich] Send admin emails from the do-not-reply addressDave Arter2016-07-28-4/+3
| | | | | Also takes the opportunity to fix the incorrectly-encoded sender name which was appearing to some clients as "Züri Wie Neu".
* Refactor map pin/feature functions.Matthew Somerville2016-07-21-101/+73
|
* Fix crash on /my page due to missing pin.problemDave Arter2016-07-21-0/+1
|
* Fix "keys on reference is experimental" warning in Perl 5.20+Dave Arter2016-07-21-1/+1
|
* Respect cobrand restriction for unsent reportsDave Arter2016-07-19-1/+1
|
* Disallow empty name when creating/editing bodies in adminDave Arter2016-07-19-17/+32
|
* Use improved TestMech::create_user_ok instead of User::find_or_createDave Arter2016-07-19-4/+3
| | | | | This improves create_user_ok to work more like create_body_ok where extra params can be passed in and set on the model.
* Restrict add/editing of bodies in admin to superusersDave Arter2016-07-19-2/+7
|
* [UK Councils] Council users can only see their own council's adminDave Arter2016-07-19-0/+7
|
* Use normal user authentication to control access to /adminMatthew Somerville2016-07-19-12/+70
| | | | | | | | | - Adds is_superuser flag to User - Logged-in user must be a superuser or have from_body set in order to access anything within /admin - has_permission_to on a superuser will always return true - Only superusers can create/grant superusers - New `createsuperuser` command for creating superusers
* Allow editing of category on admin report edit.Matthew Somerville2016-07-15-2/+34
| | | | This also updates the body column to match the category.
* Remove bit of unused/needed code.Matthew Somerville2016-07-15-24/+3
|
* Check extras for all retrieved contacts.Matthew Somerville2016-07-15-12/+12
|
* Add missing 'pin.problem' attributeDave Arter2016-07-11-0/+1
| | | | | Missed this from 8a8b34, and it was causing a crash on certain /reports/ pages when trying to display the list of problems.
* [UK Councils] Show all reports on cobrand /around mapDave Arter2016-07-08-2/+38
| | | | | | | | | | | | | | There is a concern that excluding district council reports from a two-tier council's cobrand's /around page might lead to duplicate reports or reports never being seen. This commit adds them to the map and the sidebar and displays the destination council in the report list item. Clicking the pin or the report link leads to the report on FMS.com. Reports sent to the a council other than the the active cobrand are shown as grey pins on the map, and the receiving council's name is shown in the sidebar list.
* Include link back to originating cobrand on fms.com reportsDave Arter2016-07-08-2/+63
| | | | | | | | | When viewing a report on FMS.com whose recipient council has a FMS cobrand, turns the council name into a link to view the same report on that council's cobranded site. Includes methods cribbed from Hakim's Open311 refactor branch from commit 47daa02420a4f5a4264c31efcf2a2e8611c2f23e.
* Display link to FMS for Councils on reportsDave Arter2016-07-08-0/+20
| | | | | | | | | When viewing on FMS.com a report made via a council cobrand, this adds a link to the FMS for Councils page for more info. This works by breaking out the report meta line ('Reported in the Street lighting category by Joe Bloggs at 09:51, Tuesday 1 March 2016') into its own template which can be overridden for the fixmystreet.com cobrand.
* Restructure & clarify problem confirmation pageDave Arter2016-07-08-2/+2
| | | | | | | The message shown to the user if the report was sent to a council other than the cobrand owner was confusing so the wording has been clarified. Also added a call to action to view the report on FMS.com or the cobranded FMS.
* [UK Councils] Use correct cobrand base URL if STAGING_SITEDave Arter2016-07-08-6/+12
| | | | | Instead of using BASE_URL as the base URL on council cobrands when STAGING is true, use the UK councils default (which is cobrand name prepended to BASE_URL).
* Refactor sending of problem confirmation emailDave Arter2016-07-08-32/+29
| | | | | | | | Replaced duplicate code blocks that are responsible for sending confirmation of problem email with a function. Should make it easier to do two-tier conditional messages later on. Also fixes a minor bug where the wrong confirmation email would be sent for reports from the mobile app to unresponsive councils.
* [East Herts] Cobranded frontendDave Arter2016-07-08-0/+54
| | | | For mysociety/FixMyStreet-Commercial#773.
* [Bristol] Only show Open311 categories on Bristol cobrandDave Arter2016-07-08-16/+27
| | | | | | | | | | | | This adds a new Cobrand::Default::categories_restriction method that can be used to limit what categories are available when making a new report on a per-cobrand basis. This is used by Cobrand::Bristol to only show Open311 categories when making a new report on fixmystreet.bristol.gov.uk but allowing all categories on FMS.com. Also removes the Hart::hidden_categories and uses the new categories_restriction method to achieve the same thing.
* Stub out calls to Gaze when running testsDave Arter2016-07-08-0/+3
| | | | The tests were running slowly because of gaze.mysociety.org's rate-limiting.
* [Zurich] Don’t include unpublished photos in CSV exportDave Arter2016-07-08-1/+1
|