aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web')
-rw-r--r--templates/web/base/around/on_map_list_items.html31
-rwxr-xr-xtemplates/web/base/around/tabbed_lists.html12
-rw-r--r--templates/web/base/pagination.html2
3 files changed, 35 insertions, 10 deletions
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/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 %]