aboutsummaryrefslogtreecommitdiffstats
path: root/templates/email/tfl/submit.html
blob: 2bce514d015a1ff181eb46ece66b2f8e455a665e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
[%

PROCESS '_email_settings.html';

email_summary = "A new problem in your area has been reported by a " _ site_name _ " user.";
email_footer = "";
email_columns = 2;

INCLUDE '_email_top.html';

%]

<th style="[% td_style %][% primary_column_style %]" id="primary_column">
  [% start_padded_box | safe %]
  <h1 style="[% h1_style %]">New problem in your&nbsp;area</h1>
  <p style="[% p_style %]">[% multiple %]A user of [% site_name %] has submitted the following report
of a local problem that they believe might require your attention.</p>

  [% IF report.get_extra_field_value('safety_critical') == 'yes' %]<p>This report is marked as safety critical.</p>[% END %]

  <p style="margin: 20px auto; text-align: center">
    <a style="[% button_style %]" href="[% url %]">Show full report</a>
  </p>
  <h2 style="[% h2_style %] margin: 30px 0 10px 0">Reported by:</h2>
  <table [% table_reset | safe %]>
    <tr>
      <th style="[% contact_th_style %]">Name</th>
      <td style="[% contact_td_style %]">[% report.name | html %]</td>
    </tr>
    <tr>
      <th style="[% contact_th_style %]">Email</th>
      <td style="[% contact_td_style %]">
        [%~ 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 report.user.phone %]
      <tr>
        <th style="[% contact_th_style %]">Phone</th>
        <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 [% report.name | html %], the user who reported the problem.</p>
  [% end_padded_box | safe %]
</th>
[% WRAPPER '_email_sidebar.html' object = report %]
    <h2 style="[% h2_style %]">[% report.title | html %]</h2>
    <p style="[% secondary_p_style %]"><strong>Report reference:</strong> FMS[% report.id %]</p>
    <p style="[% secondary_p_style %]"><strong>Category:</strong> [% report.category | html %]</p>
    [% IF report.get_extra_field_value('stop_code') %]
      <p style="[% secondary_p_style %]"><strong>Stop number:</strong> [% report.get_extra_field_value('stop_code') | html %]</p>
    [% END %]
    [% IF report.get_extra_field_value('site') %]
      <p style="[% secondary_p_style %]"><strong>Signal site number:</strong> [% report.get_extra_field_value('site') | html %]</p>
    [% END %]
    <p style="[% secondary_p_style %]">[% report.detail | html %]</p>
    <p style="[% secondary_p_style %]">
      <strong>Location:</strong>
      <br>Easting/Northing
      [%~ " (IE)" IF coordsyst == "I" ~%]
      : [% easting %]/[% northing %]
      (<a href="[% osm_url %]" title="View OpenStreetMap of this location">
        [%~ report.latitude %], [% report.longitude ~%]
      </a>)
      [% IF closest_address %]<br>[% closest_address | trim | replace("\n\n", "<br>") %][% END %]
    </p>
[% END %]

[% INCLUDE '_email_bottom.html' %]