aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-11-27 11:42:50 +0000
committerDave Arter <davea@mysociety.org>2017-11-27 13:48:09 +0000
commit068dc61ef58b7eab521c9a009f0554fdb98512ed (patch)
tree1548a2c8fc8c8ec6b010857313a0b73b2b8959ef
parent1eb9ecc877e4923616b03e596ea5692c7eef14a8 (diff)
Remove intro text when showing location disambiguations
The intro header takes up a lot of vertical screen space, which on small devices means that the suggestion links end up beneath the fold. This can make it seem as though nothing has happened at all when you enter a search term on the front page. This commit removes the intro header if there are location suggestions, and also shifts the second sentence of the help text to the bottom of the list where it's more likely to be read.
-rw-r--r--CHANGELOG.md1
-rw-r--r--templates/web/base/around/_error_multiple.html3
-rw-r--r--templates/web/base/around/postcode_form.html4
3 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad059b216..24109c75b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@
- Improve performance of various pages, especially front. #1903
- Don't show geolocation link on non-HTTPS pages.
- More prominent "Hide pins" link on map pages, to aid reporting in busy areas. #525
+ - Improve location disambiguation page on small screens. #1918
- Bugfixes
- Shortlist menu item always remains a link #1855
- Fix encoded entities in RSS output. #1859
diff --git a/templates/web/base/around/_error_multiple.html b/templates/web/base/around/_error_multiple.html
index b47a91ca9..ca047f1d0 100644
--- a/templates/web/base/around/_error_multiple.html
+++ b/templates/web/base/around/_error_multiple.html
@@ -3,12 +3,13 @@
[% END %]
[% IF possible_location_matches %]
- <p>[% loc('We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.') %]</p>
+ <p>[% loc('We found more than one match for that location.') %]</p>
<ul class="pc_alternatives">
[% FOREACH match IN possible_location_matches %]
<li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %]">[% match.address | html %]</a></li>
[% END %]
</ul>
+ <p>[% loc('We show up to ten matches, please try a different search if yours is not here.') %]</p>
[% END %]
[% IF partial_token %]
diff --git a/templates/web/base/around/postcode_form.html b/templates/web/base/around/postcode_form.html
index e0277614d..efb639eda 100644
--- a/templates/web/base/around/postcode_form.html
+++ b/templates/web/base/around/postcode_form.html
@@ -1,6 +1,8 @@
<div id="front-main">
<div id="front-main-container">
- [% INCLUDE 'around/intro.html' %]
+ [% UNLESS possible_location_matches %]
+ [% INCLUDE 'around/intro.html' %]
+ [% END %]
[%
question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area');