aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/default/around/around_map_list_items.html18
-rwxr-xr-xtemplates/web/default/around/display_location.html35
-rw-r--r--templates/web/default/around/on_map_list_items.html15
3 files changed, 35 insertions, 33 deletions
diff --git a/templates/web/default/around/around_map_list_items.html b/templates/web/default/around/around_map_list_items.html
new file mode 100644
index 000000000..06790a734
--- /dev/null
+++ b/templates/web/default/around/around_map_list_items.html
@@ -0,0 +1,18 @@
+[% IF around_map.size %]
+ [% FOREACH p IN around_map %]
+
+ [% dist = tprintf("%.1f", (p.distance || 0) ) %]
+
+ <li>
+ <a href="[% c.uri_for('/report', p.id ) %]">
+ [% p.title | html %]
+ </a>
+ <small>([% prettify_epoch( p.time, 1 ) %], [% dist %]km)</small>)</small>
+ [% IF p.state == 'fixed' %]
+ <small>[% loc('(fixed)') %]</small>
+ [% END %]
+ </li>
+ [% END %]
+[% ELSE %]
+ <li>[% loc('No problems found.') %]</li>
+[% END %]
diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html
index ba1e6b73f..6801552e6 100755
--- a/templates/web/default/around/display_location.html
+++ b/templates/web/default/around/display_location.html
@@ -69,21 +69,7 @@
<h2>[% loc('Reports on and around the map') %]</h2>
<ul id="current">
- [% IF on_map.size %]
- [% FOREACH p IN on_map %]
- <li>
- <a href="[% c.uri_for('/report', p.id ) %]">
- [% p.title | html %]
- </a>
- <small>([% prettify_epoch( p.time, 1 ) %])</small>
- [% IF p.state == 'fixed' %]
- <small>[% loc('(fixed)') %]</small>
- [% END %]
- </li>
- [% END %]
- [% ELSE %]
- <li>[% loc('No problems have been reported yet.') %]</li>
- [% END %]
+ [% INCLUDE "around/on_map_list_items.html" %]
</ul>
@@ -97,24 +83,7 @@
</h2>
<ul id="current_near">
- [% IF around_map.size %]
- [% FOREACH p IN around_map %]
-
- [% dist = int( p.distance * 10 + 0.5 ) / 10 %]
-
- <li>
- <a href="[% c.uri_for('/report', p.id ) %]">
- [% p.title | html %]
- </a>
- <small>([% prettify_epoch( p.time, 1 ) %], [% dist %]km)</small>)</small>
- [% IF p.state == 'fixed' %]
- <small>[% loc('(fixed)') %]</small>
- [% END %]
- </li>
- [% END %]
- [% ELSE %]
- <li>[% loc('No problems found.') %]</li>
- [% END %]
+ [% INCLUDE "around/around_map_list_items.html" %]
</ul>
</div>
diff --git a/templates/web/default/around/on_map_list_items.html b/templates/web/default/around/on_map_list_items.html
new file mode 100644
index 000000000..2408f5553
--- /dev/null
+++ b/templates/web/default/around/on_map_list_items.html
@@ -0,0 +1,15 @@
+[% IF on_map.size %]
+ [% FOREACH p IN on_map %]
+ <li>
+ <a href="[% c.uri_for('/report', p.id ) %]">
+ [% p.title | html %]
+ </a>
+ <small>([% prettify_epoch( p.time, 1 ) %])</small>
+ [% IF p.state == 'fixed' %]
+ <small>[% loc('(fixed)') %]</small>
+ [% END %]
+ </li>
+ [% END %]
+[% ELSE %]
+ <li>[% loc('No problems have been reported yet.') %]</li>
+[% END %]