Skip to content

Commit dff9f6c

Browse files
committed
Display external link only when usefull #32
1 parent b593596 commit dff9f6c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

template/osm-map.tpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ html, body {
3030
{/literal}
3131
{/html_style}
3232

33-
<span> <a href="{$HOME}">{$HOME_NAME}</a> <a href="{$HOME_PREV}">{$HOME_PREV_NAME}</a> - <b id="nb_showall">{$TOTAL}</b> - <a id="showall" target="_blank" href="">{'ITEMS_SCREEN'|@translate}</a> - {'MOUSE_OVER'|@translate}</span>
33+
<span> <a href="{$HOME}">{$HOME_NAME}</a> <a href="{$HOME_PREV}">{$HOME_PREV_NAME}</a> - <b id="nb_showall">{$TOTAL}</b> - <a id="showall" target="_blank" href="" style="display: none">Show items of this screen</a><span id='shownothing'>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span></span>
3434
<div id="map"></div>
3535
<script type="text/javascript">{$OSMJS}</script>
3636

@@ -54,6 +54,8 @@ html, body {
5454
var myurl = "{/literal}{$HOME}{literal}osmmap.php?min_lat="+min.lat+"&min_lng="+min.lng+"&max_lat="+max.lat+"&max_lng="+max.lng;
5555
//console.log(myurl);
5656
document.getElementById("showall").setAttribute('href',myurl);
57+
document.getElementById("shownothing").style.display = 'none';
58+
document.getElementById("showall").style.display = 'inline';
5759
5860
var nb_items = 0;
5961
for (var i = 0; i < addressPoints.length; i++) {
@@ -66,7 +68,7 @@ html, body {
6668
nb_items++;
6769
}
6870
}
69-
document.getElementById("nb_showall").innerHTML = sprintf(l10n('ITEMS'), nb_items);
71+
document.getElementById("nb_showall").innerHTML = nb_items +' items';
7072
}
7173
{/literal}
7274
</script>

0 commit comments

Comments
 (0)