diff options
-rw-r--r-- | perllib/FixMyStreet/Script/Reports.pm | 8 | ||||
-rw-r--r-- | templates/email/default/alert-update.html | 4 | ||||
-rw-r--r-- | templates/email/default/alert-update.txt | 6 | ||||
-rw-r--r-- | templates/email/default/submit.html | 22 | ||||
-rw-r--r-- | templates/email/default/submit.txt | 18 | ||||
-rw-r--r-- | templates/email/fiksgatami/nn/submit.txt | 18 | ||||
-rw-r--r-- | templates/email/fiksgatami/submit.txt | 18 | ||||
-rw-r--r-- | templates/email/fixamingata/submit.html | 20 | ||||
-rw-r--r-- | templates/email/fixamingata/submit.txt | 20 | ||||
-rw-r--r-- | templates/email/fixmystreet.com/submit.html | 22 | ||||
-rw-r--r-- | templates/email/fixmystreet.com/submit.txt | 18 | ||||
-rw-r--r-- | templates/email/zurich/submit-external-personal.txt | 8 | ||||
-rw-r--r-- | templates/email/zurich/submit-external-wish.txt | 10 | ||||
-rw-r--r-- | templates/email/zurich/submit-external.txt | 2 | ||||
-rw-r--r-- | templates/email/zurich/submit-feedback-pending.txt | 2 | ||||
-rw-r--r-- | templates/email/zurich/submit-in-progress.txt | 2 | ||||
-rw-r--r-- | templates/email/zurich/submit.txt | 2 |
17 files changed, 98 insertions, 102 deletions
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm index 8e4a4aec1..be3c4c69a 100644 --- a/perllib/FixMyStreet/Script/Reports.pm +++ b/perllib/FixMyStreet/Script/Reports.pm @@ -178,16 +178,8 @@ sub send(;$) { if ($h{category} eq _('Other')) { $h{category_footer} = _('this type of local problem'); - $h{category_line} = ''; } else { $h{category_footer} = "'" . $h{category} . "'"; - $h{category_line} = sprintf(_("Category: %s"), $h{category}) . "\n\n"; - } - - if ( $row->subcategory ) { - $h{subcategory_line} = sprintf(_("Subcategory: %s"), $row->subcategory) . "\n\n"; - } else { - $h{subcategory_line} = "\n\n"; } $h{bodies_name} = join(_(' and '), @dear); diff --git a/templates/email/default/alert-update.html b/templates/email/default/alert-update.html index 8c392685d..c1a7562cd 100644 --- a/templates/email/default/alert-update.html +++ b/templates/email/default/alert-update.html @@ -1,6 +1,6 @@ [% -title = title | html; +title = report.title | html; email_summary = "New updates on “" _ title _ "”"; email_columns = 2; @@ -19,7 +19,7 @@ INCLUDE '_email_top.html'; </th> [% WRAPPER '_email_sidebar.html' object = report %] <h2 style="[% h2_style %]">[% title | html %]</h2> - <p style="[% secondary_p_style %]">[% detail | html %]</p> + <p style="[% secondary_p_style %]">[% report.detail | html %]</p> [% END %] [% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/alert-update.txt b/templates/email/default/alert-update.txt index 3bf9e4377..2883fee5e 100644 --- a/templates/email/default/alert-update.txt +++ b/templates/email/default/alert-update.txt @@ -1,7 +1,7 @@ -Subject: New [% site_name %] updates on report: '[% title %]' +Subject: New [% site_name %] updates on report: '[% report.title %]' You asked us to send you an email every time an update was made to the -[% site_name %] report: [% title %]. +[% site_name %] report: [% report.title %]. The following updates have been left on this report: @@ -22,7 +22,7 @@ please do not reply to it. Unsubscribe? We currently email you whenever someone leaves an update on the -[% site_name %] report: [% title %]. +[% site_name %] report: [% report.title %]. If you no longer wish to receive an email whenever this report is updated, please follow this link: [% unsubscribe_url %] diff --git a/templates/email/default/submit.html b/templates/email/default/submit.html index 582670f98..8dc06041e 100644 --- a/templates/email/default/submit.html +++ b/templates/email/default/submit.html @@ -23,38 +23,36 @@ of a local problem that they believe might require your attention.</p> <table [% table_reset %]> <tr> <th style="[% contact_th_style %]">Name</th> - <td style="[% contact_td_style %]">[% name | html %]</td> + <td style="[% contact_td_style %]">[% report.name | html %]</td> </tr> <tr> <th style="[% contact_th_style %]">Email</th> <td style="[% contact_td_style %]"> - [%~ IF email ~%] - <a href="mailto:[% email | html %]">[% email | html %]</a> + [%~ IF report.user.email ~%] + <a href="mailto:[% report.user.email | html %]">[% report.user.email | html %]</a> [%~ ELSE ~%] <strong>No email address provided, only phone number</strong> [%~ END ~%] </td> </tr> - [%~ IF phone %] + [%~ IF report.user.phone %] <tr> <th style="[% contact_th_style %]">Phone</th> - <td style="[% contact_td_style %]"><a href="tel:[% phone | html %]">[% phone | html %]</a></td> + <td style="[% contact_td_style %]"><a href="tel:[% report.user.phone | html %]">[% report.user.phone | html %]</a></td> </tr> [%~ END %] </table> - <p style="[% p_style %] margin-top: 0.5em;">Replies to this message will go directly to [% name | html %], the user who reported the problem.</p> + <p style="[% p_style %] margin-top: 0.5em;">Replies to this message will go directly to [% report.name | html %], the user who reported the problem.</p> [% end_padded_box %] </th> [% WRAPPER '_email_sidebar.html' object = report %] - <h2 style="[% h2_style %]">[% title | html %]</h2> - [%~ IF category_line %] - <p style="[% secondary_p_style %]">[% category | html %]</p> - [%~ END %] - <p style="[% secondary_p_style %]">[% detail | html %]</p> + <h2 style="[% h2_style %]">[% report.title | html %]</h2> + <p style="[% secondary_p_style %]">[% report.category | html %]</p> + <p style="[% secondary_p_style %]">[% report.detail | html %]</p> <p style="[% secondary_p_style %]"> <strong>Location:</strong> <a href="[% osm_url %]" title="View OpenStreetMap of this location"> - [%~ latitude %], [% longitude ~%] + [%~ report.latitude %], [% report.longitude ~%] </a> [% IF closest_address %]<br>[% closest_address | trim | replace("\n\n", "<br>") %][% END %] </p> diff --git a/templates/email/default/submit.txt b/templates/email/default/submit.txt index 8c88a17f8..f08e723a8 100644 --- a/templates/email/default/submit.txt +++ b/templates/email/default/submit.txt @@ -1,4 +1,4 @@ -Subject: Problem Report: [% title %] +Subject: Problem Report: [% report.title %] Dear [% bodies_name %], @@ -13,19 +13,21 @@ please visit the following link: [% has_photo %]---------- -Name: [% name %] +Name: [% report.name %] -Email: [% email OR "None provided" %] +Email: [% report.user.email OR "None provided" %] -Phone: [% phone OR "None provided" %] +Phone: [% report.user.phone OR "None provided" %] -[% category_line %]Subject: [% title %] +Category: [% report.category %] -Details: [% detail %] +Subject: [% report.title %] -Latitude: [% latitude %] +Details: [% report.detail %] -Longitude: [% longitude %] +Latitude: [% report.latitude %] + +Longitude: [% report.longitude %] View OpenStreetMap of this location: [% osm_url %] diff --git a/templates/email/fiksgatami/nn/submit.txt b/templates/email/fiksgatami/nn/submit.txt index dfbdd9457..0e3f453ba 100644 --- a/templates/email/fiksgatami/nn/submit.txt +++ b/templates/email/fiksgatami/nn/submit.txt @@ -1,4 +1,4 @@ -Subject: Problemrapport: [% title %] +Subject: Problemrapport: [% report.title %] Til [% bodies_name %], @@ -13,19 +13,21 @@ problemet, ver venleg og besøk følgjande lenkje: [% has_photo %]---------- -Namn: [% name %] +Namn: [% report.name %] -E-post: [% email OR '-' %] +E-post: [% report.user.email OR '-' %] -Telefon: [% phone OR '-' %] +Telefon: [% report.user.phone OR '-' %] -[% category_line %]Tema: [% title %] +Kategori: [% report.category %] -Detaljer: [% detail %] +Tema: [% report.title %] -Breiddegrad: [% latitude %] +Detaljer: [% report.detail %] -Lengdegrad: [% longitude %] +Breiddegrad: [% report.latitude %] + +Lengdegrad: [% report.longitude %] [% closest_address %]---------- diff --git a/templates/email/fiksgatami/submit.txt b/templates/email/fiksgatami/submit.txt index 165b804f1..114f4cf50 100644 --- a/templates/email/fiksgatami/submit.txt +++ b/templates/email/fiksgatami/submit.txt @@ -1,4 +1,4 @@ -Subject: Problemrapport: [% title %] +Subject: Problemrapport: [% report.title %] Til [% bodies_name %], @@ -13,19 +13,21 @@ vennligst besøk følgende lenke: [% has_photo %]---------- -Navn: [% name %] +Navn: [% report.name %] -E-post: [% email OR '-' %] +E-post: [% report.user.email OR '-' %] -Telefon: [% phone OR '-' %] +Telefon: [% report.user.phone OR '-' %] -[% category_line %]Tema: [% title %] +Kategori: [% report.category %] -Detajer: [% detail %] +Tema: [% report.title %] -Breddegrad: [% latitude %] +Detajer: [% report.detail %] -Lengegrad: [% longitude %] +Breddegrad: [% report.latitude %] + +Lengegrad: [% report.longitude %] [% closest_address %]---------- diff --git a/templates/email/fixamingata/submit.html b/templates/email/fixamingata/submit.html index 65a692058..6a1208982 100644 --- a/templates/email/fixamingata/submit.html +++ b/templates/email/fixamingata/submit.html @@ -23,21 +23,21 @@ tror medborgaren behöver er uppmärksamhet.</p> <table [% table_reset %]> <tr> <th style="[% contact_th_style %]">Namn</th> - <td style="[% contact_td_style %]">[% name | html %]</td> + <td style="[% contact_td_style %]">[% report.name | html %]</td> </tr> <tr> <th style="[% contact_th_style %]">Epost</th> <td style="[% contact_td_style %]"> - [%~ IF email ~%] - <a href="mailto:[% email | html %]">[% email | html %]</a> + [%~ IF report.user.email ~%] + <a href="mailto:[% report.user.email | html %]">[% report.user.email | html %]</a> [%~ ELSE ~%] [%~ END ~%] </td> </tr> - [%~ IF phone %] + [%~ IF report.user.phone %] <tr> <th style="[% contact_th_style %]">Telefon</th> - <td style="[% contact_td_style %]"><a href="tel:[% phone | html %]">[% phone | html %]</a></td> + <td style="[% contact_td_style %]"><a href="tel:[% report.user.phone | html %]">[% report.user.phone | html %]</a></td> </tr> [%~ END %] </table> @@ -45,15 +45,13 @@ tror medborgaren behöver er uppmärksamhet.</p> [% end_padded_box %] </th> [% WRAPPER '_email_sidebar.html' object = report %] - <h2 style="[% h2_style %]">[% title | html %]</h2> - [%~ IF category_line %] - <p style="[% secondary_p_style %]">[% category | html %]</p> - [%~ END %] - <p style="[% secondary_p_style %]">[% detail | html %]</p> + <h2 style="[% h2_style %]">[% report.title | html %]</h2> + <p style="[% secondary_p_style %]">[% report.category | html %]</p> + <p style="[% secondary_p_style %]">[% report.detail | html %]</p> <p style="[% secondary_p_style %]"> <strong>Plats:</strong> <a href="[% osm_url %]" title="Se den här platsen på OpenStreetMap"> - [%~ latitude %], [% longitude ~%] + [%~ report.latitude %], [% report.longitude ~%] </a> [% IF closest_address %]<br>[% closest_address | trim | replace("\n\n", "<br>") %][% END %] </p> diff --git a/templates/email/fixamingata/submit.txt b/templates/email/fixamingata/submit.txt index fc8b65886..d2e7399b4 100644 --- a/templates/email/fixamingata/submit.txt +++ b/templates/email/fixamingata/submit.txt @@ -1,4 +1,4 @@ -Subject: Ny rapport: [% title %] +Subject: Ny rapport: [% report.title %] Till [% bodies_name %], @@ -14,25 +14,27 @@ tror medborgaren behöver er uppmärksamhet. ** Uppgiftslämnare -Namn: [% name %] +Namn: [% report.name %] -Epost: [% email OR '-' %] +Epost: [% report.user.email OR '-' %] -Telefonnummer: [% phone OR '-' %] +Telefonnummer: [% report.user.phone OR '-' %] ** Information om ärendet -ID: [% id %] +ID: [% report.id %] -[% category_line %]Ärende: [% title %] +Kategori: [% report.category %] -[% detail %] +Ärende: [% report.title %] + +[% report.detail %] ** Geografisk position -Latitude: [% latitude %] +Latitude: [% report.latitude %] -Longitude: [% longitude %] +Longitude: [% report.longitude %] ** Övrigt diff --git a/templates/email/fixmystreet.com/submit.html b/templates/email/fixmystreet.com/submit.html index 24bb5f86f..2742c4b44 100644 --- a/templates/email/fixmystreet.com/submit.html +++ b/templates/email/fixmystreet.com/submit.html @@ -23,34 +23,32 @@ of a local problem that they believe might require your attention.</p> <table [% table_reset %]> <tr> <th style="[% contact_th_style %]">Name</th> - <td style="[% contact_td_style %]">[% name | html %]</td> + <td style="[% contact_td_style %]">[% report.name | html %]</td> </tr> <tr> <th style="[% contact_th_style %]">Email</th> <td style="[% contact_td_style %]"> - [%~ IF email ~%] - <a href="mailto:[% email | html %]">[% email | html %]</a> + [%~ IF report.user.email ~%] + <a href="mailto:[% report.user.email | html %]">[% report.user.email | html %]</a> [%~ ELSE ~%] <strong>No email address provided, only phone number</strong> [%~ END ~%] </td> </tr> - [%~ IF phone %] + [%~ IF report.user.phone %] <tr> <th style="[% contact_th_style %]">Phone</th> - <td style="[% contact_td_style %]"><a href="tel:[% phone | html %]">[% phone | html %]</a></td> + <td style="[% contact_td_style %]"><a href="tel:[% report.user.phone | html %]">[% report.user.phone | html %]</a></td> </tr> [%~ END %] </table> - <p style="[% p_style %] margin-top: 0.5em;">Replies to this message will go directly to [% name | html %], the user who reported the problem.</p> + <p style="[% p_style %] margin-top: 0.5em;">Replies to this message will go directly to [% report.name | html %], the user who reported the problem.</p> [% end_padded_box %] </th> [% WRAPPER '_email_sidebar.html' object = report %] - <h2 style="[% h2_style %]">[% title | html %]</h2> - [%~ IF category_line %] - <p style="[% secondary_p_style %]"><strong>Category:</strong> [% category | html %]</p> - [%~ END %] - <p style="[% secondary_p_style %]">[% detail | html %]</p> + <h2 style="[% h2_style %]">[% report.title | html %]</h2> + <p style="[% secondary_p_style %]"><strong>Category:</strong> [% report.category | html %]</p> + <p style="[% secondary_p_style %]">[% report.detail | html %]</p> [%~ IF additional_information %] <p style="[% secondary_p_style %]">[% additional_information %]</p> [%~ END %] @@ -60,7 +58,7 @@ of a local problem that they believe might require your attention.</p> [%~ " (IE)" IF coordsyst == "I" ~%] : [% easting %]/[% northing %] (<a href="[% osm_url %]" title="View OpenStreetMap of this location"> - [%~ latitude %], [% longitude ~%] + [%~ report.latitude %], [% report.longitude ~%] </a>) [% IF closest_address %]<br>[% closest_address | trim | replace("\n\n", "<br>") %][% END %] </p> diff --git a/templates/email/fixmystreet.com/submit.txt b/templates/email/fixmystreet.com/submit.txt index 5bcbef87b..3eaf400a2 100644 --- a/templates/email/fixmystreet.com/submit.txt +++ b/templates/email/fixmystreet.com/submit.txt @@ -1,4 +1,4 @@ -Subject: Problem Report: [% title %] +Subject: Problem Report: [% report.title %] Dear [% bodies_name %], @@ -13,15 +13,17 @@ please visit the following link: [% has_photo %]---------- -Name: [% name %] +Name: [% report.name %] -Email: [% email OR 'None provided' %] +Email: [% report.user.email OR 'None provided' %] -Phone: [% phone OR 'None provided' %] +Phone: [% report.user.phone OR 'None provided' %] -[% category_line %]Subject: [% title %] +Category: [% report.category %] -Details: [% detail %] +Subject: [% report.title %] + +Details: [% report.detail %] [% additional_information %] @@ -29,9 +31,9 @@ Easting/Northing [%- " (IE)" IF coordsyst == "I" -%] : [% easting %]/[% northing %] -Latitude: [% latitude %] +Latitude: [% report.latitude %] -Longitude: [% longitude %] +Longitude: [% report.longitude %] View OpenStreetMap of this location: [% osm_url %] diff --git a/templates/email/zurich/submit-external-personal.txt b/templates/email/zurich/submit-external-personal.txt index 820ccfb70..701d7eaab 100644 --- a/templates/email/zurich/submit-external-personal.txt +++ b/templates/email/zurich/submit-external-personal.txt @@ -1,4 +1,4 @@ -Subject: Züri wie neu: Weitergeleitete Meldung #[% id %] +Subject: Züri wie neu: Weitergeleitete Meldung #[% report.id %] Grüezi [% bodies_name %], @@ -7,11 +7,11 @@ Grüezi [% bodies_name %], Öffentliche URL: [% url %] -Name des Meldenden: [% name %] +Name des Meldenden: [% report.name %] -Email des Meldenden: [% email %] +Email des Meldenden: [% report.user.email %] -Telefonnummer des Meldenden: [% phone %] +Telefonnummer des Meldenden: [% report.user.phone %] Bei Fragen zu "Züri wie neu" wenden Sie sich bitte an gis-zentrum@zuerich.ch. diff --git a/templates/email/zurich/submit-external-wish.txt b/templates/email/zurich/submit-external-wish.txt index a81d13893..3ac0ea58c 100644 --- a/templates/email/zurich/submit-external-wish.txt +++ b/templates/email/zurich/submit-external-wish.txt @@ -1,17 +1,17 @@ -Subject: Züri wie neu: Weitergeleitete Meldung #[% id %] +Subject: Züri wie neu: Weitergeleitete Meldung #[% report.id %] Grüezi [% bodies_name %], [% external_message %] -Name des Meldenden: [% name %] +Name des Meldenden: [% report.name %] -Email des Meldenden: [% email %] +Email des Meldenden: [% report.user.email %] -Telefonnummer des Meldenden: [% phone %] +Telefonnummer des Meldenden: [% report.user.phone %] -Meldung: [% detail %] +Meldung: [% report.detail %] Standort in AV-Online anzeigen: http://webgis.intra.stzh.ch/AV_Online/Direct.asp?Map=AV&Search=Koord&West=[% west %]&Nord=[% nord %]&B=300 diff --git a/templates/email/zurich/submit-external.txt b/templates/email/zurich/submit-external.txt index a747a001c..ec2053f35 100644 --- a/templates/email/zurich/submit-external.txt +++ b/templates/email/zurich/submit-external.txt @@ -1,4 +1,4 @@ -Subject: Züri wie neu: Weitergeleitete Meldung #[% id %] +Subject: Züri wie neu: Weitergeleitete Meldung #[% report.id %] Grüezi [% bodies_name %], diff --git a/templates/email/zurich/submit-feedback-pending.txt b/templates/email/zurich/submit-feedback-pending.txt index bd95e3812..58d35ed36 100644 --- a/templates/email/zurich/submit-feedback-pending.txt +++ b/templates/email/zurich/submit-feedback-pending.txt @@ -1,4 +1,4 @@ -Subject: Züri wie neu: Meldung #[% id %] bereit für Feedback +Subject: Züri wie neu: Meldung #[% report.id %] bereit für Feedback Guten Tag [% bodies_name %], diff --git a/templates/email/zurich/submit-in-progress.txt b/templates/email/zurich/submit-in-progress.txt index 7be06cf13..3c3ac65ff 100644 --- a/templates/email/zurich/submit-in-progress.txt +++ b/templates/email/zurich/submit-in-progress.txt @@ -1,4 +1,4 @@ -Subject: Züri wie neu: Neue Meldung #[% id %] +Subject: Züri wie neu: Neue Meldung #[% report.id %] Guten Tag [% bodies_name %], diff --git a/templates/email/zurich/submit.txt b/templates/email/zurich/submit.txt index ef4acaafe..c9c84f90c 100644 --- a/templates/email/zurich/submit.txt +++ b/templates/email/zurich/submit.txt @@ -1,4 +1,4 @@ -Subject: Züri wie neu: Neue Meldung #[% id %] +Subject: Züri wie neu: Neue Meldung #[% report.id %] Guten Tag [% bodies_name %], |