diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-09-05 12:23:53 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-09-19 13:48:24 +0100 |
commit | c41bb2fcb792b3b0231c2ca2580d003fc8a9c36c (patch) | |
tree | 0b36a4767dbd4d8d1d40dfec8c284c0f1998ffed | |
parent | 10af1908da88d79be2366e4ba8301b762dae103b (diff) |
Factor out local alert input selection template.
-rw-r--r-- | templates/web/base/alert/_list.html | 11 | ||||
-rw-r--r-- | templates/web/base/alert/_list_rss_local.html | 10 |
2 files changed, 11 insertions, 10 deletions
diff --git a/templates/web/base/alert/_list.html b/templates/web/base/alert/_list.html index b9d955466..3dbd6b8d2 100644 --- a/templates/web/base/alert/_list.html +++ b/templates/web/base/alert/_list.html @@ -22,16 +22,7 @@ <h3>[% loc('Problems in an area') %]</h3> [% END %] - <p id="rss_local"> - <a href="[% rss_feed_uri %]" class="alerts-rss-link"> - <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed of nearby problems') %]" alt="[% loc('RSS feed') %]"> - </a> - <label class="label-containing-checkbox" for="[% rss_feed_id %]"> - <input type="radio" name="feed" id="[% rss_feed_id %]" value="[% rss_feed_id %]"[% IF rss_feed_id == selected_feed || selected_feed == '' %] checked[% END %]> - [% tprintf( loc('Problems within %.1fkm of %s'), population_radius, name_of_location ) %] - [% loc('(covers roughly 200,000 people)') %] - </label> - </p> + [% PROCESS 'alert/_list_rss_local.html' %] <p id="rss_local_alt"> [% SET distance_options = '<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>' %] diff --git a/templates/web/base/alert/_list_rss_local.html b/templates/web/base/alert/_list_rss_local.html new file mode 100644 index 000000000..a7fd82ca2 --- /dev/null +++ b/templates/web/base/alert/_list_rss_local.html @@ -0,0 +1,10 @@ + <p id="rss_local"> + <a href="[% rss_feed_uri %]" class="alerts-rss-link"> + <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed of nearby problems') %]" alt="[% loc('RSS feed') %]"> + </a> + <label class="label-containing-checkbox" for="[% rss_feed_id %]"> + <input type="radio" name="feed" id="[% rss_feed_id %]" value="[% rss_feed_id %]"[% IF rss_feed_id == selected_feed || selected_feed == '' %] checked[% END %]> + [% tprintf( loc('Problems within %.1fkm of %s'), population_radius, name_of_location ) %] + [% loc('(covers roughly 200,000 people)') %] + </label> + </p> |