aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/alert/list.html
blob: 9f2bd69d032b3b875056dd94a54cd83772df721f (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[%
    IF pretty_pc;
        title = tprintf( loc("Local RSS feeds and email alerts for ‘%s’"), pretty_pc );
    ELSE;
        title = loc('Local RSS feeds and email alerts');
    END;
%]

[% INCLUDE 'header.html', title => title %]

[% IF pretty_pc %]
    [%
        pretty_pc = pretty_pc | html | replace(' ', ' ');
        title = tprintf( loc("Local RSS feeds and email alerts for ‘%s’"), pretty_pc );
    %]
[% END %]


<h1>[% title %]</h1>

<form id="alerts" name="alerts" method="post" action="/alert/subscribe">
  <input type="hidden" name="type" value="local">
  <input type="hidden" name="pc" value="[% pc | html %]">

  [% IF photos.size %]
    <div id="alert_photos">
      <h2>[% loc('Photos of recent nearby reports') %]</h2>
        [% FOREACH p IN photos %]
            <a href="/report/[% p.id %]"><img border="0" height="100"
                src="/photo/[% p.id %].tn.jpeg" alt="[% p.title | html %]" title="[% p.title | html %]"></a>
        [% END %]
    </div>
  [% END %]

  <p>
  [% IF pretty_pc %]
    [% tprintf( loc('Here are the types of local problem alerts for &lsquo;%s&rsquo;.'), pretty_pc ) %]
  [% END %]
  [% loc('Select which type of alert you\'d like and click the button for an RSS feed, or enter your email address to subscribe to an email alert.') %]
  </p>

  [% INCLUDE 'errors.html' %]

  <p>
  [% loc('The simplest alert is our geographic one:') %]
  </p>

  <p id="rss_local">
    <input type="radio" name="feed" id="[% rss_feed_id %]" value="[% rss_feed_id %]"[% IF rss_feed_id == selected_feed || selected_feed == '' %] checked[% END %]>
    <label for="[% rss_feed_id %]">[% tprintf( loc('Problems within %.1fkm of this location'), population_radius ) %]</label>
    [% loc('(a default distance which covers roughly 200,000 people)') %] <a href='[% rss_feed_uri %]'>
      <img src='/i/feed.png' width='16' height='16' title='[% loc('RSS feed of nearby problems') %]' alt='[% loc('RSS feed') %]' border='0'></a>
  </p>

  <p id="rss_local_alt">
  [% loc('(alternatively the RSS feed can be customised, within') %]
    <a href="[% rss_feed_2k %]">2km</a> / <a href="[% rss_feed_5k %]">5km</a> / <a href="[% rss_feed_10k %]">10km</a> / <a href="[% rss_feed_20k %]">20km</a>)
  </p>

  <p>
  [% loc("Or you can subscribe to an alert based upon what ward or council you&rsquo;re in:") %]
  </p>

    [% IF reported_to_options %]
      <div id="rss_list">
        <p><strong>
          [% loc('Problems within the boundary of:') %]
        </strong></p>
        <ul>
    [% ELSE %]
      <div><ul id="rss_feed">
    [% END %]

  [% FOREACH option IN options %]
  <li>
    <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]>
    <label for="[% option.id %]">[% option.text %]</label>
    <a href="[% option.uri %]"><img src="/i/feed.png" width="16" height="16"
title="[% option.rss_text %]" alt="RSS feed" border="0"></a>
  </li>
  [% END %]
</ul>
    [% IF reported_to_options %]
        <p><strong>
          [% loc('Or problems reported to:') %]
        </strong></p>
        <ul>
      [% FOREACH option IN reported_to_options %]
      <li>
        <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]>
        <label for="[% option.id %]">[% option.text %]</label>
        <a href="[% option.uri %]"><img src="/i/feed.png" width="16" height="16"
    title="[% option.rss_text %]" alt="RSS feed" border="0"></a>
      </li>
      [% END %]
    </ul>
    <p><small>
      [% loc( 'FixMyStreet sends different categories of problem
to the appropriate council, so problems within the boundary of a particular council
might not match the problems sent to that council. For example, a graffiti report
will be sent to the district council, so will appear in both of the district
council&rsquo;s alerts, but will only appear in the "Within the boundary" alert
for the county council.' ) %]
    </small></p>
</div>
<div id="rss_buttons">
    [% END %]

  <p>
    <input type="submit" name="rss" value="[% loc('Give me an RSS feed') %]">
  <p>

  <p id="alert_or">
    [% loc('or') %]
  </p>

[% UNLESS c.user_exists %]

  <p>
  [% loc('Your email:') %] <input type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]" size="30">
  </p>

[% END %]

  <p>
    <input type="submit" name="alert" value="[% loc('Subscribe me to an email alert') %]">
  </p>
  </div> <!-- ???? -->
  </form>

[% INCLUDE 'footer.html' %]