/
page_user_list_nearby.txt
73 lines (51 loc) · 2.51 KB
/
page_user_list_nearby.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{capture assign="page_title"}{$owner.username} | status | {$str_status} | nearby here{if $latitude and $longitude} | {$latitude|escape}, {$longitude|escape}{/if}{/capture}
{include file="inc_head.txt"}
{if $latitude and $longitude}
<div id="displaymap" class="map" data-extent="{$geo_stats.bounding_box|@join:","|escape}" data-hash="false" data-interactive="false" data-provider="toner">
{include file="inc_map_header_markers.txt markers=$venues}
<div class="marker marker-header marker-youarehere" data-location="{$latitude|escape},{$longitude|escape}"><span class="marker-history-text"></span></div>
</div>
<h3 class="header-right">{$str_status|escape}, nearby here</h3>
{foreach from=$venues item="row"}
<div class="checkin" data-venue="{$row.venue_id|escape}">
<h3 class="header-left">
<a href="{$row|@urls_venue}">{$row.venue.name|escape}</a>
<span class="header-loc">{$row.created|date_format|escape}{if $row.locality}, in <a href="{$owner|@urls_foo_for_user}{$status_id|escape}/{$row.venue.locality|escape}/">{$row.locality.name|escape}</a>{/if}</span>
</h3>
<div class="map" data-zoom="14" data-center="{$row.latitude|escape},{$row.longitude|escape}" data-hash="false" data-interactive="false" data-provider="toner">
<div class="marker marker-history marker-youarehere" data-location="{$latitude|escape},{$longitude|escape}"><span class="marker-history-text">you are here-ish</span></div>
<div class="marker marker-history{if $row.status_id==2} marker-history-todo{/if}" data-location="{$row.latitude|escape},{$row.longitude|escape}"><span class="marker-history-text">{$row.venue.name|escape}</span></div>
</div>
</div>
{/foreach}
{include file="inc_pagination.txt"}
{include file="inc_export_links.txt"}
<script type="text/javascript">
$(document).ready(function(){literal}{{/literal}
privatesquare_htmapl();
{literal}}{/literal});
</script>
{else}
<div id="status"></div>
<script type="text/javascript">
{literal}
$(document).ready(function(){
var _onsuccess = function(rsp){
var lat = rsp['coords']['latitude'];
var lon = rsp['coords']['longitude'];
var url = location.href + '?latitude=' + lat + '&longitude=' + lon;
privatesquare_set_status("Okay, I've found you. One moment please...");
setTimeout(function(){
location.href = url;
}, 2000);
};
var _onfail = function(rsp){
privatesquare_set_status("I have no idea where you are.");
};
privatesquare_whereami(_onsuccess, _onfail);
privatesquare_set_status("Asking the sky where you are...");
});
{/literal}
</script>
{/if}
{include file="inc_foot.txt"}