diff options
Diffstat (limited to 'templates/web/base')
-rwxr-xr-x | templates/web/base/around/display_location.html | 8 | ||||
-rw-r--r-- | templates/web/base/around/on_map_list_items.html | 31 | ||||
-rwxr-xr-x | templates/web/base/around/tabbed_lists.html | 12 | ||||
-rw-r--r-- | templates/web/base/maps/google.html | 1 | ||||
-rw-r--r-- | templates/web/base/maps/openlayers.html | 1 | ||||
-rw-r--r-- | templates/web/base/pagination.html | 2 |
6 files changed, 35 insertions, 20 deletions
diff --git a/templates/web/base/around/display_location.html b/templates/web/base/around/display_location.html index 3ed16d3d3..5d83235b1 100755 --- a/templates/web/base/around/display_location.html +++ b/templates/web/base/around/display_location.html @@ -61,14 +61,6 @@ [% ELSE %] <a id='hide_pins_link' rel='nofollow' href="[% c.uri_with( { no_pins => 1 } ) %]">[% loc('Hide pins') %]</a> [% END %] - [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] - <span class="hidden">|</span> - [% IF c.req.params.all_pins %] - <a id='all_pins_link' rel='nofollow' href="[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]">[% loc('Hide old') %]</a> - [% ELSE %] - <a id='all_pins_link' rel='nofollow' href="[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]">[% loc('Show old') %]</a> - [% END %] - [% END %] </p> <div class="mobile-map-banner"> diff --git a/templates/web/base/around/on_map_list_items.html b/templates/web/base/around/on_map_list_items.html index b7257030d..fafe7f433 100644 --- a/templates/web/base/around/on_map_list_items.html +++ b/templates/web/base/around/on_map_list_items.html @@ -1,14 +1,31 @@ -[% all_reports = on_map.merge(around_map) %] -[% IF all_reports.size %] - [% FOREACH problem IN all_reports %] - [% UNLESS problem.title; - dist = tprintf("%.1f", (problem.distance || 0) ); - problem = problem.problem; - END %] +<ul class="item-list item-list--reports"> +[% IF on_map.size %] + [% FOREACH problem IN on_map %] [% INCLUDE 'reports/_list-entry.html' %] [% END %] + [% IF around_map.size %] + <li class="item-list__item item-list__item--empty"> + <p>[% loc('Here are some other nearby reports:') %]</p> + </li> + [% END %] +[% ELSIF around_map.size %] + <li class="item-list__item item-list__item--empty"> + <p>[% loc('No reports to show on map, here are some nearby:') %]</p> + </li> [% ELSE %] <li class="item-list__item item-list__item--empty"> <p>[% loc('There are no reports to show.') %]</p> </li> [% END %] +</ul> + +[% IF around_map.size %] +<ul class="item-list item-list--reports"> + [% FOREACH problem IN around_map %] + [% dist = tprintf("%.1f", (problem.distance || 0) ); + problem = problem.problem; + %] + [% INCLUDE 'reports/_list-entry.html' %] + [% END %] +</ul> +[% END %] diff --git a/templates/web/base/around/tabbed_lists.html b/templates/web/base/around/tabbed_lists.html index 5418ef914..f135684b9 100755 --- a/templates/web/base/around/tabbed_lists.html +++ b/templates/web/base/around/tabbed_lists.html @@ -1,5 +1,13 @@ [% INCLUDE "reports/_list-filters.html" %] -<ul id="js-reports-list" class="item-list item-list--reports"> +<div class="js-pagination"> +[% INCLUDE 'pagination.html' param = 'p' %] +</div> + +<div id="js-reports-list"> [% INCLUDE "around/on_map_list_items.html" %] -</ul> +</div> + +<div class="js-pagination"> +[% INCLUDE 'pagination.html' param = 'p' %] +</div> diff --git a/templates/web/base/maps/google.html b/templates/web/base/maps/google.html index c86c757fb..ec9885a04 100644 --- a/templates/web/base/maps/google.html +++ b/templates/web/base/maps/google.html @@ -18,7 +18,6 @@ map_js = [ var fixmystreet = fixmystreet || {}; $.extend(fixmystreet, { 'area': [ [% map.area.join(',') %] ], - 'all_pins': '[% all_pins %]', 'latitude': [% map.latitude %], 'longitude': [% map.longitude %], [% IF map.any_zoom -%] diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html index 568a87e7c..12ae88c05 100644 --- a/templates/web/base/maps/openlayers.html +++ b/templates/web/base/maps/openlayers.html @@ -9,7 +9,6 @@ [%- UNLESS c.cobrand.call_hook('hide_areas_on_reports') %] data-area="[% map.area.join(',') %]" [%- END %] - data-all_pins='[% all_pins %]' data-latitude=[% map.latitude %] data-longitude=[% map.longitude %] [% IF map.any_zoom -%] diff --git a/templates/web/base/pagination.html b/templates/web/base/pagination.html index a677b9d58..7c13ec9cb 100644 --- a/templates/web/base/pagination.html +++ b/templates/web/base/pagination.html @@ -1,5 +1,5 @@ [% IF pager.total_entries > 1 %] - <p class="pagination"> + <p class="pagination" data-page="[% pager.current_page %]"> [% IF pager.previous_page %] <a class="prev" href="[% c.uri_with({ $param => pager.previous_page, ajax => undefined }) %][% '#' _ hash IF hash %]">[% loc('Previous') %]</a> [% END %] |